A message with details about the error that occurred.
\n * @public\n */\n Message;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"CFNRegistryException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _CFNRegistryException.prototype);\n this.Message = opts.Message;\n }\n};\nvar TypeNotFoundException = class _TypeNotFoundException extends CloudFormationServiceException {\n static {\n __name(this, \"TypeNotFoundException\");\n }\n name = \"TypeNotFoundException\";\n $fault = \"client\";\n /**\n *A message with details about the error that occurred.
\n * @public\n */\n Message;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"TypeNotFoundException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _TypeNotFoundException.prototype);\n this.Message = opts.Message;\n }\n};\nvar AlreadyExistsException = class _AlreadyExistsException extends CloudFormationServiceException {\n static {\n __name(this, \"AlreadyExistsException\");\n }\n name = \"AlreadyExistsException\";\n $fault = \"client\";\n Message;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"AlreadyExistsException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _AlreadyExistsException.prototype);\n this.Message = opts.Message;\n }\n};\nvar AttributeChangeType = {\n Add: \"Add\",\n Modify: \"Modify\",\n Remove: \"Remove\"\n};\nvar TypeConfigurationNotFoundException = class _TypeConfigurationNotFoundException extends CloudFormationServiceException {\n static {\n __name(this, \"TypeConfigurationNotFoundException\");\n }\n name = \"TypeConfigurationNotFoundException\";\n $fault = \"client\";\n /**\n *A message with details about the error that occurred.
\n * @public\n */\n Message;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"TypeConfigurationNotFoundException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _TypeConfigurationNotFoundException.prototype);\n this.Message = opts.Message;\n }\n};\nvar CallAs = {\n DELEGATED_ADMIN: \"DELEGATED_ADMIN\",\n SELF: \"SELF\"\n};\nvar TokenAlreadyExistsException = class _TokenAlreadyExistsException extends CloudFormationServiceException {\n static {\n __name(this, \"TokenAlreadyExistsException\");\n }\n name = \"TokenAlreadyExistsException\";\n $fault = \"client\";\n Message;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"TokenAlreadyExistsException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _TokenAlreadyExistsException.prototype);\n this.Message = opts.Message;\n }\n};\nvar Capability = {\n CAPABILITY_AUTO_EXPAND: \"CAPABILITY_AUTO_EXPAND\",\n CAPABILITY_IAM: \"CAPABILITY_IAM\",\n CAPABILITY_NAMED_IAM: \"CAPABILITY_NAMED_IAM\"\n};\nvar Category = {\n ACTIVATED: \"ACTIVATED\",\n AWS_TYPES: \"AWS_TYPES\",\n REGISTERED: \"REGISTERED\",\n THIRD_PARTY: \"THIRD_PARTY\"\n};\nvar ChangeAction = {\n Add: \"Add\",\n Dynamic: \"Dynamic\",\n Import: \"Import\",\n Modify: \"Modify\",\n Remove: \"Remove\"\n};\nvar ChangeSource = {\n Automatic: \"Automatic\",\n DirectModification: \"DirectModification\",\n ParameterReference: \"ParameterReference\",\n ResourceAttribute: \"ResourceAttribute\",\n ResourceReference: \"ResourceReference\"\n};\nvar EvaluationType = {\n Dynamic: \"Dynamic\",\n Static: \"Static\"\n};\nvar ResourceAttribute = {\n CreationPolicy: \"CreationPolicy\",\n DeletionPolicy: \"DeletionPolicy\",\n Metadata: \"Metadata\",\n Properties: \"Properties\",\n Tags: \"Tags\",\n UpdatePolicy: \"UpdatePolicy\",\n UpdateReplacePolicy: \"UpdateReplacePolicy\"\n};\nvar RequiresRecreation = {\n Always: \"Always\",\n Conditionally: \"Conditionally\",\n Never: \"Never\"\n};\nvar PolicyAction = {\n Delete: \"Delete\",\n ReplaceAndDelete: \"ReplaceAndDelete\",\n ReplaceAndRetain: \"ReplaceAndRetain\",\n ReplaceAndSnapshot: \"ReplaceAndSnapshot\",\n Retain: \"Retain\",\n Snapshot: \"Snapshot\"\n};\nvar Replacement = {\n Conditional: \"Conditional\",\n False: \"False\",\n True: \"True\"\n};\nvar ChangeType = {\n Resource: \"Resource\"\n};\nvar HookFailureMode = {\n FAIL: \"FAIL\",\n WARN: \"WARN\"\n};\nvar HookInvocationPoint = {\n PRE_PROVISION: \"PRE_PROVISION\"\n};\nvar HookTargetType = {\n RESOURCE: \"RESOURCE\"\n};\nvar ChangeSetHooksStatus = {\n PLANNED: \"PLANNED\",\n PLANNING: \"PLANNING\",\n UNAVAILABLE: \"UNAVAILABLE\"\n};\nvar ChangeSetNotFoundException = class _ChangeSetNotFoundException extends CloudFormationServiceException {\n static {\n __name(this, \"ChangeSetNotFoundException\");\n }\n name = \"ChangeSetNotFoundException\";\n $fault = \"client\";\n Message;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"ChangeSetNotFoundException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _ChangeSetNotFoundException.prototype);\n this.Message = opts.Message;\n }\n};\nvar ChangeSetStatus = {\n CREATE_COMPLETE: \"CREATE_COMPLETE\",\n CREATE_IN_PROGRESS: \"CREATE_IN_PROGRESS\",\n CREATE_PENDING: \"CREATE_PENDING\",\n DELETE_COMPLETE: \"DELETE_COMPLETE\",\n DELETE_FAILED: \"DELETE_FAILED\",\n DELETE_IN_PROGRESS: \"DELETE_IN_PROGRESS\",\n DELETE_PENDING: \"DELETE_PENDING\",\n FAILED: \"FAILED\"\n};\nvar ExecutionStatus = {\n AVAILABLE: \"AVAILABLE\",\n EXECUTE_COMPLETE: \"EXECUTE_COMPLETE\",\n EXECUTE_FAILED: \"EXECUTE_FAILED\",\n EXECUTE_IN_PROGRESS: \"EXECUTE_IN_PROGRESS\",\n OBSOLETE: \"OBSOLETE\",\n UNAVAILABLE: \"UNAVAILABLE\"\n};\nvar ChangeSetType = {\n CREATE: \"CREATE\",\n IMPORT: \"IMPORT\",\n UPDATE: \"UPDATE\"\n};\nvar OnStackFailure = {\n DELETE: \"DELETE\",\n DO_NOTHING: \"DO_NOTHING\",\n ROLLBACK: \"ROLLBACK\"\n};\nvar InsufficientCapabilitiesException = class _InsufficientCapabilitiesException extends CloudFormationServiceException {\n static {\n __name(this, \"InsufficientCapabilitiesException\");\n }\n name = \"InsufficientCapabilitiesException\";\n $fault = \"client\";\n Message;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"InsufficientCapabilitiesException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _InsufficientCapabilitiesException.prototype);\n this.Message = opts.Message;\n }\n};\nvar LimitExceededException = class _LimitExceededException extends CloudFormationServiceException {\n static {\n __name(this, \"LimitExceededException\");\n }\n name = \"LimitExceededException\";\n $fault = \"client\";\n Message;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"LimitExceededException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _LimitExceededException.prototype);\n this.Message = opts.Message;\n }\n};\nvar ConcurrentResourcesLimitExceededException = class _ConcurrentResourcesLimitExceededException extends CloudFormationServiceException {\n static {\n __name(this, \"ConcurrentResourcesLimitExceededException\");\n }\n name = \"ConcurrentResourcesLimitExceededException\";\n $fault = \"client\";\n Message;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"ConcurrentResourcesLimitExceededException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _ConcurrentResourcesLimitExceededException.prototype);\n this.Message = opts.Message;\n }\n};\nvar GeneratedTemplateDeletionPolicy = {\n DELETE: \"DELETE\",\n RETAIN: \"RETAIN\"\n};\nvar GeneratedTemplateUpdateReplacePolicy = {\n DELETE: \"DELETE\",\n RETAIN: \"RETAIN\"\n};\nvar OnFailure = {\n DELETE: \"DELETE\",\n DO_NOTHING: \"DO_NOTHING\",\n ROLLBACK: \"ROLLBACK\"\n};\nvar ConcurrencyMode = {\n SOFT_FAILURE_TOLERANCE: \"SOFT_FAILURE_TOLERANCE\",\n STRICT_FAILURE_TOLERANCE: \"STRICT_FAILURE_TOLERANCE\"\n};\nvar RegionConcurrencyType = {\n PARALLEL: \"PARALLEL\",\n SEQUENTIAL: \"SEQUENTIAL\"\n};\nvar OperationIdAlreadyExistsException = class _OperationIdAlreadyExistsException extends CloudFormationServiceException {\n static {\n __name(this, \"OperationIdAlreadyExistsException\");\n }\n name = \"OperationIdAlreadyExistsException\";\n $fault = \"client\";\n Message;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"OperationIdAlreadyExistsException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _OperationIdAlreadyExistsException.prototype);\n this.Message = opts.Message;\n }\n};\nvar OperationInProgressException = class _OperationInProgressException extends CloudFormationServiceException {\n static {\n __name(this, \"OperationInProgressException\");\n }\n name = \"OperationInProgressException\";\n $fault = \"client\";\n Message;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"OperationInProgressException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _OperationInProgressException.prototype);\n this.Message = opts.Message;\n }\n};\nvar StackSetNotFoundException = class _StackSetNotFoundException extends CloudFormationServiceException {\n static {\n __name(this, \"StackSetNotFoundException\");\n }\n name = \"StackSetNotFoundException\";\n $fault = \"client\";\n Message;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"StackSetNotFoundException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _StackSetNotFoundException.prototype);\n this.Message = opts.Message;\n }\n};\nvar StaleRequestException = class _StaleRequestException extends CloudFormationServiceException {\n static {\n __name(this, \"StaleRequestException\");\n }\n name = \"StaleRequestException\";\n $fault = \"client\";\n Message;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"StaleRequestException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _StaleRequestException.prototype);\n this.Message = opts.Message;\n }\n};\nvar CreatedButModifiedException = class _CreatedButModifiedException extends CloudFormationServiceException {\n static {\n __name(this, \"CreatedButModifiedException\");\n }\n name = \"CreatedButModifiedException\";\n $fault = \"client\";\n Message;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"CreatedButModifiedException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _CreatedButModifiedException.prototype);\n this.Message = opts.Message;\n }\n};\nvar PermissionModels = {\n SELF_MANAGED: \"SELF_MANAGED\",\n SERVICE_MANAGED: \"SERVICE_MANAGED\"\n};\nvar NameAlreadyExistsException = class _NameAlreadyExistsException extends CloudFormationServiceException {\n static {\n __name(this, \"NameAlreadyExistsException\");\n }\n name = \"NameAlreadyExistsException\";\n $fault = \"client\";\n Message;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"NameAlreadyExistsException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _NameAlreadyExistsException.prototype);\n this.Message = opts.Message;\n }\n};\nvar InvalidChangeSetStatusException = class _InvalidChangeSetStatusException extends CloudFormationServiceException {\n static {\n __name(this, \"InvalidChangeSetStatusException\");\n }\n name = \"InvalidChangeSetStatusException\";\n $fault = \"client\";\n Message;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"InvalidChangeSetStatusException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _InvalidChangeSetStatusException.prototype);\n this.Message = opts.Message;\n }\n};\nvar GeneratedTemplateNotFoundException = class _GeneratedTemplateNotFoundException extends CloudFormationServiceException {\n static {\n __name(this, \"GeneratedTemplateNotFoundException\");\n }\n name = \"GeneratedTemplateNotFoundException\";\n $fault = \"client\";\n Message;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"GeneratedTemplateNotFoundException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _GeneratedTemplateNotFoundException.prototype);\n this.Message = opts.Message;\n }\n};\nvar DeletionMode = {\n FORCE_DELETE_STACK: \"FORCE_DELETE_STACK\",\n STANDARD: \"STANDARD\"\n};\nvar StackSetNotEmptyException = class _StackSetNotEmptyException extends CloudFormationServiceException {\n static {\n __name(this, \"StackSetNotEmptyException\");\n }\n name = \"StackSetNotEmptyException\";\n $fault = \"client\";\n Message;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"StackSetNotEmptyException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _StackSetNotEmptyException.prototype);\n this.Message = opts.Message;\n }\n};\nvar RegistryType = {\n HOOK: \"HOOK\",\n MODULE: \"MODULE\",\n RESOURCE: \"RESOURCE\"\n};\nvar GeneratedTemplateResourceStatus = {\n COMPLETE: \"COMPLETE\",\n FAILED: \"FAILED\",\n IN_PROGRESS: \"IN_PROGRESS\",\n PENDING: \"PENDING\"\n};\nvar WarningType = {\n MUTUALLY_EXCLUSIVE_PROPERTIES: \"MUTUALLY_EXCLUSIVE_PROPERTIES\",\n MUTUALLY_EXCLUSIVE_TYPES: \"MUTUALLY_EXCLUSIVE_TYPES\",\n UNSUPPORTED_PROPERTIES: \"UNSUPPORTED_PROPERTIES\"\n};\nvar GeneratedTemplateStatus = {\n COMPLETE: \"COMPLETE\",\n CREATE_IN_PROGRESS: \"CREATE_IN_PROGRESS\",\n CREATE_PENDING: \"CREATE_PENDING\",\n DELETE_IN_PROGRESS: \"DELETE_IN_PROGRESS\",\n DELETE_PENDING: \"DELETE_PENDING\",\n FAILED: \"FAILED\",\n UPDATE_IN_PROGRESS: \"UPDATE_IN_PROGRESS\",\n UPDATE_PENDING: \"UPDATE_PENDING\"\n};\nvar OrganizationStatus = {\n DISABLED: \"DISABLED\",\n DISABLED_PERMANENTLY: \"DISABLED_PERMANENTLY\",\n ENABLED: \"ENABLED\"\n};\nvar IdentityProvider = {\n AWS_Marketplace: \"AWS_Marketplace\",\n Bitbucket: \"Bitbucket\",\n GitHub: \"GitHub\"\n};\nvar PublisherStatus = {\n UNVERIFIED: \"UNVERIFIED\",\n VERIFIED: \"VERIFIED\"\n};\nvar ResourceScanStatus = {\n COMPLETE: \"COMPLETE\",\n EXPIRED: \"EXPIRED\",\n FAILED: \"FAILED\",\n IN_PROGRESS: \"IN_PROGRESS\"\n};\nvar ResourceScanNotFoundException = class _ResourceScanNotFoundException extends CloudFormationServiceException {\n static {\n __name(this, \"ResourceScanNotFoundException\");\n }\n name = \"ResourceScanNotFoundException\";\n $fault = \"client\";\n Message;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"ResourceScanNotFoundException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _ResourceScanNotFoundException.prototype);\n this.Message = opts.Message;\n }\n};\nvar StackDriftDetectionStatus = {\n DETECTION_COMPLETE: \"DETECTION_COMPLETE\",\n DETECTION_FAILED: \"DETECTION_FAILED\",\n DETECTION_IN_PROGRESS: \"DETECTION_IN_PROGRESS\"\n};\nvar StackDriftStatus = {\n DRIFTED: \"DRIFTED\",\n IN_SYNC: \"IN_SYNC\",\n NOT_CHECKED: \"NOT_CHECKED\",\n UNKNOWN: \"UNKNOWN\"\n};\nvar DetailedStatus = {\n CONFIGURATION_COMPLETE: \"CONFIGURATION_COMPLETE\",\n VALIDATION_FAILED: \"VALIDATION_FAILED\"\n};\nvar HookStatus = {\n HOOK_COMPLETE_FAILED: \"HOOK_COMPLETE_FAILED\",\n HOOK_COMPLETE_SUCCEEDED: \"HOOK_COMPLETE_SUCCEEDED\",\n HOOK_FAILED: \"HOOK_FAILED\",\n HOOK_IN_PROGRESS: \"HOOK_IN_PROGRESS\"\n};\nvar ResourceStatus = {\n CREATE_COMPLETE: \"CREATE_COMPLETE\",\n CREATE_FAILED: \"CREATE_FAILED\",\n CREATE_IN_PROGRESS: \"CREATE_IN_PROGRESS\",\n DELETE_COMPLETE: \"DELETE_COMPLETE\",\n DELETE_FAILED: \"DELETE_FAILED\",\n DELETE_IN_PROGRESS: \"DELETE_IN_PROGRESS\",\n DELETE_SKIPPED: \"DELETE_SKIPPED\",\n EXPORT_COMPLETE: \"EXPORT_COMPLETE\",\n EXPORT_FAILED: \"EXPORT_FAILED\",\n EXPORT_IN_PROGRESS: \"EXPORT_IN_PROGRESS\",\n EXPORT_ROLLBACK_COMPLETE: \"EXPORT_ROLLBACK_COMPLETE\",\n EXPORT_ROLLBACK_FAILED: \"EXPORT_ROLLBACK_FAILED\",\n EXPORT_ROLLBACK_IN_PROGRESS: \"EXPORT_ROLLBACK_IN_PROGRESS\",\n IMPORT_COMPLETE: \"IMPORT_COMPLETE\",\n IMPORT_FAILED: \"IMPORT_FAILED\",\n IMPORT_IN_PROGRESS: \"IMPORT_IN_PROGRESS\",\n IMPORT_ROLLBACK_COMPLETE: \"IMPORT_ROLLBACK_COMPLETE\",\n IMPORT_ROLLBACK_FAILED: \"IMPORT_ROLLBACK_FAILED\",\n IMPORT_ROLLBACK_IN_PROGRESS: \"IMPORT_ROLLBACK_IN_PROGRESS\",\n ROLLBACK_COMPLETE: \"ROLLBACK_COMPLETE\",\n ROLLBACK_FAILED: \"ROLLBACK_FAILED\",\n ROLLBACK_IN_PROGRESS: \"ROLLBACK_IN_PROGRESS\",\n UPDATE_COMPLETE: \"UPDATE_COMPLETE\",\n UPDATE_FAILED: \"UPDATE_FAILED\",\n UPDATE_IN_PROGRESS: \"UPDATE_IN_PROGRESS\",\n UPDATE_ROLLBACK_COMPLETE: \"UPDATE_ROLLBACK_COMPLETE\",\n UPDATE_ROLLBACK_FAILED: \"UPDATE_ROLLBACK_FAILED\",\n UPDATE_ROLLBACK_IN_PROGRESS: \"UPDATE_ROLLBACK_IN_PROGRESS\"\n};\nvar StackInstanceDetailedStatus = {\n CANCELLED: \"CANCELLED\",\n FAILED: \"FAILED\",\n FAILED_IMPORT: \"FAILED_IMPORT\",\n INOPERABLE: \"INOPERABLE\",\n PENDING: \"PENDING\",\n RUNNING: \"RUNNING\",\n SKIPPED_SUSPENDED_ACCOUNT: \"SKIPPED_SUSPENDED_ACCOUNT\",\n SUCCEEDED: \"SUCCEEDED\"\n};\nvar StackInstanceStatus = {\n CURRENT: \"CURRENT\",\n INOPERABLE: \"INOPERABLE\",\n OUTDATED: \"OUTDATED\"\n};\nvar StackInstanceNotFoundException = class _StackInstanceNotFoundException extends CloudFormationServiceException {\n static {\n __name(this, \"StackInstanceNotFoundException\");\n }\n name = \"StackInstanceNotFoundException\";\n $fault = \"client\";\n Message;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"StackInstanceNotFoundException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _StackInstanceNotFoundException.prototype);\n this.Message = opts.Message;\n }\n};\nvar StackRefactorExecutionStatus = {\n AVAILABLE: \"AVAILABLE\",\n EXECUTE_COMPLETE: \"EXECUTE_COMPLETE\",\n EXECUTE_FAILED: \"EXECUTE_FAILED\",\n EXECUTE_IN_PROGRESS: \"EXECUTE_IN_PROGRESS\",\n OBSOLETE: \"OBSOLETE\",\n ROLLBACK_COMPLETE: \"ROLLBACK_COMPLETE\",\n ROLLBACK_FAILED: \"ROLLBACK_FAILED\",\n ROLLBACK_IN_PROGRESS: \"ROLLBACK_IN_PROGRESS\",\n UNAVAILABLE: \"UNAVAILABLE\"\n};\nvar StackRefactorStatus = {\n CREATE_COMPLETE: \"CREATE_COMPLETE\",\n CREATE_FAILED: \"CREATE_FAILED\",\n CREATE_IN_PROGRESS: \"CREATE_IN_PROGRESS\",\n DELETE_COMPLETE: \"DELETE_COMPLETE\",\n DELETE_FAILED: \"DELETE_FAILED\",\n DELETE_IN_PROGRESS: \"DELETE_IN_PROGRESS\"\n};\nvar StackRefactorNotFoundException = class _StackRefactorNotFoundException extends CloudFormationServiceException {\n static {\n __name(this, \"StackRefactorNotFoundException\");\n }\n name = \"StackRefactorNotFoundException\";\n $fault = \"client\";\n Message;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"StackRefactorNotFoundException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _StackRefactorNotFoundException.prototype);\n this.Message = opts.Message;\n }\n};\nvar StackResourceDriftStatus = {\n DELETED: \"DELETED\",\n IN_SYNC: \"IN_SYNC\",\n MODIFIED: \"MODIFIED\",\n NOT_CHECKED: \"NOT_CHECKED\"\n};\nvar DifferenceType = {\n ADD: \"ADD\",\n NOT_EQUAL: \"NOT_EQUAL\",\n REMOVE: \"REMOVE\"\n};\nvar StackStatus = {\n CREATE_COMPLETE: \"CREATE_COMPLETE\",\n CREATE_FAILED: \"CREATE_FAILED\",\n CREATE_IN_PROGRESS: \"CREATE_IN_PROGRESS\",\n DELETE_COMPLETE: \"DELETE_COMPLETE\",\n DELETE_FAILED: \"DELETE_FAILED\",\n DELETE_IN_PROGRESS: \"DELETE_IN_PROGRESS\",\n IMPORT_COMPLETE: \"IMPORT_COMPLETE\",\n IMPORT_IN_PROGRESS: \"IMPORT_IN_PROGRESS\",\n IMPORT_ROLLBACK_COMPLETE: \"IMPORT_ROLLBACK_COMPLETE\",\n IMPORT_ROLLBACK_FAILED: \"IMPORT_ROLLBACK_FAILED\",\n IMPORT_ROLLBACK_IN_PROGRESS: \"IMPORT_ROLLBACK_IN_PROGRESS\",\n REVIEW_IN_PROGRESS: \"REVIEW_IN_PROGRESS\",\n ROLLBACK_COMPLETE: \"ROLLBACK_COMPLETE\",\n ROLLBACK_FAILED: \"ROLLBACK_FAILED\",\n ROLLBACK_IN_PROGRESS: \"ROLLBACK_IN_PROGRESS\",\n UPDATE_COMPLETE: \"UPDATE_COMPLETE\",\n UPDATE_COMPLETE_CLEANUP_IN_PROGRESS: \"UPDATE_COMPLETE_CLEANUP_IN_PROGRESS\",\n UPDATE_FAILED: \"UPDATE_FAILED\",\n UPDATE_IN_PROGRESS: \"UPDATE_IN_PROGRESS\",\n UPDATE_ROLLBACK_COMPLETE: \"UPDATE_ROLLBACK_COMPLETE\",\n UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS: \"UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS\",\n UPDATE_ROLLBACK_FAILED: \"UPDATE_ROLLBACK_FAILED\",\n UPDATE_ROLLBACK_IN_PROGRESS: \"UPDATE_ROLLBACK_IN_PROGRESS\"\n};\nvar StackSetDriftDetectionStatus = {\n COMPLETED: \"COMPLETED\",\n FAILED: \"FAILED\",\n IN_PROGRESS: \"IN_PROGRESS\",\n PARTIAL_SUCCESS: \"PARTIAL_SUCCESS\",\n STOPPED: \"STOPPED\"\n};\nvar StackSetDriftStatus = {\n DRIFTED: \"DRIFTED\",\n IN_SYNC: \"IN_SYNC\",\n NOT_CHECKED: \"NOT_CHECKED\"\n};\nvar StackSetStatus = {\n ACTIVE: \"ACTIVE\",\n DELETED: \"DELETED\"\n};\nvar StackSetOperationAction = {\n CREATE: \"CREATE\",\n DELETE: \"DELETE\",\n DETECT_DRIFT: \"DETECT_DRIFT\",\n UPDATE: \"UPDATE\"\n};\nvar StackSetOperationStatus = {\n FAILED: \"FAILED\",\n QUEUED: \"QUEUED\",\n RUNNING: \"RUNNING\",\n STOPPED: \"STOPPED\",\n STOPPING: \"STOPPING\",\n SUCCEEDED: \"SUCCEEDED\"\n};\nvar DeprecatedStatus = {\n DEPRECATED: \"DEPRECATED\",\n LIVE: \"LIVE\"\n};\nvar ProvisioningType = {\n FULLY_MUTABLE: \"FULLY_MUTABLE\",\n IMMUTABLE: \"IMMUTABLE\",\n NON_PROVISIONABLE: \"NON_PROVISIONABLE\"\n};\nvar TypeTestsStatus = {\n FAILED: \"FAILED\",\n IN_PROGRESS: \"IN_PROGRESS\",\n NOT_TESTED: \"NOT_TESTED\",\n PASSED: \"PASSED\"\n};\nvar Visibility = {\n PRIVATE: \"PRIVATE\",\n PUBLIC: \"PUBLIC\"\n};\nvar RegistrationStatus = {\n COMPLETE: \"COMPLETE\",\n FAILED: \"FAILED\",\n IN_PROGRESS: \"IN_PROGRESS\"\n};\nvar TemplateFormat = {\n JSON: \"JSON\",\n YAML: \"YAML\"\n};\nvar TemplateStage = {\n Original: \"Original\",\n Processed: \"Processed\"\n};\nvar StackNotFoundException = class _StackNotFoundException extends CloudFormationServiceException {\n static {\n __name(this, \"StackNotFoundException\");\n }\n name = \"StackNotFoundException\";\n $fault = \"client\";\n Message;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"StackNotFoundException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _StackNotFoundException.prototype);\n this.Message = opts.Message;\n }\n};\nvar HookResultNotFoundException = class _HookResultNotFoundException extends CloudFormationServiceException {\n static {\n __name(this, \"HookResultNotFoundException\");\n }\n name = \"HookResultNotFoundException\";\n $fault = \"client\";\n Message;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"HookResultNotFoundException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _HookResultNotFoundException.prototype);\n this.Message = opts.Message;\n }\n};\nvar ListHookResultsTargetType = {\n CHANGE_SET: \"CHANGE_SET\",\n CLOUD_CONTROL: \"CLOUD_CONTROL\",\n RESOURCE: \"RESOURCE\",\n STACK: \"STACK\"\n};\nvar ResourceScanInProgressException = class _ResourceScanInProgressException extends CloudFormationServiceException {\n static {\n __name(this, \"ResourceScanInProgressException\");\n }\n name = \"ResourceScanInProgressException\";\n $fault = \"client\";\n Message;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"ResourceScanInProgressException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _ResourceScanInProgressException.prototype);\n this.Message = opts.Message;\n }\n};\nvar ScanType = {\n FULL: \"FULL\",\n PARTIAL: \"PARTIAL\"\n};\nvar StackInstanceFilterName = {\n DETAILED_STATUS: \"DETAILED_STATUS\",\n DRIFT_STATUS: \"DRIFT_STATUS\",\n LAST_OPERATION_ID: \"LAST_OPERATION_ID\"\n};\nvar StackRefactorActionType = {\n CREATE: \"CREATE\",\n MOVE: \"MOVE\"\n};\nvar StackRefactorDetection = {\n AUTO: \"AUTO\",\n MANUAL: \"MANUAL\"\n};\nvar StackRefactorActionEntity = {\n RESOURCE: \"RESOURCE\",\n STACK: \"STACK\"\n};\nvar OperationResultFilterName = {\n OPERATION_RESULT_STATUS: \"OPERATION_RESULT_STATUS\"\n};\nvar StackSetOperationResultStatus = {\n CANCELLED: \"CANCELLED\",\n FAILED: \"FAILED\",\n PENDING: \"PENDING\",\n RUNNING: \"RUNNING\",\n SUCCEEDED: \"SUCCEEDED\"\n};\n\n// src/models/models_1.ts\nvar InvalidStateTransitionException = class _InvalidStateTransitionException extends CloudFormationServiceException {\n static {\n __name(this, \"InvalidStateTransitionException\");\n }\n name = \"InvalidStateTransitionException\";\n $fault = \"client\";\n Message;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"InvalidStateTransitionException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _InvalidStateTransitionException.prototype);\n this.Message = opts.Message;\n }\n};\nvar OperationStatusCheckFailedException = class _OperationStatusCheckFailedException extends CloudFormationServiceException {\n static {\n __name(this, \"OperationStatusCheckFailedException\");\n }\n name = \"OperationStatusCheckFailedException\";\n $fault = \"client\";\n Message;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"OperationStatusCheckFailedException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _OperationStatusCheckFailedException.prototype);\n this.Message = opts.Message;\n }\n};\nvar OperationStatus = {\n FAILED: \"FAILED\",\n IN_PROGRESS: \"IN_PROGRESS\",\n PENDING: \"PENDING\",\n SUCCESS: \"SUCCESS\"\n};\nvar HandlerErrorCode = {\n AccessDenied: \"AccessDenied\",\n AlreadyExists: \"AlreadyExists\",\n GeneralServiceException: \"GeneralServiceException\",\n HandlerInternalFailure: \"HandlerInternalFailure\",\n InternalFailure: \"InternalFailure\",\n InvalidCredentials: \"InvalidCredentials\",\n InvalidRequest: \"InvalidRequest\",\n InvalidTypeConfiguration: \"InvalidTypeConfiguration\",\n NetworkFailure: \"NetworkFailure\",\n NonCompliant: \"NonCompliant\",\n NotFound: \"NotFound\",\n NotUpdatable: \"NotUpdatable\",\n ResourceConflict: \"ResourceConflict\",\n ServiceInternalError: \"ServiceInternalError\",\n ServiceLimitExceeded: \"ServiceLimitExceeded\",\n ServiceTimeout: \"NotStabilized\",\n Throttling: \"Throttling\",\n Unknown: \"Unknown\",\n UnsupportedTarget: \"UnsupportedTarget\"\n};\nvar ResourceSignalStatus = {\n FAILURE: \"FAILURE\",\n SUCCESS: \"SUCCESS\"\n};\nvar ResourceScanLimitExceededException = class _ResourceScanLimitExceededException extends CloudFormationServiceException {\n static {\n __name(this, \"ResourceScanLimitExceededException\");\n }\n name = \"ResourceScanLimitExceededException\";\n $fault = \"client\";\n Message;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"ResourceScanLimitExceededException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _ResourceScanLimitExceededException.prototype);\n this.Message = opts.Message;\n }\n};\n\n// src/protocols/Aws_query.ts\nvar se_ActivateOrganizationsAccessCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_ActivateOrganizationsAccessInput(input, context),\n [_A]: _AOA,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_ActivateOrganizationsAccessCommand\");\nvar se_ActivateTypeCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_ActivateTypeInput(input, context),\n [_A]: _AT,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_ActivateTypeCommand\");\nvar se_BatchDescribeTypeConfigurationsCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_BatchDescribeTypeConfigurationsInput(input, context),\n [_A]: _BDTC,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_BatchDescribeTypeConfigurationsCommand\");\nvar se_CancelUpdateStackCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_CancelUpdateStackInput(input, context),\n [_A]: _CUS,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_CancelUpdateStackCommand\");\nvar se_ContinueUpdateRollbackCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_ContinueUpdateRollbackInput(input, context),\n [_A]: _CUR,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_ContinueUpdateRollbackCommand\");\nvar se_CreateChangeSetCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_CreateChangeSetInput(input, context),\n [_A]: _CCS,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_CreateChangeSetCommand\");\nvar se_CreateGeneratedTemplateCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_CreateGeneratedTemplateInput(input, context),\n [_A]: _CGT,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_CreateGeneratedTemplateCommand\");\nvar se_CreateStackCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_CreateStackInput(input, context),\n [_A]: _CS,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_CreateStackCommand\");\nvar se_CreateStackInstancesCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_CreateStackInstancesInput(input, context),\n [_A]: _CSI,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_CreateStackInstancesCommand\");\nvar se_CreateStackRefactorCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_CreateStackRefactorInput(input, context),\n [_A]: _CSR,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_CreateStackRefactorCommand\");\nvar se_CreateStackSetCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_CreateStackSetInput(input, context),\n [_A]: _CSS,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_CreateStackSetCommand\");\nvar se_DeactivateOrganizationsAccessCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_DeactivateOrganizationsAccessInput(input, context),\n [_A]: _DOA,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DeactivateOrganizationsAccessCommand\");\nvar se_DeactivateTypeCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_DeactivateTypeInput(input, context),\n [_A]: _DT,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DeactivateTypeCommand\");\nvar se_DeleteChangeSetCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_DeleteChangeSetInput(input, context),\n [_A]: _DCS,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DeleteChangeSetCommand\");\nvar se_DeleteGeneratedTemplateCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_DeleteGeneratedTemplateInput(input, context),\n [_A]: _DGT,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DeleteGeneratedTemplateCommand\");\nvar se_DeleteStackCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_DeleteStackInput(input, context),\n [_A]: _DS,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DeleteStackCommand\");\nvar se_DeleteStackInstancesCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_DeleteStackInstancesInput(input, context),\n [_A]: _DSI,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DeleteStackInstancesCommand\");\nvar se_DeleteStackSetCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_DeleteStackSetInput(input, context),\n [_A]: _DSS,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DeleteStackSetCommand\");\nvar se_DeregisterTypeCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_DeregisterTypeInput(input, context),\n [_A]: _DTe,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DeregisterTypeCommand\");\nvar se_DescribeAccountLimitsCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_DescribeAccountLimitsInput(input, context),\n [_A]: _DAL,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DescribeAccountLimitsCommand\");\nvar se_DescribeChangeSetCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_DescribeChangeSetInput(input, context),\n [_A]: _DCSe,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DescribeChangeSetCommand\");\nvar se_DescribeChangeSetHooksCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_DescribeChangeSetHooksInput(input, context),\n [_A]: _DCSH,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DescribeChangeSetHooksCommand\");\nvar se_DescribeGeneratedTemplateCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_DescribeGeneratedTemplateInput(input, context),\n [_A]: _DGTe,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DescribeGeneratedTemplateCommand\");\nvar se_DescribeOrganizationsAccessCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_DescribeOrganizationsAccessInput(input, context),\n [_A]: _DOAe,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DescribeOrganizationsAccessCommand\");\nvar se_DescribePublisherCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_DescribePublisherInput(input, context),\n [_A]: _DP,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DescribePublisherCommand\");\nvar se_DescribeResourceScanCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_DescribeResourceScanInput(input, context),\n [_A]: _DRS,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DescribeResourceScanCommand\");\nvar se_DescribeStackDriftDetectionStatusCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_DescribeStackDriftDetectionStatusInput(input, context),\n [_A]: _DSDDS,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DescribeStackDriftDetectionStatusCommand\");\nvar se_DescribeStackEventsCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_DescribeStackEventsInput(input, context),\n [_A]: _DSE,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DescribeStackEventsCommand\");\nvar se_DescribeStackInstanceCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_DescribeStackInstanceInput(input, context),\n [_A]: _DSIe,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DescribeStackInstanceCommand\");\nvar se_DescribeStackRefactorCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_DescribeStackRefactorInput(input, context),\n [_A]: _DSR,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DescribeStackRefactorCommand\");\nvar se_DescribeStackResourceCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_DescribeStackResourceInput(input, context),\n [_A]: _DSRe,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DescribeStackResourceCommand\");\nvar se_DescribeStackResourceDriftsCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_DescribeStackResourceDriftsInput(input, context),\n [_A]: _DSRD,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DescribeStackResourceDriftsCommand\");\nvar se_DescribeStackResourcesCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_DescribeStackResourcesInput(input, context),\n [_A]: _DSRes,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DescribeStackResourcesCommand\");\nvar se_DescribeStacksCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_DescribeStacksInput(input, context),\n [_A]: _DSe,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DescribeStacksCommand\");\nvar se_DescribeStackSetCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_DescribeStackSetInput(input, context),\n [_A]: _DSSe,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DescribeStackSetCommand\");\nvar se_DescribeStackSetOperationCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_DescribeStackSetOperationInput(input, context),\n [_A]: _DSSO,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DescribeStackSetOperationCommand\");\nvar se_DescribeTypeCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_DescribeTypeInput(input, context),\n [_A]: _DTes,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DescribeTypeCommand\");\nvar se_DescribeTypeRegistrationCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_DescribeTypeRegistrationInput(input, context),\n [_A]: _DTR,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DescribeTypeRegistrationCommand\");\nvar se_DetectStackDriftCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_DetectStackDriftInput(input, context),\n [_A]: _DSD,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DetectStackDriftCommand\");\nvar se_DetectStackResourceDriftCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_DetectStackResourceDriftInput(input, context),\n [_A]: _DSRDe,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DetectStackResourceDriftCommand\");\nvar se_DetectStackSetDriftCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_DetectStackSetDriftInput(input, context),\n [_A]: _DSSD,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DetectStackSetDriftCommand\");\nvar se_EstimateTemplateCostCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_EstimateTemplateCostInput(input, context),\n [_A]: _ETC,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_EstimateTemplateCostCommand\");\nvar se_ExecuteChangeSetCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_ExecuteChangeSetInput(input, context),\n [_A]: _ECS,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_ExecuteChangeSetCommand\");\nvar se_ExecuteStackRefactorCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_ExecuteStackRefactorInput(input, context),\n [_A]: _ESR,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_ExecuteStackRefactorCommand\");\nvar se_GetGeneratedTemplateCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_GetGeneratedTemplateInput(input, context),\n [_A]: _GGT,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_GetGeneratedTemplateCommand\");\nvar se_GetStackPolicyCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_GetStackPolicyInput(input, context),\n [_A]: _GSP,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_GetStackPolicyCommand\");\nvar se_GetTemplateCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_GetTemplateInput(input, context),\n [_A]: _GT,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_GetTemplateCommand\");\nvar se_GetTemplateSummaryCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_GetTemplateSummaryInput(input, context),\n [_A]: _GTS,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_GetTemplateSummaryCommand\");\nvar se_ImportStacksToStackSetCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_ImportStacksToStackSetInput(input, context),\n [_A]: _ISTSS,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_ImportStacksToStackSetCommand\");\nvar se_ListChangeSetsCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_ListChangeSetsInput(input, context),\n [_A]: _LCS,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_ListChangeSetsCommand\");\nvar se_ListExportsCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_ListExportsInput(input, context),\n [_A]: _LE,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_ListExportsCommand\");\nvar se_ListGeneratedTemplatesCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_ListGeneratedTemplatesInput(input, context),\n [_A]: _LGT,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_ListGeneratedTemplatesCommand\");\nvar se_ListHookResultsCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_ListHookResultsInput(input, context),\n [_A]: _LHR,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_ListHookResultsCommand\");\nvar se_ListImportsCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_ListImportsInput(input, context),\n [_A]: _LI,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_ListImportsCommand\");\nvar se_ListResourceScanRelatedResourcesCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_ListResourceScanRelatedResourcesInput(input, context),\n [_A]: _LRSRR,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_ListResourceScanRelatedResourcesCommand\");\nvar se_ListResourceScanResourcesCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_ListResourceScanResourcesInput(input, context),\n [_A]: _LRSR,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_ListResourceScanResourcesCommand\");\nvar se_ListResourceScansCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_ListResourceScansInput(input, context),\n [_A]: _LRS,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_ListResourceScansCommand\");\nvar se_ListStackInstanceResourceDriftsCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_ListStackInstanceResourceDriftsInput(input, context),\n [_A]: _LSIRD,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_ListStackInstanceResourceDriftsCommand\");\nvar se_ListStackInstancesCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_ListStackInstancesInput(input, context),\n [_A]: _LSI,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_ListStackInstancesCommand\");\nvar se_ListStackRefactorActionsCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_ListStackRefactorActionsInput(input, context),\n [_A]: _LSRA,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_ListStackRefactorActionsCommand\");\nvar se_ListStackRefactorsCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_ListStackRefactorsInput(input, context),\n [_A]: _LSR,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_ListStackRefactorsCommand\");\nvar se_ListStackResourcesCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_ListStackResourcesInput(input, context),\n [_A]: _LSRi,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_ListStackResourcesCommand\");\nvar se_ListStacksCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_ListStacksInput(input, context),\n [_A]: _LS,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_ListStacksCommand\");\nvar se_ListStackSetAutoDeploymentTargetsCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_ListStackSetAutoDeploymentTargetsInput(input, context),\n [_A]: _LSSADT,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_ListStackSetAutoDeploymentTargetsCommand\");\nvar se_ListStackSetOperationResultsCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_ListStackSetOperationResultsInput(input, context),\n [_A]: _LSSOR,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_ListStackSetOperationResultsCommand\");\nvar se_ListStackSetOperationsCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_ListStackSetOperationsInput(input, context),\n [_A]: _LSSO,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_ListStackSetOperationsCommand\");\nvar se_ListStackSetsCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_ListStackSetsInput(input, context),\n [_A]: _LSS,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_ListStackSetsCommand\");\nvar se_ListTypeRegistrationsCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_ListTypeRegistrationsInput(input, context),\n [_A]: _LTR,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_ListTypeRegistrationsCommand\");\nvar se_ListTypesCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_ListTypesInput(input, context),\n [_A]: _LT,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_ListTypesCommand\");\nvar se_ListTypeVersionsCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_ListTypeVersionsInput(input, context),\n [_A]: _LTV,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_ListTypeVersionsCommand\");\nvar se_PublishTypeCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_PublishTypeInput(input, context),\n [_A]: _PT,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_PublishTypeCommand\");\nvar se_RecordHandlerProgressCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_RecordHandlerProgressInput(input, context),\n [_A]: _RHP,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_RecordHandlerProgressCommand\");\nvar se_RegisterPublisherCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_RegisterPublisherInput(input, context),\n [_A]: _RP,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_RegisterPublisherCommand\");\nvar se_RegisterTypeCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_RegisterTypeInput(input, context),\n [_A]: _RT,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_RegisterTypeCommand\");\nvar se_RollbackStackCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_RollbackStackInput(input, context),\n [_A]: _RS,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_RollbackStackCommand\");\nvar se_SetStackPolicyCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_SetStackPolicyInput(input, context),\n [_A]: _SSP,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_SetStackPolicyCommand\");\nvar se_SetTypeConfigurationCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_SetTypeConfigurationInput(input, context),\n [_A]: _STC,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_SetTypeConfigurationCommand\");\nvar se_SetTypeDefaultVersionCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_SetTypeDefaultVersionInput(input, context),\n [_A]: _STDV,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_SetTypeDefaultVersionCommand\");\nvar se_SignalResourceCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_SignalResourceInput(input, context),\n [_A]: _SR,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_SignalResourceCommand\");\nvar se_StartResourceScanCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_StartResourceScanInput(input, context),\n [_A]: _SRS,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_StartResourceScanCommand\");\nvar se_StopStackSetOperationCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_StopStackSetOperationInput(input, context),\n [_A]: _SSSO,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_StopStackSetOperationCommand\");\nvar se_TestTypeCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_TestTypeInput(input, context),\n [_A]: _TT,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_TestTypeCommand\");\nvar se_UpdateGeneratedTemplateCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_UpdateGeneratedTemplateInput(input, context),\n [_A]: _UGT,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_UpdateGeneratedTemplateCommand\");\nvar se_UpdateStackCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_UpdateStackInput(input, context),\n [_A]: _US,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_UpdateStackCommand\");\nvar se_UpdateStackInstancesCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_UpdateStackInstancesInput(input, context),\n [_A]: _USI,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_UpdateStackInstancesCommand\");\nvar se_UpdateStackSetCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_UpdateStackSetInput(input, context),\n [_A]: _USS,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_UpdateStackSetCommand\");\nvar se_UpdateTerminationProtectionCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_UpdateTerminationProtectionInput(input, context),\n [_A]: _UTP,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_UpdateTerminationProtectionCommand\");\nvar se_ValidateTemplateCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_ValidateTemplateInput(input, context),\n [_A]: _VT,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_ValidateTemplateCommand\");\nvar de_ActivateOrganizationsAccessCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_ActivateOrganizationsAccessOutput(data.ActivateOrganizationsAccessResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_ActivateOrganizationsAccessCommand\");\nvar de_ActivateTypeCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_ActivateTypeOutput(data.ActivateTypeResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_ActivateTypeCommand\");\nvar de_BatchDescribeTypeConfigurationsCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_BatchDescribeTypeConfigurationsOutput(data.BatchDescribeTypeConfigurationsResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_BatchDescribeTypeConfigurationsCommand\");\nvar de_CancelUpdateStackCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n await (0, import_smithy_client.collectBody)(output.body, context);\n const response = {\n $metadata: deserializeMetadata(output)\n };\n return response;\n}, \"de_CancelUpdateStackCommand\");\nvar de_ContinueUpdateRollbackCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_ContinueUpdateRollbackOutput(data.ContinueUpdateRollbackResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_ContinueUpdateRollbackCommand\");\nvar de_CreateChangeSetCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_CreateChangeSetOutput(data.CreateChangeSetResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_CreateChangeSetCommand\");\nvar de_CreateGeneratedTemplateCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_CreateGeneratedTemplateOutput(data.CreateGeneratedTemplateResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_CreateGeneratedTemplateCommand\");\nvar de_CreateStackCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_CreateStackOutput(data.CreateStackResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_CreateStackCommand\");\nvar de_CreateStackInstancesCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_CreateStackInstancesOutput(data.CreateStackInstancesResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_CreateStackInstancesCommand\");\nvar de_CreateStackRefactorCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_CreateStackRefactorOutput(data.CreateStackRefactorResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_CreateStackRefactorCommand\");\nvar de_CreateStackSetCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_CreateStackSetOutput(data.CreateStackSetResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_CreateStackSetCommand\");\nvar de_DeactivateOrganizationsAccessCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_DeactivateOrganizationsAccessOutput(data.DeactivateOrganizationsAccessResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_DeactivateOrganizationsAccessCommand\");\nvar de_DeactivateTypeCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_DeactivateTypeOutput(data.DeactivateTypeResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_DeactivateTypeCommand\");\nvar de_DeleteChangeSetCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_DeleteChangeSetOutput(data.DeleteChangeSetResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_DeleteChangeSetCommand\");\nvar de_DeleteGeneratedTemplateCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n await (0, import_smithy_client.collectBody)(output.body, context);\n const response = {\n $metadata: deserializeMetadata(output)\n };\n return response;\n}, \"de_DeleteGeneratedTemplateCommand\");\nvar de_DeleteStackCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n await (0, import_smithy_client.collectBody)(output.body, context);\n const response = {\n $metadata: deserializeMetadata(output)\n };\n return response;\n}, \"de_DeleteStackCommand\");\nvar de_DeleteStackInstancesCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_DeleteStackInstancesOutput(data.DeleteStackInstancesResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_DeleteStackInstancesCommand\");\nvar de_DeleteStackSetCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_DeleteStackSetOutput(data.DeleteStackSetResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_DeleteStackSetCommand\");\nvar de_DeregisterTypeCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_DeregisterTypeOutput(data.DeregisterTypeResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_DeregisterTypeCommand\");\nvar de_DescribeAccountLimitsCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_DescribeAccountLimitsOutput(data.DescribeAccountLimitsResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_DescribeAccountLimitsCommand\");\nvar de_DescribeChangeSetCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_DescribeChangeSetOutput(data.DescribeChangeSetResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_DescribeChangeSetCommand\");\nvar de_DescribeChangeSetHooksCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_DescribeChangeSetHooksOutput(data.DescribeChangeSetHooksResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_DescribeChangeSetHooksCommand\");\nvar de_DescribeGeneratedTemplateCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_DescribeGeneratedTemplateOutput(data.DescribeGeneratedTemplateResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_DescribeGeneratedTemplateCommand\");\nvar de_DescribeOrganizationsAccessCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_DescribeOrganizationsAccessOutput(data.DescribeOrganizationsAccessResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_DescribeOrganizationsAccessCommand\");\nvar de_DescribePublisherCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_DescribePublisherOutput(data.DescribePublisherResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_DescribePublisherCommand\");\nvar de_DescribeResourceScanCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_DescribeResourceScanOutput(data.DescribeResourceScanResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_DescribeResourceScanCommand\");\nvar de_DescribeStackDriftDetectionStatusCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_DescribeStackDriftDetectionStatusOutput(data.DescribeStackDriftDetectionStatusResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_DescribeStackDriftDetectionStatusCommand\");\nvar de_DescribeStackEventsCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_DescribeStackEventsOutput(data.DescribeStackEventsResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_DescribeStackEventsCommand\");\nvar de_DescribeStackInstanceCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_DescribeStackInstanceOutput(data.DescribeStackInstanceResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_DescribeStackInstanceCommand\");\nvar de_DescribeStackRefactorCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_DescribeStackRefactorOutput(data.DescribeStackRefactorResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_DescribeStackRefactorCommand\");\nvar de_DescribeStackResourceCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_DescribeStackResourceOutput(data.DescribeStackResourceResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_DescribeStackResourceCommand\");\nvar de_DescribeStackResourceDriftsCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_DescribeStackResourceDriftsOutput(data.DescribeStackResourceDriftsResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_DescribeStackResourceDriftsCommand\");\nvar de_DescribeStackResourcesCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_DescribeStackResourcesOutput(data.DescribeStackResourcesResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_DescribeStackResourcesCommand\");\nvar de_DescribeStacksCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_DescribeStacksOutput(data.DescribeStacksResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_DescribeStacksCommand\");\nvar de_DescribeStackSetCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_DescribeStackSetOutput(data.DescribeStackSetResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_DescribeStackSetCommand\");\nvar de_DescribeStackSetOperationCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_DescribeStackSetOperationOutput(data.DescribeStackSetOperationResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_DescribeStackSetOperationCommand\");\nvar de_DescribeTypeCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_DescribeTypeOutput(data.DescribeTypeResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_DescribeTypeCommand\");\nvar de_DescribeTypeRegistrationCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_DescribeTypeRegistrationOutput(data.DescribeTypeRegistrationResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_DescribeTypeRegistrationCommand\");\nvar de_DetectStackDriftCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_DetectStackDriftOutput(data.DetectStackDriftResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_DetectStackDriftCommand\");\nvar de_DetectStackResourceDriftCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_DetectStackResourceDriftOutput(data.DetectStackResourceDriftResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_DetectStackResourceDriftCommand\");\nvar de_DetectStackSetDriftCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_DetectStackSetDriftOutput(data.DetectStackSetDriftResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_DetectStackSetDriftCommand\");\nvar de_EstimateTemplateCostCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_EstimateTemplateCostOutput(data.EstimateTemplateCostResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_EstimateTemplateCostCommand\");\nvar de_ExecuteChangeSetCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_ExecuteChangeSetOutput(data.ExecuteChangeSetResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_ExecuteChangeSetCommand\");\nvar de_ExecuteStackRefactorCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n await (0, import_smithy_client.collectBody)(output.body, context);\n const response = {\n $metadata: deserializeMetadata(output)\n };\n return response;\n}, \"de_ExecuteStackRefactorCommand\");\nvar de_GetGeneratedTemplateCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_GetGeneratedTemplateOutput(data.GetGeneratedTemplateResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_GetGeneratedTemplateCommand\");\nvar de_GetStackPolicyCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_GetStackPolicyOutput(data.GetStackPolicyResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_GetStackPolicyCommand\");\nvar de_GetTemplateCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_GetTemplateOutput(data.GetTemplateResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_GetTemplateCommand\");\nvar de_GetTemplateSummaryCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_GetTemplateSummaryOutput(data.GetTemplateSummaryResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_GetTemplateSummaryCommand\");\nvar de_ImportStacksToStackSetCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_ImportStacksToStackSetOutput(data.ImportStacksToStackSetResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_ImportStacksToStackSetCommand\");\nvar de_ListChangeSetsCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_ListChangeSetsOutput(data.ListChangeSetsResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_ListChangeSetsCommand\");\nvar de_ListExportsCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_ListExportsOutput(data.ListExportsResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_ListExportsCommand\");\nvar de_ListGeneratedTemplatesCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_ListGeneratedTemplatesOutput(data.ListGeneratedTemplatesResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_ListGeneratedTemplatesCommand\");\nvar de_ListHookResultsCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_ListHookResultsOutput(data.ListHookResultsResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_ListHookResultsCommand\");\nvar de_ListImportsCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_ListImportsOutput(data.ListImportsResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_ListImportsCommand\");\nvar de_ListResourceScanRelatedResourcesCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_ListResourceScanRelatedResourcesOutput(data.ListResourceScanRelatedResourcesResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_ListResourceScanRelatedResourcesCommand\");\nvar de_ListResourceScanResourcesCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_ListResourceScanResourcesOutput(data.ListResourceScanResourcesResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_ListResourceScanResourcesCommand\");\nvar de_ListResourceScansCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_ListResourceScansOutput(data.ListResourceScansResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_ListResourceScansCommand\");\nvar de_ListStackInstanceResourceDriftsCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_ListStackInstanceResourceDriftsOutput(data.ListStackInstanceResourceDriftsResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_ListStackInstanceResourceDriftsCommand\");\nvar de_ListStackInstancesCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_ListStackInstancesOutput(data.ListStackInstancesResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_ListStackInstancesCommand\");\nvar de_ListStackRefactorActionsCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_ListStackRefactorActionsOutput(data.ListStackRefactorActionsResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_ListStackRefactorActionsCommand\");\nvar de_ListStackRefactorsCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_ListStackRefactorsOutput(data.ListStackRefactorsResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_ListStackRefactorsCommand\");\nvar de_ListStackResourcesCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_ListStackResourcesOutput(data.ListStackResourcesResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_ListStackResourcesCommand\");\nvar de_ListStacksCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_ListStacksOutput(data.ListStacksResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_ListStacksCommand\");\nvar de_ListStackSetAutoDeploymentTargetsCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_ListStackSetAutoDeploymentTargetsOutput(data.ListStackSetAutoDeploymentTargetsResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_ListStackSetAutoDeploymentTargetsCommand\");\nvar de_ListStackSetOperationResultsCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_ListStackSetOperationResultsOutput(data.ListStackSetOperationResultsResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_ListStackSetOperationResultsCommand\");\nvar de_ListStackSetOperationsCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_ListStackSetOperationsOutput(data.ListStackSetOperationsResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_ListStackSetOperationsCommand\");\nvar de_ListStackSetsCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_ListStackSetsOutput(data.ListStackSetsResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_ListStackSetsCommand\");\nvar de_ListTypeRegistrationsCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_ListTypeRegistrationsOutput(data.ListTypeRegistrationsResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_ListTypeRegistrationsCommand\");\nvar de_ListTypesCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_ListTypesOutput(data.ListTypesResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_ListTypesCommand\");\nvar de_ListTypeVersionsCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_ListTypeVersionsOutput(data.ListTypeVersionsResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_ListTypeVersionsCommand\");\nvar de_PublishTypeCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_PublishTypeOutput(data.PublishTypeResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_PublishTypeCommand\");\nvar de_RecordHandlerProgressCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_RecordHandlerProgressOutput(data.RecordHandlerProgressResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_RecordHandlerProgressCommand\");\nvar de_RegisterPublisherCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_RegisterPublisherOutput(data.RegisterPublisherResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_RegisterPublisherCommand\");\nvar de_RegisterTypeCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_RegisterTypeOutput(data.RegisterTypeResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_RegisterTypeCommand\");\nvar de_RollbackStackCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_RollbackStackOutput(data.RollbackStackResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_RollbackStackCommand\");\nvar de_SetStackPolicyCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n await (0, import_smithy_client.collectBody)(output.body, context);\n const response = {\n $metadata: deserializeMetadata(output)\n };\n return response;\n}, \"de_SetStackPolicyCommand\");\nvar de_SetTypeConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_SetTypeConfigurationOutput(data.SetTypeConfigurationResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_SetTypeConfigurationCommand\");\nvar de_SetTypeDefaultVersionCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_SetTypeDefaultVersionOutput(data.SetTypeDefaultVersionResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_SetTypeDefaultVersionCommand\");\nvar de_SignalResourceCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n await (0, import_smithy_client.collectBody)(output.body, context);\n const response = {\n $metadata: deserializeMetadata(output)\n };\n return response;\n}, \"de_SignalResourceCommand\");\nvar de_StartResourceScanCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_StartResourceScanOutput(data.StartResourceScanResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_StartResourceScanCommand\");\nvar de_StopStackSetOperationCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_StopStackSetOperationOutput(data.StopStackSetOperationResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_StopStackSetOperationCommand\");\nvar de_TestTypeCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_TestTypeOutput(data.TestTypeResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_TestTypeCommand\");\nvar de_UpdateGeneratedTemplateCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_UpdateGeneratedTemplateOutput(data.UpdateGeneratedTemplateResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_UpdateGeneratedTemplateCommand\");\nvar de_UpdateStackCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_UpdateStackOutput(data.UpdateStackResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_UpdateStackCommand\");\nvar de_UpdateStackInstancesCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_UpdateStackInstancesOutput(data.UpdateStackInstancesResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_UpdateStackInstancesCommand\");\nvar de_UpdateStackSetCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_UpdateStackSetOutput(data.UpdateStackSetResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_UpdateStackSetCommand\");\nvar de_UpdateTerminationProtectionCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_UpdateTerminationProtectionOutput(data.UpdateTerminationProtectionResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_UpdateTerminationProtectionCommand\");\nvar de_ValidateTemplateCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_ValidateTemplateOutput(data.ValidateTemplateResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_ValidateTemplateCommand\");\nvar de_CommandError = /* @__PURE__ */ __name(async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await (0, import_core2.parseXmlErrorBody)(output.body, context)\n };\n const errorCode = loadQueryErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"InvalidOperationException\":\n case \"com.amazonaws.cloudformation#InvalidOperationException\":\n throw await de_InvalidOperationExceptionRes(parsedOutput, context);\n case \"OperationNotFoundException\":\n case \"com.amazonaws.cloudformation#OperationNotFoundException\":\n throw await de_OperationNotFoundExceptionRes(parsedOutput, context);\n case \"CFNRegistryException\":\n case \"com.amazonaws.cloudformation#CFNRegistryException\":\n throw await de_CFNRegistryExceptionRes(parsedOutput, context);\n case \"TypeNotFoundException\":\n case \"com.amazonaws.cloudformation#TypeNotFoundException\":\n throw await de_TypeNotFoundExceptionRes(parsedOutput, context);\n case \"TypeConfigurationNotFoundException\":\n case \"com.amazonaws.cloudformation#TypeConfigurationNotFoundException\":\n throw await de_TypeConfigurationNotFoundExceptionRes(parsedOutput, context);\n case \"TokenAlreadyExistsException\":\n case \"com.amazonaws.cloudformation#TokenAlreadyExistsException\":\n throw await de_TokenAlreadyExistsExceptionRes(parsedOutput, context);\n case \"AlreadyExistsException\":\n case \"com.amazonaws.cloudformation#AlreadyExistsException\":\n throw await de_AlreadyExistsExceptionRes(parsedOutput, context);\n case \"InsufficientCapabilitiesException\":\n case \"com.amazonaws.cloudformation#InsufficientCapabilitiesException\":\n throw await de_InsufficientCapabilitiesExceptionRes(parsedOutput, context);\n case \"LimitExceededException\":\n case \"com.amazonaws.cloudformation#LimitExceededException\":\n throw await de_LimitExceededExceptionRes(parsedOutput, context);\n case \"ConcurrentResourcesLimitExceeded\":\n case \"com.amazonaws.cloudformation#ConcurrentResourcesLimitExceededException\":\n throw await de_ConcurrentResourcesLimitExceededExceptionRes(parsedOutput, context);\n case \"OperationIdAlreadyExistsException\":\n case \"com.amazonaws.cloudformation#OperationIdAlreadyExistsException\":\n throw await de_OperationIdAlreadyExistsExceptionRes(parsedOutput, context);\n case \"OperationInProgressException\":\n case \"com.amazonaws.cloudformation#OperationInProgressException\":\n throw await de_OperationInProgressExceptionRes(parsedOutput, context);\n case \"StackSetNotFoundException\":\n case \"com.amazonaws.cloudformation#StackSetNotFoundException\":\n throw await de_StackSetNotFoundExceptionRes(parsedOutput, context);\n case \"StaleRequestException\":\n case \"com.amazonaws.cloudformation#StaleRequestException\":\n throw await de_StaleRequestExceptionRes(parsedOutput, context);\n case \"CreatedButModifiedException\":\n case \"com.amazonaws.cloudformation#CreatedButModifiedException\":\n throw await de_CreatedButModifiedExceptionRes(parsedOutput, context);\n case \"NameAlreadyExistsException\":\n case \"com.amazonaws.cloudformation#NameAlreadyExistsException\":\n throw await de_NameAlreadyExistsExceptionRes(parsedOutput, context);\n case \"InvalidChangeSetStatus\":\n case \"com.amazonaws.cloudformation#InvalidChangeSetStatusException\":\n throw await de_InvalidChangeSetStatusExceptionRes(parsedOutput, context);\n case \"GeneratedTemplateNotFound\":\n case \"com.amazonaws.cloudformation#GeneratedTemplateNotFoundException\":\n throw await de_GeneratedTemplateNotFoundExceptionRes(parsedOutput, context);\n case \"StackSetNotEmptyException\":\n case \"com.amazonaws.cloudformation#StackSetNotEmptyException\":\n throw await de_StackSetNotEmptyExceptionRes(parsedOutput, context);\n case \"ChangeSetNotFound\":\n case \"com.amazonaws.cloudformation#ChangeSetNotFoundException\":\n throw await de_ChangeSetNotFoundExceptionRes(parsedOutput, context);\n case \"ResourceScanNotFound\":\n case \"com.amazonaws.cloudformation#ResourceScanNotFoundException\":\n throw await de_ResourceScanNotFoundExceptionRes(parsedOutput, context);\n case \"StackInstanceNotFoundException\":\n case \"com.amazonaws.cloudformation#StackInstanceNotFoundException\":\n throw await de_StackInstanceNotFoundExceptionRes(parsedOutput, context);\n case \"StackRefactorNotFoundException\":\n case \"com.amazonaws.cloudformation#StackRefactorNotFoundException\":\n throw await de_StackRefactorNotFoundExceptionRes(parsedOutput, context);\n case \"StackNotFoundException\":\n case \"com.amazonaws.cloudformation#StackNotFoundException\":\n throw await de_StackNotFoundExceptionRes(parsedOutput, context);\n case \"HookResultNotFound\":\n case \"com.amazonaws.cloudformation#HookResultNotFoundException\":\n throw await de_HookResultNotFoundExceptionRes(parsedOutput, context);\n case \"ResourceScanInProgress\":\n case \"com.amazonaws.cloudformation#ResourceScanInProgressException\":\n throw await de_ResourceScanInProgressExceptionRes(parsedOutput, context);\n case \"ConditionalCheckFailed\":\n case \"com.amazonaws.cloudformation#OperationStatusCheckFailedException\":\n throw await de_OperationStatusCheckFailedExceptionRes(parsedOutput, context);\n case \"InvalidStateTransition\":\n case \"com.amazonaws.cloudformation#InvalidStateTransitionException\":\n throw await de_InvalidStateTransitionExceptionRes(parsedOutput, context);\n case \"ResourceScanLimitExceeded\":\n case \"com.amazonaws.cloudformation#ResourceScanLimitExceededException\":\n throw await de_ResourceScanLimitExceededExceptionRes(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n return throwDefaultError({\n output,\n parsedBody: parsedBody.Error,\n errorCode\n });\n }\n}, \"de_CommandError\");\nvar de_AlreadyExistsExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_AlreadyExistsException(body.Error, context);\n const exception = new AlreadyExistsException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_AlreadyExistsExceptionRes\");\nvar de_CFNRegistryExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_CFNRegistryException(body.Error, context);\n const exception = new CFNRegistryException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_CFNRegistryExceptionRes\");\nvar de_ChangeSetNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_ChangeSetNotFoundException(body.Error, context);\n const exception = new ChangeSetNotFoundException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_ChangeSetNotFoundExceptionRes\");\nvar de_ConcurrentResourcesLimitExceededExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_ConcurrentResourcesLimitExceededException(body.Error, context);\n const exception = new ConcurrentResourcesLimitExceededException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_ConcurrentResourcesLimitExceededExceptionRes\");\nvar de_CreatedButModifiedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_CreatedButModifiedException(body.Error, context);\n const exception = new CreatedButModifiedException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_CreatedButModifiedExceptionRes\");\nvar de_GeneratedTemplateNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_GeneratedTemplateNotFoundException(body.Error, context);\n const exception = new GeneratedTemplateNotFoundException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_GeneratedTemplateNotFoundExceptionRes\");\nvar de_HookResultNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_HookResultNotFoundException(body.Error, context);\n const exception = new HookResultNotFoundException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_HookResultNotFoundExceptionRes\");\nvar de_InsufficientCapabilitiesExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_InsufficientCapabilitiesException(body.Error, context);\n const exception = new InsufficientCapabilitiesException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_InsufficientCapabilitiesExceptionRes\");\nvar de_InvalidChangeSetStatusExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_InvalidChangeSetStatusException(body.Error, context);\n const exception = new InvalidChangeSetStatusException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_InvalidChangeSetStatusExceptionRes\");\nvar de_InvalidOperationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_InvalidOperationException(body.Error, context);\n const exception = new InvalidOperationException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_InvalidOperationExceptionRes\");\nvar de_InvalidStateTransitionExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_InvalidStateTransitionException(body.Error, context);\n const exception = new InvalidStateTransitionException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_InvalidStateTransitionExceptionRes\");\nvar de_LimitExceededExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_LimitExceededException(body.Error, context);\n const exception = new LimitExceededException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_LimitExceededExceptionRes\");\nvar de_NameAlreadyExistsExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_NameAlreadyExistsException(body.Error, context);\n const exception = new NameAlreadyExistsException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_NameAlreadyExistsExceptionRes\");\nvar de_OperationIdAlreadyExistsExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_OperationIdAlreadyExistsException(body.Error, context);\n const exception = new OperationIdAlreadyExistsException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_OperationIdAlreadyExistsExceptionRes\");\nvar de_OperationInProgressExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_OperationInProgressException(body.Error, context);\n const exception = new OperationInProgressException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_OperationInProgressExceptionRes\");\nvar de_OperationNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_OperationNotFoundException(body.Error, context);\n const exception = new OperationNotFoundException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_OperationNotFoundExceptionRes\");\nvar de_OperationStatusCheckFailedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_OperationStatusCheckFailedException(body.Error, context);\n const exception = new OperationStatusCheckFailedException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_OperationStatusCheckFailedExceptionRes\");\nvar de_ResourceScanInProgressExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_ResourceScanInProgressException(body.Error, context);\n const exception = new ResourceScanInProgressException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_ResourceScanInProgressExceptionRes\");\nvar de_ResourceScanLimitExceededExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_ResourceScanLimitExceededException(body.Error, context);\n const exception = new ResourceScanLimitExceededException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_ResourceScanLimitExceededExceptionRes\");\nvar de_ResourceScanNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_ResourceScanNotFoundException(body.Error, context);\n const exception = new ResourceScanNotFoundException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_ResourceScanNotFoundExceptionRes\");\nvar de_StackInstanceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_StackInstanceNotFoundException(body.Error, context);\n const exception = new StackInstanceNotFoundException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_StackInstanceNotFoundExceptionRes\");\nvar de_StackNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_StackNotFoundException(body.Error, context);\n const exception = new StackNotFoundException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_StackNotFoundExceptionRes\");\nvar de_StackRefactorNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_StackRefactorNotFoundException(body.Error, context);\n const exception = new StackRefactorNotFoundException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_StackRefactorNotFoundExceptionRes\");\nvar de_StackSetNotEmptyExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_StackSetNotEmptyException(body.Error, context);\n const exception = new StackSetNotEmptyException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_StackSetNotEmptyExceptionRes\");\nvar de_StackSetNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_StackSetNotFoundException(body.Error, context);\n const exception = new StackSetNotFoundException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_StackSetNotFoundExceptionRes\");\nvar de_StaleRequestExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_StaleRequestException(body.Error, context);\n const exception = new StaleRequestException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_StaleRequestExceptionRes\");\nvar de_TokenAlreadyExistsExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_TokenAlreadyExistsException(body.Error, context);\n const exception = new TokenAlreadyExistsException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_TokenAlreadyExistsExceptionRes\");\nvar de_TypeConfigurationNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_TypeConfigurationNotFoundException(body.Error, context);\n const exception = new TypeConfigurationNotFoundException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_TypeConfigurationNotFoundExceptionRes\");\nvar de_TypeNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_TypeNotFoundException(body.Error, context);\n const exception = new TypeNotFoundException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_TypeNotFoundExceptionRes\");\nvar se_AccountList = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n entries[`member.${counter}`] = entry;\n counter++;\n }\n return entries;\n}, \"se_AccountList\");\nvar se_ActivateOrganizationsAccessInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n return entries;\n}, \"se_ActivateOrganizationsAccessInput\");\nvar se_ActivateTypeInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_T] != null) {\n entries[_T] = input[_T];\n }\n if (input[_PTA] != null) {\n entries[_PTA] = input[_PTA];\n }\n if (input[_PI] != null) {\n entries[_PI] = input[_PI];\n }\n if (input[_TN] != null) {\n entries[_TN] = input[_TN];\n }\n if (input[_TNA] != null) {\n entries[_TNA] = input[_TNA];\n }\n if (input[_AU] != null) {\n entries[_AU] = input[_AU];\n }\n if (input[_LC] != null) {\n const memberEntries = se_LoggingConfig(input[_LC], context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `LoggingConfig.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_ERA] != null) {\n entries[_ERA] = input[_ERA];\n }\n if (input[_VB] != null) {\n entries[_VB] = input[_VB];\n }\n if (input[_MV] != null) {\n entries[_MV] = input[_MV];\n }\n return entries;\n}, \"se_ActivateTypeInput\");\nvar se_AutoDeployment = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_E] != null) {\n entries[_E] = input[_E];\n }\n if (input[_RSOAR] != null) {\n entries[_RSOAR] = input[_RSOAR];\n }\n return entries;\n}, \"se_AutoDeployment\");\nvar se_BatchDescribeTypeConfigurationsInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_TCI] != null) {\n const memberEntries = se_TypeConfigurationIdentifiers(input[_TCI], context);\n if (input[_TCI]?.length === 0) {\n entries.TypeConfigurationIdentifiers = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `TypeConfigurationIdentifiers.${key}`;\n entries[loc] = value;\n });\n }\n return entries;\n}, \"se_BatchDescribeTypeConfigurationsInput\");\nvar se_CancelUpdateStackInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SN] != null) {\n entries[_SN] = input[_SN];\n }\n if (input[_CRT] != null) {\n entries[_CRT] = input[_CRT];\n }\n return entries;\n}, \"se_CancelUpdateStackInput\");\nvar se_Capabilities = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n entries[`member.${counter}`] = entry;\n counter++;\n }\n return entries;\n}, \"se_Capabilities\");\nvar se_ContinueUpdateRollbackInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SN] != null) {\n entries[_SN] = input[_SN];\n }\n if (input[_RARN] != null) {\n entries[_RARN] = input[_RARN];\n }\n if (input[_RTS] != null) {\n const memberEntries = se_ResourcesToSkip(input[_RTS], context);\n if (input[_RTS]?.length === 0) {\n entries.ResourcesToSkip = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `ResourcesToSkip.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_CRT] != null) {\n entries[_CRT] = input[_CRT];\n }\n return entries;\n}, \"se_ContinueUpdateRollbackInput\");\nvar se_CreateChangeSetInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SN] != null) {\n entries[_SN] = input[_SN];\n }\n if (input[_TB] != null) {\n entries[_TB] = input[_TB];\n }\n if (input[_TURL] != null) {\n entries[_TURL] = input[_TURL];\n }\n if (input[_UPT] != null) {\n entries[_UPT] = input[_UPT];\n }\n if (input[_P] != null) {\n const memberEntries = se_Parameters(input[_P], context);\n if (input[_P]?.length === 0) {\n entries.Parameters = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Parameters.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_C] != null) {\n const memberEntries = se_Capabilities(input[_C], context);\n if (input[_C]?.length === 0) {\n entries.Capabilities = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Capabilities.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_RTe] != null) {\n const memberEntries = se_ResourceTypes(input[_RTe], context);\n if (input[_RTe]?.length === 0) {\n entries.ResourceTypes = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `ResourceTypes.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_RARN] != null) {\n entries[_RARN] = input[_RARN];\n }\n if (input[_RC] != null) {\n const memberEntries = se_RollbackConfiguration(input[_RC], context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `RollbackConfiguration.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_NARN] != null) {\n const memberEntries = se_NotificationARNs(input[_NARN], context);\n if (input[_NARN]?.length === 0) {\n entries.NotificationARNs = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `NotificationARNs.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_Ta] != null) {\n const memberEntries = se_Tags(input[_Ta], context);\n if (input[_Ta]?.length === 0) {\n entries.Tags = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Tags.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_CSN] != null) {\n entries[_CSN] = input[_CSN];\n }\n if (input[_CT] != null) {\n entries[_CT] = input[_CT];\n }\n if (input[_D] != null) {\n entries[_D] = input[_D];\n }\n if (input[_CST] != null) {\n entries[_CST] = input[_CST];\n }\n if (input[_RTI] != null) {\n const memberEntries = se_ResourcesToImport(input[_RTI], context);\n if (input[_RTI]?.length === 0) {\n entries.ResourcesToImport = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `ResourcesToImport.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_INS] != null) {\n entries[_INS] = input[_INS];\n }\n if (input[_OSF] != null) {\n entries[_OSF] = input[_OSF];\n }\n if (input[_IER] != null) {\n entries[_IER] = input[_IER];\n }\n return entries;\n}, \"se_CreateChangeSetInput\");\nvar se_CreateGeneratedTemplateInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_R] != null) {\n const memberEntries = se_ResourceDefinitions(input[_R], context);\n if (input[_R]?.length === 0) {\n entries.Resources = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Resources.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_GTN] != null) {\n entries[_GTN] = input[_GTN];\n }\n if (input[_SN] != null) {\n entries[_SN] = input[_SN];\n }\n if (input[_TC] != null) {\n const memberEntries = se_TemplateConfiguration(input[_TC], context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `TemplateConfiguration.${key}`;\n entries[loc] = value;\n });\n }\n return entries;\n}, \"se_CreateGeneratedTemplateInput\");\nvar se_CreateStackInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SN] != null) {\n entries[_SN] = input[_SN];\n }\n if (input[_TB] != null) {\n entries[_TB] = input[_TB];\n }\n if (input[_TURL] != null) {\n entries[_TURL] = input[_TURL];\n }\n if (input[_P] != null) {\n const memberEntries = se_Parameters(input[_P], context);\n if (input[_P]?.length === 0) {\n entries.Parameters = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Parameters.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_DR] != null) {\n entries[_DR] = input[_DR];\n }\n if (input[_RC] != null) {\n const memberEntries = se_RollbackConfiguration(input[_RC], context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `RollbackConfiguration.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_TIM] != null) {\n entries[_TIM] = input[_TIM];\n }\n if (input[_NARN] != null) {\n const memberEntries = se_NotificationARNs(input[_NARN], context);\n if (input[_NARN]?.length === 0) {\n entries.NotificationARNs = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `NotificationARNs.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_C] != null) {\n const memberEntries = se_Capabilities(input[_C], context);\n if (input[_C]?.length === 0) {\n entries.Capabilities = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Capabilities.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_RTe] != null) {\n const memberEntries = se_ResourceTypes(input[_RTe], context);\n if (input[_RTe]?.length === 0) {\n entries.ResourceTypes = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `ResourceTypes.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_RARN] != null) {\n entries[_RARN] = input[_RARN];\n }\n if (input[_OF] != null) {\n entries[_OF] = input[_OF];\n }\n if (input[_SPB] != null) {\n entries[_SPB] = input[_SPB];\n }\n if (input[_SPURL] != null) {\n entries[_SPURL] = input[_SPURL];\n }\n if (input[_Ta] != null) {\n const memberEntries = se_Tags(input[_Ta], context);\n if (input[_Ta]?.length === 0) {\n entries.Tags = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Tags.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_CRT] != null) {\n entries[_CRT] = input[_CRT];\n }\n if (input[_ETP] != null) {\n entries[_ETP] = input[_ETP];\n }\n if (input[_REOC] != null) {\n entries[_REOC] = input[_REOC];\n }\n return entries;\n}, \"se_CreateStackInput\");\nvar se_CreateStackInstancesInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SSN] != null) {\n entries[_SSN] = input[_SSN];\n }\n if (input[_Ac] != null) {\n const memberEntries = se_AccountList(input[_Ac], context);\n if (input[_Ac]?.length === 0) {\n entries.Accounts = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Accounts.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_DTep] != null) {\n const memberEntries = se_DeploymentTargets(input[_DTep], context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `DeploymentTargets.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_Re] != null) {\n const memberEntries = se_RegionList(input[_Re], context);\n if (input[_Re]?.length === 0) {\n entries.Regions = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Regions.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_PO] != null) {\n const memberEntries = se_Parameters(input[_PO], context);\n if (input[_PO]?.length === 0) {\n entries.ParameterOverrides = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `ParameterOverrides.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_OP] != null) {\n const memberEntries = se_StackSetOperationPreferences(input[_OP], context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `OperationPreferences.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_OI] === void 0) {\n input[_OI] = (0, import_uuid.v4)();\n }\n if (input[_OI] != null) {\n entries[_OI] = input[_OI];\n }\n if (input[_CA] != null) {\n entries[_CA] = input[_CA];\n }\n return entries;\n}, \"se_CreateStackInstancesInput\");\nvar se_CreateStackRefactorInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_D] != null) {\n entries[_D] = input[_D];\n }\n if (input[_ESC] != null) {\n entries[_ESC] = input[_ESC];\n }\n if (input[_RM] != null) {\n const memberEntries = se_ResourceMappings(input[_RM], context);\n if (input[_RM]?.length === 0) {\n entries.ResourceMappings = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `ResourceMappings.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_SD] != null) {\n const memberEntries = se_StackDefinitions(input[_SD], context);\n if (input[_SD]?.length === 0) {\n entries.StackDefinitions = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `StackDefinitions.${key}`;\n entries[loc] = value;\n });\n }\n return entries;\n}, \"se_CreateStackRefactorInput\");\nvar se_CreateStackSetInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SSN] != null) {\n entries[_SSN] = input[_SSN];\n }\n if (input[_D] != null) {\n entries[_D] = input[_D];\n }\n if (input[_TB] != null) {\n entries[_TB] = input[_TB];\n }\n if (input[_TURL] != null) {\n entries[_TURL] = input[_TURL];\n }\n if (input[_SI] != null) {\n entries[_SI] = input[_SI];\n }\n if (input[_P] != null) {\n const memberEntries = se_Parameters(input[_P], context);\n if (input[_P]?.length === 0) {\n entries.Parameters = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Parameters.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_C] != null) {\n const memberEntries = se_Capabilities(input[_C], context);\n if (input[_C]?.length === 0) {\n entries.Capabilities = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Capabilities.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_Ta] != null) {\n const memberEntries = se_Tags(input[_Ta], context);\n if (input[_Ta]?.length === 0) {\n entries.Tags = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Tags.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_ARARN] != null) {\n entries[_ARARN] = input[_ARARN];\n }\n if (input[_ERN] != null) {\n entries[_ERN] = input[_ERN];\n }\n if (input[_PM] != null) {\n entries[_PM] = input[_PM];\n }\n if (input[_AD] != null) {\n const memberEntries = se_AutoDeployment(input[_AD], context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `AutoDeployment.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_CA] != null) {\n entries[_CA] = input[_CA];\n }\n if (input[_CRT] === void 0) {\n input[_CRT] = (0, import_uuid.v4)();\n }\n if (input[_CRT] != null) {\n entries[_CRT] = input[_CRT];\n }\n if (input[_ME] != null) {\n const memberEntries = se_ManagedExecution(input[_ME], context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `ManagedExecution.${key}`;\n entries[loc] = value;\n });\n }\n return entries;\n}, \"se_CreateStackSetInput\");\nvar se_DeactivateOrganizationsAccessInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n return entries;\n}, \"se_DeactivateOrganizationsAccessInput\");\nvar se_DeactivateTypeInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_TN] != null) {\n entries[_TN] = input[_TN];\n }\n if (input[_T] != null) {\n entries[_T] = input[_T];\n }\n if (input[_Ar] != null) {\n entries[_Ar] = input[_Ar];\n }\n return entries;\n}, \"se_DeactivateTypeInput\");\nvar se_DeleteChangeSetInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_CSN] != null) {\n entries[_CSN] = input[_CSN];\n }\n if (input[_SN] != null) {\n entries[_SN] = input[_SN];\n }\n return entries;\n}, \"se_DeleteChangeSetInput\");\nvar se_DeleteGeneratedTemplateInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_GTN] != null) {\n entries[_GTN] = input[_GTN];\n }\n return entries;\n}, \"se_DeleteGeneratedTemplateInput\");\nvar se_DeleteStackInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SN] != null) {\n entries[_SN] = input[_SN];\n }\n if (input[_RR] != null) {\n const memberEntries = se_RetainResources(input[_RR], context);\n if (input[_RR]?.length === 0) {\n entries.RetainResources = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `RetainResources.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_RARN] != null) {\n entries[_RARN] = input[_RARN];\n }\n if (input[_CRT] != null) {\n entries[_CRT] = input[_CRT];\n }\n if (input[_DM] != null) {\n entries[_DM] = input[_DM];\n }\n return entries;\n}, \"se_DeleteStackInput\");\nvar se_DeleteStackInstancesInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SSN] != null) {\n entries[_SSN] = input[_SSN];\n }\n if (input[_Ac] != null) {\n const memberEntries = se_AccountList(input[_Ac], context);\n if (input[_Ac]?.length === 0) {\n entries.Accounts = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Accounts.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_DTep] != null) {\n const memberEntries = se_DeploymentTargets(input[_DTep], context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `DeploymentTargets.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_Re] != null) {\n const memberEntries = se_RegionList(input[_Re], context);\n if (input[_Re]?.length === 0) {\n entries.Regions = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Regions.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_OP] != null) {\n const memberEntries = se_StackSetOperationPreferences(input[_OP], context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `OperationPreferences.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_RSe] != null) {\n entries[_RSe] = input[_RSe];\n }\n if (input[_OI] === void 0) {\n input[_OI] = (0, import_uuid.v4)();\n }\n if (input[_OI] != null) {\n entries[_OI] = input[_OI];\n }\n if (input[_CA] != null) {\n entries[_CA] = input[_CA];\n }\n return entries;\n}, \"se_DeleteStackInstancesInput\");\nvar se_DeleteStackSetInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SSN] != null) {\n entries[_SSN] = input[_SSN];\n }\n if (input[_CA] != null) {\n entries[_CA] = input[_CA];\n }\n return entries;\n}, \"se_DeleteStackSetInput\");\nvar se_DeploymentTargets = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_Ac] != null) {\n const memberEntries = se_AccountList(input[_Ac], context);\n if (input[_Ac]?.length === 0) {\n entries.Accounts = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Accounts.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_AUc] != null) {\n entries[_AUc] = input[_AUc];\n }\n if (input[_OUI] != null) {\n const memberEntries = se_OrganizationalUnitIdList(input[_OUI], context);\n if (input[_OUI]?.length === 0) {\n entries.OrganizationalUnitIds = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `OrganizationalUnitIds.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_AFT] != null) {\n entries[_AFT] = input[_AFT];\n }\n return entries;\n}, \"se_DeploymentTargets\");\nvar se_DeregisterTypeInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_Ar] != null) {\n entries[_Ar] = input[_Ar];\n }\n if (input[_T] != null) {\n entries[_T] = input[_T];\n }\n if (input[_TN] != null) {\n entries[_TN] = input[_TN];\n }\n if (input[_VI] != null) {\n entries[_VI] = input[_VI];\n }\n return entries;\n}, \"se_DeregisterTypeInput\");\nvar se_DescribeAccountLimitsInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_NT] != null) {\n entries[_NT] = input[_NT];\n }\n return entries;\n}, \"se_DescribeAccountLimitsInput\");\nvar se_DescribeChangeSetHooksInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_CSN] != null) {\n entries[_CSN] = input[_CSN];\n }\n if (input[_SN] != null) {\n entries[_SN] = input[_SN];\n }\n if (input[_NT] != null) {\n entries[_NT] = input[_NT];\n }\n if (input[_LRI] != null) {\n entries[_LRI] = input[_LRI];\n }\n return entries;\n}, \"se_DescribeChangeSetHooksInput\");\nvar se_DescribeChangeSetInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_CSN] != null) {\n entries[_CSN] = input[_CSN];\n }\n if (input[_SN] != null) {\n entries[_SN] = input[_SN];\n }\n if (input[_NT] != null) {\n entries[_NT] = input[_NT];\n }\n if (input[_IPV] != null) {\n entries[_IPV] = input[_IPV];\n }\n return entries;\n}, \"se_DescribeChangeSetInput\");\nvar se_DescribeGeneratedTemplateInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_GTN] != null) {\n entries[_GTN] = input[_GTN];\n }\n return entries;\n}, \"se_DescribeGeneratedTemplateInput\");\nvar se_DescribeOrganizationsAccessInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_CA] != null) {\n entries[_CA] = input[_CA];\n }\n return entries;\n}, \"se_DescribeOrganizationsAccessInput\");\nvar se_DescribePublisherInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_PI] != null) {\n entries[_PI] = input[_PI];\n }\n return entries;\n}, \"se_DescribePublisherInput\");\nvar se_DescribeResourceScanInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_RSI] != null) {\n entries[_RSI] = input[_RSI];\n }\n return entries;\n}, \"se_DescribeResourceScanInput\");\nvar se_DescribeStackDriftDetectionStatusInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SDDI] != null) {\n entries[_SDDI] = input[_SDDI];\n }\n return entries;\n}, \"se_DescribeStackDriftDetectionStatusInput\");\nvar se_DescribeStackEventsInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SN] != null) {\n entries[_SN] = input[_SN];\n }\n if (input[_NT] != null) {\n entries[_NT] = input[_NT];\n }\n return entries;\n}, \"se_DescribeStackEventsInput\");\nvar se_DescribeStackInstanceInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SSN] != null) {\n entries[_SSN] = input[_SSN];\n }\n if (input[_SIA] != null) {\n entries[_SIA] = input[_SIA];\n }\n if (input[_SIR] != null) {\n entries[_SIR] = input[_SIR];\n }\n if (input[_CA] != null) {\n entries[_CA] = input[_CA];\n }\n return entries;\n}, \"se_DescribeStackInstanceInput\");\nvar se_DescribeStackRefactorInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SRI] != null) {\n entries[_SRI] = input[_SRI];\n }\n return entries;\n}, \"se_DescribeStackRefactorInput\");\nvar se_DescribeStackResourceDriftsInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SN] != null) {\n entries[_SN] = input[_SN];\n }\n if (input[_SRDSF] != null) {\n const memberEntries = se_StackResourceDriftStatusFilters(input[_SRDSF], context);\n if (input[_SRDSF]?.length === 0) {\n entries.StackResourceDriftStatusFilters = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `StackResourceDriftStatusFilters.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_NT] != null) {\n entries[_NT] = input[_NT];\n }\n if (input[_MR] != null) {\n entries[_MR] = input[_MR];\n }\n return entries;\n}, \"se_DescribeStackResourceDriftsInput\");\nvar se_DescribeStackResourceInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SN] != null) {\n entries[_SN] = input[_SN];\n }\n if (input[_LRI] != null) {\n entries[_LRI] = input[_LRI];\n }\n return entries;\n}, \"se_DescribeStackResourceInput\");\nvar se_DescribeStackResourcesInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SN] != null) {\n entries[_SN] = input[_SN];\n }\n if (input[_LRI] != null) {\n entries[_LRI] = input[_LRI];\n }\n if (input[_PRI] != null) {\n entries[_PRI] = input[_PRI];\n }\n return entries;\n}, \"se_DescribeStackResourcesInput\");\nvar se_DescribeStackSetInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SSN] != null) {\n entries[_SSN] = input[_SSN];\n }\n if (input[_CA] != null) {\n entries[_CA] = input[_CA];\n }\n return entries;\n}, \"se_DescribeStackSetInput\");\nvar se_DescribeStackSetOperationInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SSN] != null) {\n entries[_SSN] = input[_SSN];\n }\n if (input[_OI] != null) {\n entries[_OI] = input[_OI];\n }\n if (input[_CA] != null) {\n entries[_CA] = input[_CA];\n }\n return entries;\n}, \"se_DescribeStackSetOperationInput\");\nvar se_DescribeStacksInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SN] != null) {\n entries[_SN] = input[_SN];\n }\n if (input[_NT] != null) {\n entries[_NT] = input[_NT];\n }\n return entries;\n}, \"se_DescribeStacksInput\");\nvar se_DescribeTypeInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_T] != null) {\n entries[_T] = input[_T];\n }\n if (input[_TN] != null) {\n entries[_TN] = input[_TN];\n }\n if (input[_Ar] != null) {\n entries[_Ar] = input[_Ar];\n }\n if (input[_VI] != null) {\n entries[_VI] = input[_VI];\n }\n if (input[_PI] != null) {\n entries[_PI] = input[_PI];\n }\n if (input[_PVN] != null) {\n entries[_PVN] = input[_PVN];\n }\n return entries;\n}, \"se_DescribeTypeInput\");\nvar se_DescribeTypeRegistrationInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_RTeg] != null) {\n entries[_RTeg] = input[_RTeg];\n }\n return entries;\n}, \"se_DescribeTypeRegistrationInput\");\nvar se_DetectStackDriftInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SN] != null) {\n entries[_SN] = input[_SN];\n }\n if (input[_LRIo] != null) {\n const memberEntries = se_LogicalResourceIds(input[_LRIo], context);\n if (input[_LRIo]?.length === 0) {\n entries.LogicalResourceIds = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `LogicalResourceIds.${key}`;\n entries[loc] = value;\n });\n }\n return entries;\n}, \"se_DetectStackDriftInput\");\nvar se_DetectStackResourceDriftInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SN] != null) {\n entries[_SN] = input[_SN];\n }\n if (input[_LRI] != null) {\n entries[_LRI] = input[_LRI];\n }\n return entries;\n}, \"se_DetectStackResourceDriftInput\");\nvar se_DetectStackSetDriftInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SSN] != null) {\n entries[_SSN] = input[_SSN];\n }\n if (input[_OP] != null) {\n const memberEntries = se_StackSetOperationPreferences(input[_OP], context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `OperationPreferences.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_OI] === void 0) {\n input[_OI] = (0, import_uuid.v4)();\n }\n if (input[_OI] != null) {\n entries[_OI] = input[_OI];\n }\n if (input[_CA] != null) {\n entries[_CA] = input[_CA];\n }\n return entries;\n}, \"se_DetectStackSetDriftInput\");\nvar se_EstimateTemplateCostInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_TB] != null) {\n entries[_TB] = input[_TB];\n }\n if (input[_TURL] != null) {\n entries[_TURL] = input[_TURL];\n }\n if (input[_P] != null) {\n const memberEntries = se_Parameters(input[_P], context);\n if (input[_P]?.length === 0) {\n entries.Parameters = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Parameters.${key}`;\n entries[loc] = value;\n });\n }\n return entries;\n}, \"se_EstimateTemplateCostInput\");\nvar se_ExecuteChangeSetInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_CSN] != null) {\n entries[_CSN] = input[_CSN];\n }\n if (input[_SN] != null) {\n entries[_SN] = input[_SN];\n }\n if (input[_CRT] != null) {\n entries[_CRT] = input[_CRT];\n }\n if (input[_DR] != null) {\n entries[_DR] = input[_DR];\n }\n if (input[_REOC] != null) {\n entries[_REOC] = input[_REOC];\n }\n return entries;\n}, \"se_ExecuteChangeSetInput\");\nvar se_ExecuteStackRefactorInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SRI] != null) {\n entries[_SRI] = input[_SRI];\n }\n return entries;\n}, \"se_ExecuteStackRefactorInput\");\nvar se_GetGeneratedTemplateInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_F] != null) {\n entries[_F] = input[_F];\n }\n if (input[_GTN] != null) {\n entries[_GTN] = input[_GTN];\n }\n return entries;\n}, \"se_GetGeneratedTemplateInput\");\nvar se_GetStackPolicyInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SN] != null) {\n entries[_SN] = input[_SN];\n }\n return entries;\n}, \"se_GetStackPolicyInput\");\nvar se_GetTemplateInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SN] != null) {\n entries[_SN] = input[_SN];\n }\n if (input[_CSN] != null) {\n entries[_CSN] = input[_CSN];\n }\n if (input[_TS] != null) {\n entries[_TS] = input[_TS];\n }\n return entries;\n}, \"se_GetTemplateInput\");\nvar se_GetTemplateSummaryInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_TB] != null) {\n entries[_TB] = input[_TB];\n }\n if (input[_TURL] != null) {\n entries[_TURL] = input[_TURL];\n }\n if (input[_SN] != null) {\n entries[_SN] = input[_SN];\n }\n if (input[_SSN] != null) {\n entries[_SSN] = input[_SSN];\n }\n if (input[_CA] != null) {\n entries[_CA] = input[_CA];\n }\n if (input[_TSC] != null) {\n const memberEntries = se_TemplateSummaryConfig(input[_TSC], context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `TemplateSummaryConfig.${key}`;\n entries[loc] = value;\n });\n }\n return entries;\n}, \"se_GetTemplateSummaryInput\");\nvar se_ImportStacksToStackSetInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SSN] != null) {\n entries[_SSN] = input[_SSN];\n }\n if (input[_SIt] != null) {\n const memberEntries = se_StackIdList(input[_SIt], context);\n if (input[_SIt]?.length === 0) {\n entries.StackIds = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `StackIds.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_SIU] != null) {\n entries[_SIU] = input[_SIU];\n }\n if (input[_OUI] != null) {\n const memberEntries = se_OrganizationalUnitIdList(input[_OUI], context);\n if (input[_OUI]?.length === 0) {\n entries.OrganizationalUnitIds = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `OrganizationalUnitIds.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_OP] != null) {\n const memberEntries = se_StackSetOperationPreferences(input[_OP], context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `OperationPreferences.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_OI] === void 0) {\n input[_OI] = (0, import_uuid.v4)();\n }\n if (input[_OI] != null) {\n entries[_OI] = input[_OI];\n }\n if (input[_CA] != null) {\n entries[_CA] = input[_CA];\n }\n return entries;\n}, \"se_ImportStacksToStackSetInput\");\nvar se_JazzLogicalResourceIds = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n entries[`member.${counter}`] = entry;\n counter++;\n }\n return entries;\n}, \"se_JazzLogicalResourceIds\");\nvar se_JazzResourceIdentifierProperties = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n Object.keys(input).filter((key) => input[key] != null).forEach((key) => {\n entries[`entry.${counter}.key`] = key;\n entries[`entry.${counter}.value`] = input[key];\n counter++;\n });\n return entries;\n}, \"se_JazzResourceIdentifierProperties\");\nvar se_ListChangeSetsInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SN] != null) {\n entries[_SN] = input[_SN];\n }\n if (input[_NT] != null) {\n entries[_NT] = input[_NT];\n }\n return entries;\n}, \"se_ListChangeSetsInput\");\nvar se_ListExportsInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_NT] != null) {\n entries[_NT] = input[_NT];\n }\n return entries;\n}, \"se_ListExportsInput\");\nvar se_ListGeneratedTemplatesInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_NT] != null) {\n entries[_NT] = input[_NT];\n }\n if (input[_MR] != null) {\n entries[_MR] = input[_MR];\n }\n return entries;\n}, \"se_ListGeneratedTemplatesInput\");\nvar se_ListHookResultsInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_TTa] != null) {\n entries[_TTa] = input[_TTa];\n }\n if (input[_TI] != null) {\n entries[_TI] = input[_TI];\n }\n if (input[_NT] != null) {\n entries[_NT] = input[_NT];\n }\n return entries;\n}, \"se_ListHookResultsInput\");\nvar se_ListImportsInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_EN] != null) {\n entries[_EN] = input[_EN];\n }\n if (input[_NT] != null) {\n entries[_NT] = input[_NT];\n }\n return entries;\n}, \"se_ListImportsInput\");\nvar se_ListResourceScanRelatedResourcesInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_RSI] != null) {\n entries[_RSI] = input[_RSI];\n }\n if (input[_R] != null) {\n const memberEntries = se_ScannedResourceIdentifiers(input[_R], context);\n if (input[_R]?.length === 0) {\n entries.Resources = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Resources.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_NT] != null) {\n entries[_NT] = input[_NT];\n }\n if (input[_MR] != null) {\n entries[_MR] = input[_MR];\n }\n return entries;\n}, \"se_ListResourceScanRelatedResourcesInput\");\nvar se_ListResourceScanResourcesInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_RSI] != null) {\n entries[_RSI] = input[_RSI];\n }\n if (input[_RI] != null) {\n entries[_RI] = input[_RI];\n }\n if (input[_RTP] != null) {\n entries[_RTP] = input[_RTP];\n }\n if (input[_TK] != null) {\n entries[_TK] = input[_TK];\n }\n if (input[_TV] != null) {\n entries[_TV] = input[_TV];\n }\n if (input[_NT] != null) {\n entries[_NT] = input[_NT];\n }\n if (input[_MR] != null) {\n entries[_MR] = input[_MR];\n }\n return entries;\n}, \"se_ListResourceScanResourcesInput\");\nvar se_ListResourceScansInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_NT] != null) {\n entries[_NT] = input[_NT];\n }\n if (input[_MR] != null) {\n entries[_MR] = input[_MR];\n }\n if (input[_STF] != null) {\n entries[_STF] = input[_STF];\n }\n return entries;\n}, \"se_ListResourceScansInput\");\nvar se_ListStackInstanceResourceDriftsInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SSN] != null) {\n entries[_SSN] = input[_SSN];\n }\n if (input[_NT] != null) {\n entries[_NT] = input[_NT];\n }\n if (input[_MR] != null) {\n entries[_MR] = input[_MR];\n }\n if (input[_SIRDS] != null) {\n const memberEntries = se_StackResourceDriftStatusFilters(input[_SIRDS], context);\n if (input[_SIRDS]?.length === 0) {\n entries.StackInstanceResourceDriftStatuses = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `StackInstanceResourceDriftStatuses.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_SIA] != null) {\n entries[_SIA] = input[_SIA];\n }\n if (input[_SIR] != null) {\n entries[_SIR] = input[_SIR];\n }\n if (input[_OI] != null) {\n entries[_OI] = input[_OI];\n }\n if (input[_CA] != null) {\n entries[_CA] = input[_CA];\n }\n return entries;\n}, \"se_ListStackInstanceResourceDriftsInput\");\nvar se_ListStackInstancesInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SSN] != null) {\n entries[_SSN] = input[_SSN];\n }\n if (input[_NT] != null) {\n entries[_NT] = input[_NT];\n }\n if (input[_MR] != null) {\n entries[_MR] = input[_MR];\n }\n if (input[_Fi] != null) {\n const memberEntries = se_StackInstanceFilters(input[_Fi], context);\n if (input[_Fi]?.length === 0) {\n entries.Filters = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Filters.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_SIA] != null) {\n entries[_SIA] = input[_SIA];\n }\n if (input[_SIR] != null) {\n entries[_SIR] = input[_SIR];\n }\n if (input[_CA] != null) {\n entries[_CA] = input[_CA];\n }\n return entries;\n}, \"se_ListStackInstancesInput\");\nvar se_ListStackRefactorActionsInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SRI] != null) {\n entries[_SRI] = input[_SRI];\n }\n if (input[_NT] != null) {\n entries[_NT] = input[_NT];\n }\n if (input[_MR] != null) {\n entries[_MR] = input[_MR];\n }\n return entries;\n}, \"se_ListStackRefactorActionsInput\");\nvar se_ListStackRefactorsInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_ESF] != null) {\n const memberEntries = se_StackRefactorExecutionStatusFilter(input[_ESF], context);\n if (input[_ESF]?.length === 0) {\n entries.ExecutionStatusFilter = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `ExecutionStatusFilter.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_NT] != null) {\n entries[_NT] = input[_NT];\n }\n if (input[_MR] != null) {\n entries[_MR] = input[_MR];\n }\n return entries;\n}, \"se_ListStackRefactorsInput\");\nvar se_ListStackResourcesInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SN] != null) {\n entries[_SN] = input[_SN];\n }\n if (input[_NT] != null) {\n entries[_NT] = input[_NT];\n }\n return entries;\n}, \"se_ListStackResourcesInput\");\nvar se_ListStackSetAutoDeploymentTargetsInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SSN] != null) {\n entries[_SSN] = input[_SSN];\n }\n if (input[_NT] != null) {\n entries[_NT] = input[_NT];\n }\n if (input[_MR] != null) {\n entries[_MR] = input[_MR];\n }\n if (input[_CA] != null) {\n entries[_CA] = input[_CA];\n }\n return entries;\n}, \"se_ListStackSetAutoDeploymentTargetsInput\");\nvar se_ListStackSetOperationResultsInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SSN] != null) {\n entries[_SSN] = input[_SSN];\n }\n if (input[_OI] != null) {\n entries[_OI] = input[_OI];\n }\n if (input[_NT] != null) {\n entries[_NT] = input[_NT];\n }\n if (input[_MR] != null) {\n entries[_MR] = input[_MR];\n }\n if (input[_CA] != null) {\n entries[_CA] = input[_CA];\n }\n if (input[_Fi] != null) {\n const memberEntries = se_OperationResultFilters(input[_Fi], context);\n if (input[_Fi]?.length === 0) {\n entries.Filters = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Filters.${key}`;\n entries[loc] = value;\n });\n }\n return entries;\n}, \"se_ListStackSetOperationResultsInput\");\nvar se_ListStackSetOperationsInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SSN] != null) {\n entries[_SSN] = input[_SSN];\n }\n if (input[_NT] != null) {\n entries[_NT] = input[_NT];\n }\n if (input[_MR] != null) {\n entries[_MR] = input[_MR];\n }\n if (input[_CA] != null) {\n entries[_CA] = input[_CA];\n }\n return entries;\n}, \"se_ListStackSetOperationsInput\");\nvar se_ListStackSetsInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_NT] != null) {\n entries[_NT] = input[_NT];\n }\n if (input[_MR] != null) {\n entries[_MR] = input[_MR];\n }\n if (input[_S] != null) {\n entries[_S] = input[_S];\n }\n if (input[_CA] != null) {\n entries[_CA] = input[_CA];\n }\n return entries;\n}, \"se_ListStackSetsInput\");\nvar se_ListStacksInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_NT] != null) {\n entries[_NT] = input[_NT];\n }\n if (input[_SSF] != null) {\n const memberEntries = se_StackStatusFilter(input[_SSF], context);\n if (input[_SSF]?.length === 0) {\n entries.StackStatusFilter = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `StackStatusFilter.${key}`;\n entries[loc] = value;\n });\n }\n return entries;\n}, \"se_ListStacksInput\");\nvar se_ListTypeRegistrationsInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_T] != null) {\n entries[_T] = input[_T];\n }\n if (input[_TN] != null) {\n entries[_TN] = input[_TN];\n }\n if (input[_TA] != null) {\n entries[_TA] = input[_TA];\n }\n if (input[_RSF] != null) {\n entries[_RSF] = input[_RSF];\n }\n if (input[_MR] != null) {\n entries[_MR] = input[_MR];\n }\n if (input[_NT] != null) {\n entries[_NT] = input[_NT];\n }\n return entries;\n}, \"se_ListTypeRegistrationsInput\");\nvar se_ListTypesInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_Vi] != null) {\n entries[_Vi] = input[_Vi];\n }\n if (input[_PTr] != null) {\n entries[_PTr] = input[_PTr];\n }\n if (input[_DSep] != null) {\n entries[_DSep] = input[_DSep];\n }\n if (input[_T] != null) {\n entries[_T] = input[_T];\n }\n if (input[_Fi] != null) {\n const memberEntries = se_TypeFilters(input[_Fi], context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Filters.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_MR] != null) {\n entries[_MR] = input[_MR];\n }\n if (input[_NT] != null) {\n entries[_NT] = input[_NT];\n }\n return entries;\n}, \"se_ListTypesInput\");\nvar se_ListTypeVersionsInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_T] != null) {\n entries[_T] = input[_T];\n }\n if (input[_TN] != null) {\n entries[_TN] = input[_TN];\n }\n if (input[_Ar] != null) {\n entries[_Ar] = input[_Ar];\n }\n if (input[_MR] != null) {\n entries[_MR] = input[_MR];\n }\n if (input[_NT] != null) {\n entries[_NT] = input[_NT];\n }\n if (input[_DSep] != null) {\n entries[_DSep] = input[_DSep];\n }\n if (input[_PI] != null) {\n entries[_PI] = input[_PI];\n }\n return entries;\n}, \"se_ListTypeVersionsInput\");\nvar se_LoggingConfig = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_LRA] != null) {\n entries[_LRA] = input[_LRA];\n }\n if (input[_LGN] != null) {\n entries[_LGN] = input[_LGN];\n }\n return entries;\n}, \"se_LoggingConfig\");\nvar se_LogicalResourceIds = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n entries[`member.${counter}`] = entry;\n counter++;\n }\n return entries;\n}, \"se_LogicalResourceIds\");\nvar se_ManagedExecution = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_Act] != null) {\n entries[_Act] = input[_Act];\n }\n return entries;\n}, \"se_ManagedExecution\");\nvar se_NotificationARNs = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n entries[`member.${counter}`] = entry;\n counter++;\n }\n return entries;\n}, \"se_NotificationARNs\");\nvar se_OperationResultFilter = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_N] != null) {\n entries[_N] = input[_N];\n }\n if (input[_Va] != null) {\n entries[_Va] = input[_Va];\n }\n return entries;\n}, \"se_OperationResultFilter\");\nvar se_OperationResultFilters = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n const memberEntries = se_OperationResultFilter(entry, context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n entries[`member.${counter}.${key}`] = value;\n });\n counter++;\n }\n return entries;\n}, \"se_OperationResultFilters\");\nvar se_OrganizationalUnitIdList = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n entries[`member.${counter}`] = entry;\n counter++;\n }\n return entries;\n}, \"se_OrganizationalUnitIdList\");\nvar se_Parameter = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_PK] != null) {\n entries[_PK] = input[_PK];\n }\n if (input[_PV] != null) {\n entries[_PV] = input[_PV];\n }\n if (input[_UPV] != null) {\n entries[_UPV] = input[_UPV];\n }\n if (input[_RV] != null) {\n entries[_RV] = input[_RV];\n }\n return entries;\n}, \"se_Parameter\");\nvar se_Parameters = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n const memberEntries = se_Parameter(entry, context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n entries[`member.${counter}.${key}`] = value;\n });\n counter++;\n }\n return entries;\n}, \"se_Parameters\");\nvar se_PublishTypeInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_T] != null) {\n entries[_T] = input[_T];\n }\n if (input[_Ar] != null) {\n entries[_Ar] = input[_Ar];\n }\n if (input[_TN] != null) {\n entries[_TN] = input[_TN];\n }\n if (input[_PVN] != null) {\n entries[_PVN] = input[_PVN];\n }\n return entries;\n}, \"se_PublishTypeInput\");\nvar se_RecordHandlerProgressInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_BT] != null) {\n entries[_BT] = input[_BT];\n }\n if (input[_OS] != null) {\n entries[_OS] = input[_OS];\n }\n if (input[_COS] != null) {\n entries[_COS] = input[_COS];\n }\n if (input[_SM] != null) {\n entries[_SM] = input[_SM];\n }\n if (input[_EC] != null) {\n entries[_EC] = input[_EC];\n }\n if (input[_RMe] != null) {\n entries[_RMe] = input[_RMe];\n }\n if (input[_CRT] != null) {\n entries[_CRT] = input[_CRT];\n }\n return entries;\n}, \"se_RecordHandlerProgressInput\");\nvar se_RegionList = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n entries[`member.${counter}`] = entry;\n counter++;\n }\n return entries;\n}, \"se_RegionList\");\nvar se_RegisterPublisherInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_ATAC] != null) {\n entries[_ATAC] = input[_ATAC];\n }\n if (input[_CAo] != null) {\n entries[_CAo] = input[_CAo];\n }\n return entries;\n}, \"se_RegisterPublisherInput\");\nvar se_RegisterTypeInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_T] != null) {\n entries[_T] = input[_T];\n }\n if (input[_TN] != null) {\n entries[_TN] = input[_TN];\n }\n if (input[_SHP] != null) {\n entries[_SHP] = input[_SHP];\n }\n if (input[_LC] != null) {\n const memberEntries = se_LoggingConfig(input[_LC], context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `LoggingConfig.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_ERA] != null) {\n entries[_ERA] = input[_ERA];\n }\n if (input[_CRT] != null) {\n entries[_CRT] = input[_CRT];\n }\n return entries;\n}, \"se_RegisterTypeInput\");\nvar se_ResourceDefinition = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_RTes] != null) {\n entries[_RTes] = input[_RTes];\n }\n if (input[_LRI] != null) {\n entries[_LRI] = input[_LRI];\n }\n if (input[_RI] != null) {\n const memberEntries = se_ResourceIdentifierProperties(input[_RI], context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `ResourceIdentifier.${key}`;\n entries[loc] = value;\n });\n }\n return entries;\n}, \"se_ResourceDefinition\");\nvar se_ResourceDefinitions = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n const memberEntries = se_ResourceDefinition(entry, context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n entries[`member.${counter}.${key}`] = value;\n });\n counter++;\n }\n return entries;\n}, \"se_ResourceDefinitions\");\nvar se_ResourceIdentifierProperties = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n Object.keys(input).filter((key) => input[key] != null).forEach((key) => {\n entries[`entry.${counter}.key`] = key;\n entries[`entry.${counter}.value`] = input[key];\n counter++;\n });\n return entries;\n}, \"se_ResourceIdentifierProperties\");\nvar se_ResourceLocation = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SN] != null) {\n entries[_SN] = input[_SN];\n }\n if (input[_LRI] != null) {\n entries[_LRI] = input[_LRI];\n }\n return entries;\n}, \"se_ResourceLocation\");\nvar se_ResourceMapping = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_So] != null) {\n const memberEntries = se_ResourceLocation(input[_So], context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Source.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_De] != null) {\n const memberEntries = se_ResourceLocation(input[_De], context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Destination.${key}`;\n entries[loc] = value;\n });\n }\n return entries;\n}, \"se_ResourceMapping\");\nvar se_ResourceMappings = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n const memberEntries = se_ResourceMapping(entry, context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n entries[`member.${counter}.${key}`] = value;\n });\n counter++;\n }\n return entries;\n}, \"se_ResourceMappings\");\nvar se_ResourcesToImport = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n const memberEntries = se_ResourceToImport(entry, context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n entries[`member.${counter}.${key}`] = value;\n });\n counter++;\n }\n return entries;\n}, \"se_ResourcesToImport\");\nvar se_ResourcesToSkip = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n entries[`member.${counter}`] = entry;\n counter++;\n }\n return entries;\n}, \"se_ResourcesToSkip\");\nvar se_ResourceToImport = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_RTes] != null) {\n entries[_RTes] = input[_RTes];\n }\n if (input[_LRI] != null) {\n entries[_LRI] = input[_LRI];\n }\n if (input[_RI] != null) {\n const memberEntries = se_ResourceIdentifierProperties(input[_RI], context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `ResourceIdentifier.${key}`;\n entries[loc] = value;\n });\n }\n return entries;\n}, \"se_ResourceToImport\");\nvar se_ResourceTypeFilters = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n entries[`member.${counter}`] = entry;\n counter++;\n }\n return entries;\n}, \"se_ResourceTypeFilters\");\nvar se_ResourceTypes = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n entries[`member.${counter}`] = entry;\n counter++;\n }\n return entries;\n}, \"se_ResourceTypes\");\nvar se_RetainResources = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n entries[`member.${counter}`] = entry;\n counter++;\n }\n return entries;\n}, \"se_RetainResources\");\nvar se_RollbackConfiguration = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_RTo] != null) {\n const memberEntries = se_RollbackTriggers(input[_RTo], context);\n if (input[_RTo]?.length === 0) {\n entries.RollbackTriggers = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `RollbackTriggers.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_MTIM] != null) {\n entries[_MTIM] = input[_MTIM];\n }\n return entries;\n}, \"se_RollbackConfiguration\");\nvar se_RollbackStackInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SN] != null) {\n entries[_SN] = input[_SN];\n }\n if (input[_RARN] != null) {\n entries[_RARN] = input[_RARN];\n }\n if (input[_CRT] != null) {\n entries[_CRT] = input[_CRT];\n }\n if (input[_REOC] != null) {\n entries[_REOC] = input[_REOC];\n }\n return entries;\n}, \"se_RollbackStackInput\");\nvar se_RollbackTrigger = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_Ar] != null) {\n entries[_Ar] = input[_Ar];\n }\n if (input[_T] != null) {\n entries[_T] = input[_T];\n }\n return entries;\n}, \"se_RollbackTrigger\");\nvar se_RollbackTriggers = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n const memberEntries = se_RollbackTrigger(entry, context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n entries[`member.${counter}.${key}`] = value;\n });\n counter++;\n }\n return entries;\n}, \"se_RollbackTriggers\");\nvar se_ScanFilter = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_Ty] != null) {\n const memberEntries = se_ResourceTypeFilters(input[_Ty], context);\n if (input[_Ty]?.length === 0) {\n entries.Types = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Types.${key}`;\n entries[loc] = value;\n });\n }\n return entries;\n}, \"se_ScanFilter\");\nvar se_ScanFilters = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n const memberEntries = se_ScanFilter(entry, context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n entries[`member.${counter}.${key}`] = value;\n });\n counter++;\n }\n return entries;\n}, \"se_ScanFilters\");\nvar se_ScannedResourceIdentifier = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_RTes] != null) {\n entries[_RTes] = input[_RTes];\n }\n if (input[_RI] != null) {\n const memberEntries = se_JazzResourceIdentifierProperties(input[_RI], context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `ResourceIdentifier.${key}`;\n entries[loc] = value;\n });\n }\n return entries;\n}, \"se_ScannedResourceIdentifier\");\nvar se_ScannedResourceIdentifiers = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n const memberEntries = se_ScannedResourceIdentifier(entry, context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n entries[`member.${counter}.${key}`] = value;\n });\n counter++;\n }\n return entries;\n}, \"se_ScannedResourceIdentifiers\");\nvar se_SetStackPolicyInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SN] != null) {\n entries[_SN] = input[_SN];\n }\n if (input[_SPB] != null) {\n entries[_SPB] = input[_SPB];\n }\n if (input[_SPURL] != null) {\n entries[_SPURL] = input[_SPURL];\n }\n return entries;\n}, \"se_SetStackPolicyInput\");\nvar se_SetTypeConfigurationInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_TA] != null) {\n entries[_TA] = input[_TA];\n }\n if (input[_Co] != null) {\n entries[_Co] = input[_Co];\n }\n if (input[_CAon] != null) {\n entries[_CAon] = input[_CAon];\n }\n if (input[_TN] != null) {\n entries[_TN] = input[_TN];\n }\n if (input[_T] != null) {\n entries[_T] = input[_T];\n }\n return entries;\n}, \"se_SetTypeConfigurationInput\");\nvar se_SetTypeDefaultVersionInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_Ar] != null) {\n entries[_Ar] = input[_Ar];\n }\n if (input[_T] != null) {\n entries[_T] = input[_T];\n }\n if (input[_TN] != null) {\n entries[_TN] = input[_TN];\n }\n if (input[_VI] != null) {\n entries[_VI] = input[_VI];\n }\n return entries;\n}, \"se_SetTypeDefaultVersionInput\");\nvar se_SignalResourceInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SN] != null) {\n entries[_SN] = input[_SN];\n }\n if (input[_LRI] != null) {\n entries[_LRI] = input[_LRI];\n }\n if (input[_UI] != null) {\n entries[_UI] = input[_UI];\n }\n if (input[_S] != null) {\n entries[_S] = input[_S];\n }\n return entries;\n}, \"se_SignalResourceInput\");\nvar se_StackDefinition = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SN] != null) {\n entries[_SN] = input[_SN];\n }\n if (input[_TB] != null) {\n entries[_TB] = input[_TB];\n }\n if (input[_TURL] != null) {\n entries[_TURL] = input[_TURL];\n }\n return entries;\n}, \"se_StackDefinition\");\nvar se_StackDefinitions = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n const memberEntries = se_StackDefinition(entry, context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n entries[`member.${counter}.${key}`] = value;\n });\n counter++;\n }\n return entries;\n}, \"se_StackDefinitions\");\nvar se_StackIdList = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n entries[`member.${counter}`] = entry;\n counter++;\n }\n return entries;\n}, \"se_StackIdList\");\nvar se_StackInstanceFilter = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_N] != null) {\n entries[_N] = input[_N];\n }\n if (input[_Va] != null) {\n entries[_Va] = input[_Va];\n }\n return entries;\n}, \"se_StackInstanceFilter\");\nvar se_StackInstanceFilters = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n const memberEntries = se_StackInstanceFilter(entry, context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n entries[`member.${counter}.${key}`] = value;\n });\n counter++;\n }\n return entries;\n}, \"se_StackInstanceFilters\");\nvar se_StackRefactorExecutionStatusFilter = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n entries[`member.${counter}`] = entry;\n counter++;\n }\n return entries;\n}, \"se_StackRefactorExecutionStatusFilter\");\nvar se_StackResourceDriftStatusFilters = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n entries[`member.${counter}`] = entry;\n counter++;\n }\n return entries;\n}, \"se_StackResourceDriftStatusFilters\");\nvar se_StackSetOperationPreferences = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_RCT] != null) {\n entries[_RCT] = input[_RCT];\n }\n if (input[_RO] != null) {\n const memberEntries = se_RegionList(input[_RO], context);\n if (input[_RO]?.length === 0) {\n entries.RegionOrder = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `RegionOrder.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_FTC] != null) {\n entries[_FTC] = input[_FTC];\n }\n if (input[_FTP] != null) {\n entries[_FTP] = input[_FTP];\n }\n if (input[_MCC] != null) {\n entries[_MCC] = input[_MCC];\n }\n if (input[_MCP] != null) {\n entries[_MCP] = input[_MCP];\n }\n if (input[_CM] != null) {\n entries[_CM] = input[_CM];\n }\n return entries;\n}, \"se_StackSetOperationPreferences\");\nvar se_StackStatusFilter = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n entries[`member.${counter}`] = entry;\n counter++;\n }\n return entries;\n}, \"se_StackStatusFilter\");\nvar se_StartResourceScanInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_CRT] != null) {\n entries[_CRT] = input[_CRT];\n }\n if (input[_SF] != null) {\n const memberEntries = se_ScanFilters(input[_SF], context);\n if (input[_SF]?.length === 0) {\n entries.ScanFilters = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `ScanFilters.${key}`;\n entries[loc] = value;\n });\n }\n return entries;\n}, \"se_StartResourceScanInput\");\nvar se_StopStackSetOperationInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SSN] != null) {\n entries[_SSN] = input[_SSN];\n }\n if (input[_OI] != null) {\n entries[_OI] = input[_OI];\n }\n if (input[_CA] != null) {\n entries[_CA] = input[_CA];\n }\n return entries;\n}, \"se_StopStackSetOperationInput\");\nvar se_Tag = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_K] != null) {\n entries[_K] = input[_K];\n }\n if (input[_Val] != null) {\n entries[_Val] = input[_Val];\n }\n return entries;\n}, \"se_Tag\");\nvar se_Tags = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n const memberEntries = se_Tag(entry, context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n entries[`member.${counter}.${key}`] = value;\n });\n counter++;\n }\n return entries;\n}, \"se_Tags\");\nvar se_TemplateConfiguration = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_DPe] != null) {\n entries[_DPe] = input[_DPe];\n }\n if (input[_URP] != null) {\n entries[_URP] = input[_URP];\n }\n return entries;\n}, \"se_TemplateConfiguration\");\nvar se_TemplateSummaryConfig = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_TURTAW] != null) {\n entries[_TURTAW] = input[_TURTAW];\n }\n return entries;\n}, \"se_TemplateSummaryConfig\");\nvar se_TestTypeInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_Ar] != null) {\n entries[_Ar] = input[_Ar];\n }\n if (input[_T] != null) {\n entries[_T] = input[_T];\n }\n if (input[_TN] != null) {\n entries[_TN] = input[_TN];\n }\n if (input[_VI] != null) {\n entries[_VI] = input[_VI];\n }\n if (input[_LDB] != null) {\n entries[_LDB] = input[_LDB];\n }\n return entries;\n}, \"se_TestTypeInput\");\nvar se_TypeConfigurationIdentifier = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_TA] != null) {\n entries[_TA] = input[_TA];\n }\n if (input[_TCA] != null) {\n entries[_TCA] = input[_TCA];\n }\n if (input[_TCAy] != null) {\n entries[_TCAy] = input[_TCAy];\n }\n if (input[_T] != null) {\n entries[_T] = input[_T];\n }\n if (input[_TN] != null) {\n entries[_TN] = input[_TN];\n }\n return entries;\n}, \"se_TypeConfigurationIdentifier\");\nvar se_TypeConfigurationIdentifiers = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n const memberEntries = se_TypeConfigurationIdentifier(entry, context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n entries[`member.${counter}.${key}`] = value;\n });\n counter++;\n }\n return entries;\n}, \"se_TypeConfigurationIdentifiers\");\nvar se_TypeFilters = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_Ca] != null) {\n entries[_Ca] = input[_Ca];\n }\n if (input[_PI] != null) {\n entries[_PI] = input[_PI];\n }\n if (input[_TNP] != null) {\n entries[_TNP] = input[_TNP];\n }\n return entries;\n}, \"se_TypeFilters\");\nvar se_UpdateGeneratedTemplateInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_GTN] != null) {\n entries[_GTN] = input[_GTN];\n }\n if (input[_NGTN] != null) {\n entries[_NGTN] = input[_NGTN];\n }\n if (input[_AR] != null) {\n const memberEntries = se_ResourceDefinitions(input[_AR], context);\n if (input[_AR]?.length === 0) {\n entries.AddResources = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `AddResources.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_RRe] != null) {\n const memberEntries = se_JazzLogicalResourceIds(input[_RRe], context);\n if (input[_RRe]?.length === 0) {\n entries.RemoveResources = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `RemoveResources.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_RAR] != null) {\n entries[_RAR] = input[_RAR];\n }\n if (input[_TC] != null) {\n const memberEntries = se_TemplateConfiguration(input[_TC], context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `TemplateConfiguration.${key}`;\n entries[loc] = value;\n });\n }\n return entries;\n}, \"se_UpdateGeneratedTemplateInput\");\nvar se_UpdateStackInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SN] != null) {\n entries[_SN] = input[_SN];\n }\n if (input[_TB] != null) {\n entries[_TB] = input[_TB];\n }\n if (input[_TURL] != null) {\n entries[_TURL] = input[_TURL];\n }\n if (input[_UPT] != null) {\n entries[_UPT] = input[_UPT];\n }\n if (input[_SPDUB] != null) {\n entries[_SPDUB] = input[_SPDUB];\n }\n if (input[_SPDUURL] != null) {\n entries[_SPDUURL] = input[_SPDUURL];\n }\n if (input[_P] != null) {\n const memberEntries = se_Parameters(input[_P], context);\n if (input[_P]?.length === 0) {\n entries.Parameters = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Parameters.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_C] != null) {\n const memberEntries = se_Capabilities(input[_C], context);\n if (input[_C]?.length === 0) {\n entries.Capabilities = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Capabilities.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_RTe] != null) {\n const memberEntries = se_ResourceTypes(input[_RTe], context);\n if (input[_RTe]?.length === 0) {\n entries.ResourceTypes = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `ResourceTypes.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_RARN] != null) {\n entries[_RARN] = input[_RARN];\n }\n if (input[_RC] != null) {\n const memberEntries = se_RollbackConfiguration(input[_RC], context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `RollbackConfiguration.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_SPB] != null) {\n entries[_SPB] = input[_SPB];\n }\n if (input[_SPURL] != null) {\n entries[_SPURL] = input[_SPURL];\n }\n if (input[_NARN] != null) {\n const memberEntries = se_NotificationARNs(input[_NARN], context);\n if (input[_NARN]?.length === 0) {\n entries.NotificationARNs = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `NotificationARNs.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_Ta] != null) {\n const memberEntries = se_Tags(input[_Ta], context);\n if (input[_Ta]?.length === 0) {\n entries.Tags = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Tags.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_DR] != null) {\n entries[_DR] = input[_DR];\n }\n if (input[_CRT] != null) {\n entries[_CRT] = input[_CRT];\n }\n if (input[_REOC] != null) {\n entries[_REOC] = input[_REOC];\n }\n return entries;\n}, \"se_UpdateStackInput\");\nvar se_UpdateStackInstancesInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SSN] != null) {\n entries[_SSN] = input[_SSN];\n }\n if (input[_Ac] != null) {\n const memberEntries = se_AccountList(input[_Ac], context);\n if (input[_Ac]?.length === 0) {\n entries.Accounts = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Accounts.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_DTep] != null) {\n const memberEntries = se_DeploymentTargets(input[_DTep], context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `DeploymentTargets.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_Re] != null) {\n const memberEntries = se_RegionList(input[_Re], context);\n if (input[_Re]?.length === 0) {\n entries.Regions = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Regions.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_PO] != null) {\n const memberEntries = se_Parameters(input[_PO], context);\n if (input[_PO]?.length === 0) {\n entries.ParameterOverrides = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `ParameterOverrides.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_OP] != null) {\n const memberEntries = se_StackSetOperationPreferences(input[_OP], context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `OperationPreferences.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_OI] === void 0) {\n input[_OI] = (0, import_uuid.v4)();\n }\n if (input[_OI] != null) {\n entries[_OI] = input[_OI];\n }\n if (input[_CA] != null) {\n entries[_CA] = input[_CA];\n }\n return entries;\n}, \"se_UpdateStackInstancesInput\");\nvar se_UpdateStackSetInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SSN] != null) {\n entries[_SSN] = input[_SSN];\n }\n if (input[_D] != null) {\n entries[_D] = input[_D];\n }\n if (input[_TB] != null) {\n entries[_TB] = input[_TB];\n }\n if (input[_TURL] != null) {\n entries[_TURL] = input[_TURL];\n }\n if (input[_UPT] != null) {\n entries[_UPT] = input[_UPT];\n }\n if (input[_P] != null) {\n const memberEntries = se_Parameters(input[_P], context);\n if (input[_P]?.length === 0) {\n entries.Parameters = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Parameters.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_C] != null) {\n const memberEntries = se_Capabilities(input[_C], context);\n if (input[_C]?.length === 0) {\n entries.Capabilities = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Capabilities.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_Ta] != null) {\n const memberEntries = se_Tags(input[_Ta], context);\n if (input[_Ta]?.length === 0) {\n entries.Tags = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Tags.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_OP] != null) {\n const memberEntries = se_StackSetOperationPreferences(input[_OP], context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `OperationPreferences.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_ARARN] != null) {\n entries[_ARARN] = input[_ARARN];\n }\n if (input[_ERN] != null) {\n entries[_ERN] = input[_ERN];\n }\n if (input[_DTep] != null) {\n const memberEntries = se_DeploymentTargets(input[_DTep], context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `DeploymentTargets.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_PM] != null) {\n entries[_PM] = input[_PM];\n }\n if (input[_AD] != null) {\n const memberEntries = se_AutoDeployment(input[_AD], context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `AutoDeployment.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_OI] === void 0) {\n input[_OI] = (0, import_uuid.v4)();\n }\n if (input[_OI] != null) {\n entries[_OI] = input[_OI];\n }\n if (input[_Ac] != null) {\n const memberEntries = se_AccountList(input[_Ac], context);\n if (input[_Ac]?.length === 0) {\n entries.Accounts = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Accounts.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_Re] != null) {\n const memberEntries = se_RegionList(input[_Re], context);\n if (input[_Re]?.length === 0) {\n entries.Regions = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Regions.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_CA] != null) {\n entries[_CA] = input[_CA];\n }\n if (input[_ME] != null) {\n const memberEntries = se_ManagedExecution(input[_ME], context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `ManagedExecution.${key}`;\n entries[loc] = value;\n });\n }\n return entries;\n}, \"se_UpdateStackSetInput\");\nvar se_UpdateTerminationProtectionInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_ETP] != null) {\n entries[_ETP] = input[_ETP];\n }\n if (input[_SN] != null) {\n entries[_SN] = input[_SN];\n }\n return entries;\n}, \"se_UpdateTerminationProtectionInput\");\nvar se_ValidateTemplateInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_TB] != null) {\n entries[_TB] = input[_TB];\n }\n if (input[_TURL] != null) {\n entries[_TURL] = input[_TURL];\n }\n return entries;\n}, \"se_ValidateTemplateInput\");\nvar de_AccountGateResult = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_S] != null) {\n contents[_S] = (0, import_smithy_client.expectString)(output[_S]);\n }\n if (output[_SRt] != null) {\n contents[_SRt] = (0, import_smithy_client.expectString)(output[_SRt]);\n }\n return contents;\n}, \"de_AccountGateResult\");\nvar de_AccountLimit = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_N] != null) {\n contents[_N] = (0, import_smithy_client.expectString)(output[_N]);\n }\n if (output[_Val] != null) {\n contents[_Val] = (0, import_smithy_client.strictParseInt32)(output[_Val]);\n }\n return contents;\n}, \"de_AccountLimit\");\nvar de_AccountLimitList = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_AccountLimit(entry, context);\n });\n}, \"de_AccountLimitList\");\nvar de_AccountList = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return (0, import_smithy_client.expectString)(entry);\n });\n}, \"de_AccountList\");\nvar de_ActivateOrganizationsAccessOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n return contents;\n}, \"de_ActivateOrganizationsAccessOutput\");\nvar de_ActivateTypeOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_Ar] != null) {\n contents[_Ar] = (0, import_smithy_client.expectString)(output[_Ar]);\n }\n return contents;\n}, \"de_ActivateTypeOutput\");\nvar de_AllowedValues = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return (0, import_smithy_client.expectString)(entry);\n });\n}, \"de_AllowedValues\");\nvar de_AlreadyExistsException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_M] != null) {\n contents[_M] = (0, import_smithy_client.expectString)(output[_M]);\n }\n return contents;\n}, \"de_AlreadyExistsException\");\nvar de_AutoDeployment = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_E] != null) {\n contents[_E] = (0, import_smithy_client.parseBoolean)(output[_E]);\n }\n if (output[_RSOAR] != null) {\n contents[_RSOAR] = (0, import_smithy_client.parseBoolean)(output[_RSOAR]);\n }\n return contents;\n}, \"de_AutoDeployment\");\nvar de_BatchDescribeTypeConfigurationsError = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_EC] != null) {\n contents[_EC] = (0, import_smithy_client.expectString)(output[_EC]);\n }\n if (output[_EM] != null) {\n contents[_EM] = (0, import_smithy_client.expectString)(output[_EM]);\n }\n if (output[_TCIy] != null) {\n contents[_TCIy] = de_TypeConfigurationIdentifier(output[_TCIy], context);\n }\n return contents;\n}, \"de_BatchDescribeTypeConfigurationsError\");\nvar de_BatchDescribeTypeConfigurationsErrors = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_BatchDescribeTypeConfigurationsError(entry, context);\n });\n}, \"de_BatchDescribeTypeConfigurationsErrors\");\nvar de_BatchDescribeTypeConfigurationsOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output.Errors === \"\") {\n contents[_Er] = [];\n } else if (output[_Er] != null && output[_Er][_m] != null) {\n contents[_Er] = de_BatchDescribeTypeConfigurationsErrors((0, import_smithy_client.getArrayIfSingleItem)(output[_Er][_m]), context);\n }\n if (output.UnprocessedTypeConfigurations === \"\") {\n contents[_UTC] = [];\n } else if (output[_UTC] != null && output[_UTC][_m] != null) {\n contents[_UTC] = de_UnprocessedTypeConfigurations((0, import_smithy_client.getArrayIfSingleItem)(output[_UTC][_m]), context);\n }\n if (output.TypeConfigurations === \"\") {\n contents[_TCy] = [];\n } else if (output[_TCy] != null && output[_TCy][_m] != null) {\n contents[_TCy] = de_TypeConfigurationDetailsList((0, import_smithy_client.getArrayIfSingleItem)(output[_TCy][_m]), context);\n }\n return contents;\n}, \"de_BatchDescribeTypeConfigurationsOutput\");\nvar de_Capabilities = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return (0, import_smithy_client.expectString)(entry);\n });\n}, \"de_Capabilities\");\nvar de_CFNRegistryException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_M] != null) {\n contents[_M] = (0, import_smithy_client.expectString)(output[_M]);\n }\n return contents;\n}, \"de_CFNRegistryException\");\nvar de_Change = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_T] != null) {\n contents[_T] = (0, import_smithy_client.expectString)(output[_T]);\n }\n if (output[_HIC] != null) {\n contents[_HIC] = (0, import_smithy_client.strictParseInt32)(output[_HIC]);\n }\n if (output[_RCe] != null) {\n contents[_RCe] = de_ResourceChange(output[_RCe], context);\n }\n return contents;\n}, \"de_Change\");\nvar de_Changes = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_Change(entry, context);\n });\n}, \"de_Changes\");\nvar de_ChangeSetHook = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_IP] != null) {\n contents[_IP] = (0, import_smithy_client.expectString)(output[_IP]);\n }\n if (output[_FM] != null) {\n contents[_FM] = (0, import_smithy_client.expectString)(output[_FM]);\n }\n if (output[_TN] != null) {\n contents[_TN] = (0, import_smithy_client.expectString)(output[_TN]);\n }\n if (output[_TVI] != null) {\n contents[_TVI] = (0, import_smithy_client.expectString)(output[_TVI]);\n }\n if (output[_TCVI] != null) {\n contents[_TCVI] = (0, import_smithy_client.expectString)(output[_TCVI]);\n }\n if (output[_TD] != null) {\n contents[_TD] = de_ChangeSetHookTargetDetails(output[_TD], context);\n }\n return contents;\n}, \"de_ChangeSetHook\");\nvar de_ChangeSetHookResourceTargetDetails = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_LRI] != null) {\n contents[_LRI] = (0, import_smithy_client.expectString)(output[_LRI]);\n }\n if (output[_RTes] != null) {\n contents[_RTes] = (0, import_smithy_client.expectString)(output[_RTes]);\n }\n if (output[_RA] != null) {\n contents[_RA] = (0, import_smithy_client.expectString)(output[_RA]);\n }\n return contents;\n}, \"de_ChangeSetHookResourceTargetDetails\");\nvar de_ChangeSetHooks = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_ChangeSetHook(entry, context);\n });\n}, \"de_ChangeSetHooks\");\nvar de_ChangeSetHookTargetDetails = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_TTa] != null) {\n contents[_TTa] = (0, import_smithy_client.expectString)(output[_TTa]);\n }\n if (output[_RTD] != null) {\n contents[_RTD] = de_ChangeSetHookResourceTargetDetails(output[_RTD], context);\n }\n return contents;\n}, \"de_ChangeSetHookTargetDetails\");\nvar de_ChangeSetNotFoundException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_M] != null) {\n contents[_M] = (0, import_smithy_client.expectString)(output[_M]);\n }\n return contents;\n}, \"de_ChangeSetNotFoundException\");\nvar de_ChangeSetSummaries = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_ChangeSetSummary(entry, context);\n });\n}, \"de_ChangeSetSummaries\");\nvar de_ChangeSetSummary = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_SI] != null) {\n contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);\n }\n if (output[_SN] != null) {\n contents[_SN] = (0, import_smithy_client.expectString)(output[_SN]);\n }\n if (output[_CSIh] != null) {\n contents[_CSIh] = (0, import_smithy_client.expectString)(output[_CSIh]);\n }\n if (output[_CSN] != null) {\n contents[_CSN] = (0, import_smithy_client.expectString)(output[_CSN]);\n }\n if (output[_ES] != null) {\n contents[_ES] = (0, import_smithy_client.expectString)(output[_ES]);\n }\n if (output[_S] != null) {\n contents[_S] = (0, import_smithy_client.expectString)(output[_S]);\n }\n if (output[_SRt] != null) {\n contents[_SRt] = (0, import_smithy_client.expectString)(output[_SRt]);\n }\n if (output[_CTr] != null) {\n contents[_CTr] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_CTr]));\n }\n if (output[_D] != null) {\n contents[_D] = (0, import_smithy_client.expectString)(output[_D]);\n }\n if (output[_INS] != null) {\n contents[_INS] = (0, import_smithy_client.parseBoolean)(output[_INS]);\n }\n if (output[_PCSI] != null) {\n contents[_PCSI] = (0, import_smithy_client.expectString)(output[_PCSI]);\n }\n if (output[_RCSI] != null) {\n contents[_RCSI] = (0, import_smithy_client.expectString)(output[_RCSI]);\n }\n if (output[_IER] != null) {\n contents[_IER] = (0, import_smithy_client.parseBoolean)(output[_IER]);\n }\n return contents;\n}, \"de_ChangeSetSummary\");\nvar de_ConcurrentResourcesLimitExceededException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_M] != null) {\n contents[_M] = (0, import_smithy_client.expectString)(output[_M]);\n }\n return contents;\n}, \"de_ConcurrentResourcesLimitExceededException\");\nvar de_ContinueUpdateRollbackOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n return contents;\n}, \"de_ContinueUpdateRollbackOutput\");\nvar de_CreateChangeSetOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_I] != null) {\n contents[_I] = (0, import_smithy_client.expectString)(output[_I]);\n }\n if (output[_SI] != null) {\n contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);\n }\n return contents;\n}, \"de_CreateChangeSetOutput\");\nvar de_CreatedButModifiedException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_M] != null) {\n contents[_M] = (0, import_smithy_client.expectString)(output[_M]);\n }\n return contents;\n}, \"de_CreatedButModifiedException\");\nvar de_CreateGeneratedTemplateOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_GTI] != null) {\n contents[_GTI] = (0, import_smithy_client.expectString)(output[_GTI]);\n }\n return contents;\n}, \"de_CreateGeneratedTemplateOutput\");\nvar de_CreateStackInstancesOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_OI] != null) {\n contents[_OI] = (0, import_smithy_client.expectString)(output[_OI]);\n }\n return contents;\n}, \"de_CreateStackInstancesOutput\");\nvar de_CreateStackOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_SI] != null) {\n contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);\n }\n return contents;\n}, \"de_CreateStackOutput\");\nvar de_CreateStackRefactorOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_SRI] != null) {\n contents[_SRI] = (0, import_smithy_client.expectString)(output[_SRI]);\n }\n return contents;\n}, \"de_CreateStackRefactorOutput\");\nvar de_CreateStackSetOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_SSI] != null) {\n contents[_SSI] = (0, import_smithy_client.expectString)(output[_SSI]);\n }\n return contents;\n}, \"de_CreateStackSetOutput\");\nvar de_DeactivateOrganizationsAccessOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n return contents;\n}, \"de_DeactivateOrganizationsAccessOutput\");\nvar de_DeactivateTypeOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n return contents;\n}, \"de_DeactivateTypeOutput\");\nvar de_DeleteChangeSetOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n return contents;\n}, \"de_DeleteChangeSetOutput\");\nvar de_DeleteStackInstancesOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_OI] != null) {\n contents[_OI] = (0, import_smithy_client.expectString)(output[_OI]);\n }\n return contents;\n}, \"de_DeleteStackInstancesOutput\");\nvar de_DeleteStackSetOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n return contents;\n}, \"de_DeleteStackSetOutput\");\nvar de_DeploymentTargets = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output.Accounts === \"\") {\n contents[_Ac] = [];\n } else if (output[_Ac] != null && output[_Ac][_m] != null) {\n contents[_Ac] = de_AccountList((0, import_smithy_client.getArrayIfSingleItem)(output[_Ac][_m]), context);\n }\n if (output[_AUc] != null) {\n contents[_AUc] = (0, import_smithy_client.expectString)(output[_AUc]);\n }\n if (output.OrganizationalUnitIds === \"\") {\n contents[_OUI] = [];\n } else if (output[_OUI] != null && output[_OUI][_m] != null) {\n contents[_OUI] = de_OrganizationalUnitIdList((0, import_smithy_client.getArrayIfSingleItem)(output[_OUI][_m]), context);\n }\n if (output[_AFT] != null) {\n contents[_AFT] = (0, import_smithy_client.expectString)(output[_AFT]);\n }\n return contents;\n}, \"de_DeploymentTargets\");\nvar de_DeregisterTypeOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n return contents;\n}, \"de_DeregisterTypeOutput\");\nvar de_DescribeAccountLimitsOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output.AccountLimits === \"\") {\n contents[_AL] = [];\n } else if (output[_AL] != null && output[_AL][_m] != null) {\n contents[_AL] = de_AccountLimitList((0, import_smithy_client.getArrayIfSingleItem)(output[_AL][_m]), context);\n }\n if (output[_NT] != null) {\n contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);\n }\n return contents;\n}, \"de_DescribeAccountLimitsOutput\");\nvar de_DescribeChangeSetHooksOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_CSIh] != null) {\n contents[_CSIh] = (0, import_smithy_client.expectString)(output[_CSIh]);\n }\n if (output[_CSN] != null) {\n contents[_CSN] = (0, import_smithy_client.expectString)(output[_CSN]);\n }\n if (output.Hooks === \"\") {\n contents[_H] = [];\n } else if (output[_H] != null && output[_H][_m] != null) {\n contents[_H] = de_ChangeSetHooks((0, import_smithy_client.getArrayIfSingleItem)(output[_H][_m]), context);\n }\n if (output[_S] != null) {\n contents[_S] = (0, import_smithy_client.expectString)(output[_S]);\n }\n if (output[_NT] != null) {\n contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);\n }\n if (output[_SI] != null) {\n contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);\n }\n if (output[_SN] != null) {\n contents[_SN] = (0, import_smithy_client.expectString)(output[_SN]);\n }\n return contents;\n}, \"de_DescribeChangeSetHooksOutput\");\nvar de_DescribeChangeSetOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_CSN] != null) {\n contents[_CSN] = (0, import_smithy_client.expectString)(output[_CSN]);\n }\n if (output[_CSIh] != null) {\n contents[_CSIh] = (0, import_smithy_client.expectString)(output[_CSIh]);\n }\n if (output[_SI] != null) {\n contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);\n }\n if (output[_SN] != null) {\n contents[_SN] = (0, import_smithy_client.expectString)(output[_SN]);\n }\n if (output[_D] != null) {\n contents[_D] = (0, import_smithy_client.expectString)(output[_D]);\n }\n if (output.Parameters === \"\") {\n contents[_P] = [];\n } else if (output[_P] != null && output[_P][_m] != null) {\n contents[_P] = de_Parameters((0, import_smithy_client.getArrayIfSingleItem)(output[_P][_m]), context);\n }\n if (output[_CTr] != null) {\n contents[_CTr] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_CTr]));\n }\n if (output[_ES] != null) {\n contents[_ES] = (0, import_smithy_client.expectString)(output[_ES]);\n }\n if (output[_S] != null) {\n contents[_S] = (0, import_smithy_client.expectString)(output[_S]);\n }\n if (output[_SRt] != null) {\n contents[_SRt] = (0, import_smithy_client.expectString)(output[_SRt]);\n }\n if (output.NotificationARNs === \"\") {\n contents[_NARN] = [];\n } else if (output[_NARN] != null && output[_NARN][_m] != null) {\n contents[_NARN] = de_NotificationARNs((0, import_smithy_client.getArrayIfSingleItem)(output[_NARN][_m]), context);\n }\n if (output[_RC] != null) {\n contents[_RC] = de_RollbackConfiguration(output[_RC], context);\n }\n if (output.Capabilities === \"\") {\n contents[_C] = [];\n } else if (output[_C] != null && output[_C][_m] != null) {\n contents[_C] = de_Capabilities((0, import_smithy_client.getArrayIfSingleItem)(output[_C][_m]), context);\n }\n if (output.Tags === \"\") {\n contents[_Ta] = [];\n } else if (output[_Ta] != null && output[_Ta][_m] != null) {\n contents[_Ta] = de_Tags((0, import_smithy_client.getArrayIfSingleItem)(output[_Ta][_m]), context);\n }\n if (output.Changes === \"\") {\n contents[_Ch] = [];\n } else if (output[_Ch] != null && output[_Ch][_m] != null) {\n contents[_Ch] = de_Changes((0, import_smithy_client.getArrayIfSingleItem)(output[_Ch][_m]), context);\n }\n if (output[_NT] != null) {\n contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);\n }\n if (output[_INS] != null) {\n contents[_INS] = (0, import_smithy_client.parseBoolean)(output[_INS]);\n }\n if (output[_PCSI] != null) {\n contents[_PCSI] = (0, import_smithy_client.expectString)(output[_PCSI]);\n }\n if (output[_RCSI] != null) {\n contents[_RCSI] = (0, import_smithy_client.expectString)(output[_RCSI]);\n }\n if (output[_OSF] != null) {\n contents[_OSF] = (0, import_smithy_client.expectString)(output[_OSF]);\n }\n if (output[_IER] != null) {\n contents[_IER] = (0, import_smithy_client.parseBoolean)(output[_IER]);\n }\n return contents;\n}, \"de_DescribeChangeSetOutput\");\nvar de_DescribeGeneratedTemplateOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_GTI] != null) {\n contents[_GTI] = (0, import_smithy_client.expectString)(output[_GTI]);\n }\n if (output[_GTN] != null) {\n contents[_GTN] = (0, import_smithy_client.expectString)(output[_GTN]);\n }\n if (output.Resources === \"\") {\n contents[_R] = [];\n } else if (output[_R] != null && output[_R][_m] != null) {\n contents[_R] = de_ResourceDetails((0, import_smithy_client.getArrayIfSingleItem)(output[_R][_m]), context);\n }\n if (output[_S] != null) {\n contents[_S] = (0, import_smithy_client.expectString)(output[_S]);\n }\n if (output[_SRt] != null) {\n contents[_SRt] = (0, import_smithy_client.expectString)(output[_SRt]);\n }\n if (output[_CTr] != null) {\n contents[_CTr] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_CTr]));\n }\n if (output[_LUT] != null) {\n contents[_LUT] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LUT]));\n }\n if (output[_Pr] != null) {\n contents[_Pr] = de_TemplateProgress(output[_Pr], context);\n }\n if (output[_SI] != null) {\n contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);\n }\n if (output[_TC] != null) {\n contents[_TC] = de_TemplateConfiguration(output[_TC], context);\n }\n if (output[_TW] != null) {\n contents[_TW] = (0, import_smithy_client.strictParseInt32)(output[_TW]);\n }\n return contents;\n}, \"de_DescribeGeneratedTemplateOutput\");\nvar de_DescribeOrganizationsAccessOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_S] != null) {\n contents[_S] = (0, import_smithy_client.expectString)(output[_S]);\n }\n return contents;\n}, \"de_DescribeOrganizationsAccessOutput\");\nvar de_DescribePublisherOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_PI] != null) {\n contents[_PI] = (0, import_smithy_client.expectString)(output[_PI]);\n }\n if (output[_PS] != null) {\n contents[_PS] = (0, import_smithy_client.expectString)(output[_PS]);\n }\n if (output[_IPd] != null) {\n contents[_IPd] = (0, import_smithy_client.expectString)(output[_IPd]);\n }\n if (output[_PP] != null) {\n contents[_PP] = (0, import_smithy_client.expectString)(output[_PP]);\n }\n return contents;\n}, \"de_DescribePublisherOutput\");\nvar de_DescribeResourceScanOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_RSI] != null) {\n contents[_RSI] = (0, import_smithy_client.expectString)(output[_RSI]);\n }\n if (output[_S] != null) {\n contents[_S] = (0, import_smithy_client.expectString)(output[_S]);\n }\n if (output[_SRt] != null) {\n contents[_SRt] = (0, import_smithy_client.expectString)(output[_SRt]);\n }\n if (output[_ST] != null) {\n contents[_ST] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_ST]));\n }\n if (output[_ET] != null) {\n contents[_ET] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_ET]));\n }\n if (output[_PC] != null) {\n contents[_PC] = (0, import_smithy_client.strictParseFloat)(output[_PC]);\n }\n if (output.ResourceTypes === \"\") {\n contents[_RTe] = [];\n } else if (output[_RTe] != null && output[_RTe][_m] != null) {\n contents[_RTe] = de_ResourceTypes((0, import_smithy_client.getArrayIfSingleItem)(output[_RTe][_m]), context);\n }\n if (output[_RSes] != null) {\n contents[_RSes] = (0, import_smithy_client.strictParseInt32)(output[_RSes]);\n }\n if (output[_RRes] != null) {\n contents[_RRes] = (0, import_smithy_client.strictParseInt32)(output[_RRes]);\n }\n if (output.ScanFilters === \"\") {\n contents[_SF] = [];\n } else if (output[_SF] != null && output[_SF][_m] != null) {\n contents[_SF] = de_ScanFilters((0, import_smithy_client.getArrayIfSingleItem)(output[_SF][_m]), context);\n }\n return contents;\n}, \"de_DescribeResourceScanOutput\");\nvar de_DescribeStackDriftDetectionStatusOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_SI] != null) {\n contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);\n }\n if (output[_SDDI] != null) {\n contents[_SDDI] = (0, import_smithy_client.expectString)(output[_SDDI]);\n }\n if (output[_SDS] != null) {\n contents[_SDS] = (0, import_smithy_client.expectString)(output[_SDS]);\n }\n if (output[_DSet] != null) {\n contents[_DSet] = (0, import_smithy_client.expectString)(output[_DSet]);\n }\n if (output[_DSRet] != null) {\n contents[_DSRet] = (0, import_smithy_client.expectString)(output[_DSRet]);\n }\n if (output[_DSRC] != null) {\n contents[_DSRC] = (0, import_smithy_client.strictParseInt32)(output[_DSRC]);\n }\n if (output[_Ti] != null) {\n contents[_Ti] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_Ti]));\n }\n return contents;\n}, \"de_DescribeStackDriftDetectionStatusOutput\");\nvar de_DescribeStackEventsOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output.StackEvents === \"\") {\n contents[_SE] = [];\n } else if (output[_SE] != null && output[_SE][_m] != null) {\n contents[_SE] = de_StackEvents((0, import_smithy_client.getArrayIfSingleItem)(output[_SE][_m]), context);\n }\n if (output[_NT] != null) {\n contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);\n }\n return contents;\n}, \"de_DescribeStackEventsOutput\");\nvar de_DescribeStackInstanceOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_SIta] != null) {\n contents[_SIta] = de_StackInstance(output[_SIta], context);\n }\n return contents;\n}, \"de_DescribeStackInstanceOutput\");\nvar de_DescribeStackRefactorOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_D] != null) {\n contents[_D] = (0, import_smithy_client.expectString)(output[_D]);\n }\n if (output[_SRI] != null) {\n contents[_SRI] = (0, import_smithy_client.expectString)(output[_SRI]);\n }\n if (output.StackIds === \"\") {\n contents[_SIt] = [];\n } else if (output[_SIt] != null && output[_SIt][_m] != null) {\n contents[_SIt] = de_StackIds((0, import_smithy_client.getArrayIfSingleItem)(output[_SIt][_m]), context);\n }\n if (output[_ES] != null) {\n contents[_ES] = (0, import_smithy_client.expectString)(output[_ES]);\n }\n if (output[_ESRx] != null) {\n contents[_ESRx] = (0, import_smithy_client.expectString)(output[_ESRx]);\n }\n if (output[_S] != null) {\n contents[_S] = (0, import_smithy_client.expectString)(output[_S]);\n }\n if (output[_SRt] != null) {\n contents[_SRt] = (0, import_smithy_client.expectString)(output[_SRt]);\n }\n return contents;\n}, \"de_DescribeStackRefactorOutput\");\nvar de_DescribeStackResourceDriftsOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output.StackResourceDrifts === \"\") {\n contents[_SRD] = [];\n } else if (output[_SRD] != null && output[_SRD][_m] != null) {\n contents[_SRD] = de_StackResourceDrifts((0, import_smithy_client.getArrayIfSingleItem)(output[_SRD][_m]), context);\n }\n if (output[_NT] != null) {\n contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);\n }\n return contents;\n}, \"de_DescribeStackResourceDriftsOutput\");\nvar de_DescribeStackResourceOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_SRDt] != null) {\n contents[_SRDt] = de_StackResourceDetail(output[_SRDt], context);\n }\n return contents;\n}, \"de_DescribeStackResourceOutput\");\nvar de_DescribeStackResourcesOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output.StackResources === \"\") {\n contents[_SRta] = [];\n } else if (output[_SRta] != null && output[_SRta][_m] != null) {\n contents[_SRta] = de_StackResources((0, import_smithy_client.getArrayIfSingleItem)(output[_SRta][_m]), context);\n }\n return contents;\n}, \"de_DescribeStackResourcesOutput\");\nvar de_DescribeStackSetOperationOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_SSO] != null) {\n contents[_SSO] = de_StackSetOperation(output[_SSO], context);\n }\n return contents;\n}, \"de_DescribeStackSetOperationOutput\");\nvar de_DescribeStackSetOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_SS] != null) {\n contents[_SS] = de_StackSet(output[_SS], context);\n }\n return contents;\n}, \"de_DescribeStackSetOutput\");\nvar de_DescribeStacksOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output.Stacks === \"\") {\n contents[_St] = [];\n } else if (output[_St] != null && output[_St][_m] != null) {\n contents[_St] = de_Stacks((0, import_smithy_client.getArrayIfSingleItem)(output[_St][_m]), context);\n }\n if (output[_NT] != null) {\n contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);\n }\n return contents;\n}, \"de_DescribeStacksOutput\");\nvar de_DescribeTypeOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_Ar] != null) {\n contents[_Ar] = (0, import_smithy_client.expectString)(output[_Ar]);\n }\n if (output[_T] != null) {\n contents[_T] = (0, import_smithy_client.expectString)(output[_T]);\n }\n if (output[_TN] != null) {\n contents[_TN] = (0, import_smithy_client.expectString)(output[_TN]);\n }\n if (output[_DVI] != null) {\n contents[_DVI] = (0, import_smithy_client.expectString)(output[_DVI]);\n }\n if (output[_IDV] != null) {\n contents[_IDV] = (0, import_smithy_client.parseBoolean)(output[_IDV]);\n }\n if (output[_TTS] != null) {\n contents[_TTS] = (0, import_smithy_client.expectString)(output[_TTS]);\n }\n if (output[_TTSD] != null) {\n contents[_TTSD] = (0, import_smithy_client.expectString)(output[_TTSD]);\n }\n if (output[_D] != null) {\n contents[_D] = (0, import_smithy_client.expectString)(output[_D]);\n }\n if (output[_Sc] != null) {\n contents[_Sc] = (0, import_smithy_client.expectString)(output[_Sc]);\n }\n if (output[_PTr] != null) {\n contents[_PTr] = (0, import_smithy_client.expectString)(output[_PTr]);\n }\n if (output[_DSep] != null) {\n contents[_DSep] = (0, import_smithy_client.expectString)(output[_DSep]);\n }\n if (output[_LC] != null) {\n contents[_LC] = de_LoggingConfig(output[_LC], context);\n }\n if (output.RequiredActivatedTypes === \"\") {\n contents[_RAT] = [];\n } else if (output[_RAT] != null && output[_RAT][_m] != null) {\n contents[_RAT] = de_RequiredActivatedTypes((0, import_smithy_client.getArrayIfSingleItem)(output[_RAT][_m]), context);\n }\n if (output[_ERA] != null) {\n contents[_ERA] = (0, import_smithy_client.expectString)(output[_ERA]);\n }\n if (output[_Vi] != null) {\n contents[_Vi] = (0, import_smithy_client.expectString)(output[_Vi]);\n }\n if (output[_SU] != null) {\n contents[_SU] = (0, import_smithy_client.expectString)(output[_SU]);\n }\n if (output[_DU] != null) {\n contents[_DU] = (0, import_smithy_client.expectString)(output[_DU]);\n }\n if (output[_LU] != null) {\n contents[_LU] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LU]));\n }\n if (output[_TCi] != null) {\n contents[_TCi] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_TCi]));\n }\n if (output[_CSo] != null) {\n contents[_CSo] = (0, import_smithy_client.expectString)(output[_CSo]);\n }\n if (output[_PI] != null) {\n contents[_PI] = (0, import_smithy_client.expectString)(output[_PI]);\n }\n if (output[_OTN] != null) {\n contents[_OTN] = (0, import_smithy_client.expectString)(output[_OTN]);\n }\n if (output[_OTA] != null) {\n contents[_OTA] = (0, import_smithy_client.expectString)(output[_OTA]);\n }\n if (output[_PVN] != null) {\n contents[_PVN] = (0, import_smithy_client.expectString)(output[_PVN]);\n }\n if (output[_LPV] != null) {\n contents[_LPV] = (0, import_smithy_client.expectString)(output[_LPV]);\n }\n if (output[_IA] != null) {\n contents[_IA] = (0, import_smithy_client.parseBoolean)(output[_IA]);\n }\n if (output[_AU] != null) {\n contents[_AU] = (0, import_smithy_client.parseBoolean)(output[_AU]);\n }\n return contents;\n}, \"de_DescribeTypeOutput\");\nvar de_DescribeTypeRegistrationOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_PSr] != null) {\n contents[_PSr] = (0, import_smithy_client.expectString)(output[_PSr]);\n }\n if (output[_D] != null) {\n contents[_D] = (0, import_smithy_client.expectString)(output[_D]);\n }\n if (output[_TA] != null) {\n contents[_TA] = (0, import_smithy_client.expectString)(output[_TA]);\n }\n if (output[_TVA] != null) {\n contents[_TVA] = (0, import_smithy_client.expectString)(output[_TVA]);\n }\n return contents;\n}, \"de_DescribeTypeRegistrationOutput\");\nvar de_DetectStackDriftOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_SDDI] != null) {\n contents[_SDDI] = (0, import_smithy_client.expectString)(output[_SDDI]);\n }\n return contents;\n}, \"de_DetectStackDriftOutput\");\nvar de_DetectStackResourceDriftOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_SRDta] != null) {\n contents[_SRDta] = de_StackResourceDrift(output[_SRDta], context);\n }\n return contents;\n}, \"de_DetectStackResourceDriftOutput\");\nvar de_DetectStackSetDriftOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_OI] != null) {\n contents[_OI] = (0, import_smithy_client.expectString)(output[_OI]);\n }\n return contents;\n}, \"de_DetectStackSetDriftOutput\");\nvar de_EstimateTemplateCostOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_U] != null) {\n contents[_U] = (0, import_smithy_client.expectString)(output[_U]);\n }\n return contents;\n}, \"de_EstimateTemplateCostOutput\");\nvar de_ExecuteChangeSetOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n return contents;\n}, \"de_ExecuteChangeSetOutput\");\nvar de_Export = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_ESI] != null) {\n contents[_ESI] = (0, import_smithy_client.expectString)(output[_ESI]);\n }\n if (output[_N] != null) {\n contents[_N] = (0, import_smithy_client.expectString)(output[_N]);\n }\n if (output[_Val] != null) {\n contents[_Val] = (0, import_smithy_client.expectString)(output[_Val]);\n }\n return contents;\n}, \"de_Export\");\nvar de_Exports = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_Export(entry, context);\n });\n}, \"de_Exports\");\nvar de_GeneratedTemplateNotFoundException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_M] != null) {\n contents[_M] = (0, import_smithy_client.expectString)(output[_M]);\n }\n return contents;\n}, \"de_GeneratedTemplateNotFoundException\");\nvar de_GetGeneratedTemplateOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_S] != null) {\n contents[_S] = (0, import_smithy_client.expectString)(output[_S]);\n }\n if (output[_TB] != null) {\n contents[_TB] = (0, import_smithy_client.expectString)(output[_TB]);\n }\n return contents;\n}, \"de_GetGeneratedTemplateOutput\");\nvar de_GetStackPolicyOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_SPB] != null) {\n contents[_SPB] = (0, import_smithy_client.expectString)(output[_SPB]);\n }\n return contents;\n}, \"de_GetStackPolicyOutput\");\nvar de_GetTemplateOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_TB] != null) {\n contents[_TB] = (0, import_smithy_client.expectString)(output[_TB]);\n }\n if (output.StagesAvailable === \"\") {\n contents[_SA] = [];\n } else if (output[_SA] != null && output[_SA][_m] != null) {\n contents[_SA] = de_StageList((0, import_smithy_client.getArrayIfSingleItem)(output[_SA][_m]), context);\n }\n return contents;\n}, \"de_GetTemplateOutput\");\nvar de_GetTemplateSummaryOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output.Parameters === \"\") {\n contents[_P] = [];\n } else if (output[_P] != null && output[_P][_m] != null) {\n contents[_P] = de_ParameterDeclarations((0, import_smithy_client.getArrayIfSingleItem)(output[_P][_m]), context);\n }\n if (output[_D] != null) {\n contents[_D] = (0, import_smithy_client.expectString)(output[_D]);\n }\n if (output.Capabilities === \"\") {\n contents[_C] = [];\n } else if (output[_C] != null && output[_C][_m] != null) {\n contents[_C] = de_Capabilities((0, import_smithy_client.getArrayIfSingleItem)(output[_C][_m]), context);\n }\n if (output[_CR] != null) {\n contents[_CR] = (0, import_smithy_client.expectString)(output[_CR]);\n }\n if (output.ResourceTypes === \"\") {\n contents[_RTe] = [];\n } else if (output[_RTe] != null && output[_RTe][_m] != null) {\n contents[_RTe] = de_ResourceTypes((0, import_smithy_client.getArrayIfSingleItem)(output[_RTe][_m]), context);\n }\n if (output[_V] != null) {\n contents[_V] = (0, import_smithy_client.expectString)(output[_V]);\n }\n if (output[_Me] != null) {\n contents[_Me] = (0, import_smithy_client.expectString)(output[_Me]);\n }\n if (output.DeclaredTransforms === \"\") {\n contents[_DTec] = [];\n } else if (output[_DTec] != null && output[_DTec][_m] != null) {\n contents[_DTec] = de_TransformsList((0, import_smithy_client.getArrayIfSingleItem)(output[_DTec][_m]), context);\n }\n if (output.ResourceIdentifierSummaries === \"\") {\n contents[_RIS] = [];\n } else if (output[_RIS] != null && output[_RIS][_m] != null) {\n contents[_RIS] = de_ResourceIdentifierSummaries((0, import_smithy_client.getArrayIfSingleItem)(output[_RIS][_m]), context);\n }\n if (output[_W] != null) {\n contents[_W] = de_Warnings(output[_W], context);\n }\n return contents;\n}, \"de_GetTemplateSummaryOutput\");\nvar de_HookResultNotFoundException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_M] != null) {\n contents[_M] = (0, import_smithy_client.expectString)(output[_M]);\n }\n return contents;\n}, \"de_HookResultNotFoundException\");\nvar de_HookResultSummaries = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_HookResultSummary(entry, context);\n });\n}, \"de_HookResultSummaries\");\nvar de_HookResultSummary = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_IP] != null) {\n contents[_IP] = (0, import_smithy_client.expectString)(output[_IP]);\n }\n if (output[_FM] != null) {\n contents[_FM] = (0, import_smithy_client.expectString)(output[_FM]);\n }\n if (output[_TN] != null) {\n contents[_TN] = (0, import_smithy_client.expectString)(output[_TN]);\n }\n if (output[_TVI] != null) {\n contents[_TVI] = (0, import_smithy_client.expectString)(output[_TVI]);\n }\n if (output[_TCVI] != null) {\n contents[_TCVI] = (0, import_smithy_client.expectString)(output[_TCVI]);\n }\n if (output[_S] != null) {\n contents[_S] = (0, import_smithy_client.expectString)(output[_S]);\n }\n if (output[_HSR] != null) {\n contents[_HSR] = (0, import_smithy_client.expectString)(output[_HSR]);\n }\n return contents;\n}, \"de_HookResultSummary\");\nvar de_Imports = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return (0, import_smithy_client.expectString)(entry);\n });\n}, \"de_Imports\");\nvar de_ImportStacksToStackSetOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_OI] != null) {\n contents[_OI] = (0, import_smithy_client.expectString)(output[_OI]);\n }\n return contents;\n}, \"de_ImportStacksToStackSetOutput\");\nvar de_InsufficientCapabilitiesException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_M] != null) {\n contents[_M] = (0, import_smithy_client.expectString)(output[_M]);\n }\n return contents;\n}, \"de_InsufficientCapabilitiesException\");\nvar de_InvalidChangeSetStatusException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_M] != null) {\n contents[_M] = (0, import_smithy_client.expectString)(output[_M]);\n }\n return contents;\n}, \"de_InvalidChangeSetStatusException\");\nvar de_InvalidOperationException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_M] != null) {\n contents[_M] = (0, import_smithy_client.expectString)(output[_M]);\n }\n return contents;\n}, \"de_InvalidOperationException\");\nvar de_InvalidStateTransitionException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_M] != null) {\n contents[_M] = (0, import_smithy_client.expectString)(output[_M]);\n }\n return contents;\n}, \"de_InvalidStateTransitionException\");\nvar de_JazzResourceIdentifierProperties = /* @__PURE__ */ __name((output, context) => {\n return output.reduce((acc, pair) => {\n if (pair[\"value\"] === null) {\n return acc;\n }\n acc[pair[\"key\"]] = (0, import_smithy_client.expectString)(pair[\"value\"]);\n return acc;\n }, {});\n}, \"de_JazzResourceIdentifierProperties\");\nvar de_LimitExceededException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_M] != null) {\n contents[_M] = (0, import_smithy_client.expectString)(output[_M]);\n }\n return contents;\n}, \"de_LimitExceededException\");\nvar de_ListChangeSetsOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output.Summaries === \"\") {\n contents[_Su] = [];\n } else if (output[_Su] != null && output[_Su][_m] != null) {\n contents[_Su] = de_ChangeSetSummaries((0, import_smithy_client.getArrayIfSingleItem)(output[_Su][_m]), context);\n }\n if (output[_NT] != null) {\n contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);\n }\n return contents;\n}, \"de_ListChangeSetsOutput\");\nvar de_ListExportsOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output.Exports === \"\") {\n contents[_Ex] = [];\n } else if (output[_Ex] != null && output[_Ex][_m] != null) {\n contents[_Ex] = de_Exports((0, import_smithy_client.getArrayIfSingleItem)(output[_Ex][_m]), context);\n }\n if (output[_NT] != null) {\n contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);\n }\n return contents;\n}, \"de_ListExportsOutput\");\nvar de_ListGeneratedTemplatesOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output.Summaries === \"\") {\n contents[_Su] = [];\n } else if (output[_Su] != null && output[_Su][_m] != null) {\n contents[_Su] = de_TemplateSummaries((0, import_smithy_client.getArrayIfSingleItem)(output[_Su][_m]), context);\n }\n if (output[_NT] != null) {\n contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);\n }\n return contents;\n}, \"de_ListGeneratedTemplatesOutput\");\nvar de_ListHookResultsOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_TTa] != null) {\n contents[_TTa] = (0, import_smithy_client.expectString)(output[_TTa]);\n }\n if (output[_TI] != null) {\n contents[_TI] = (0, import_smithy_client.expectString)(output[_TI]);\n }\n if (output.HookResults === \"\") {\n contents[_HR] = [];\n } else if (output[_HR] != null && output[_HR][_m] != null) {\n contents[_HR] = de_HookResultSummaries((0, import_smithy_client.getArrayIfSingleItem)(output[_HR][_m]), context);\n }\n if (output[_NT] != null) {\n contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);\n }\n return contents;\n}, \"de_ListHookResultsOutput\");\nvar de_ListImportsOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output.Imports === \"\") {\n contents[_Im] = [];\n } else if (output[_Im] != null && output[_Im][_m] != null) {\n contents[_Im] = de_Imports((0, import_smithy_client.getArrayIfSingleItem)(output[_Im][_m]), context);\n }\n if (output[_NT] != null) {\n contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);\n }\n return contents;\n}, \"de_ListImportsOutput\");\nvar de_ListResourceScanRelatedResourcesOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output.RelatedResources === \"\") {\n contents[_RRel] = [];\n } else if (output[_RRel] != null && output[_RRel][_m] != null) {\n contents[_RRel] = de_RelatedResources((0, import_smithy_client.getArrayIfSingleItem)(output[_RRel][_m]), context);\n }\n if (output[_NT] != null) {\n contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);\n }\n return contents;\n}, \"de_ListResourceScanRelatedResourcesOutput\");\nvar de_ListResourceScanResourcesOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output.Resources === \"\") {\n contents[_R] = [];\n } else if (output[_R] != null && output[_R][_m] != null) {\n contents[_R] = de_ScannedResources((0, import_smithy_client.getArrayIfSingleItem)(output[_R][_m]), context);\n }\n if (output[_NT] != null) {\n contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);\n }\n return contents;\n}, \"de_ListResourceScanResourcesOutput\");\nvar de_ListResourceScansOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output.ResourceScanSummaries === \"\") {\n contents[_RSS] = [];\n } else if (output[_RSS] != null && output[_RSS][_m] != null) {\n contents[_RSS] = de_ResourceScanSummaries((0, import_smithy_client.getArrayIfSingleItem)(output[_RSS][_m]), context);\n }\n if (output[_NT] != null) {\n contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);\n }\n return contents;\n}, \"de_ListResourceScansOutput\");\nvar de_ListStackInstanceResourceDriftsOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output.Summaries === \"\") {\n contents[_Su] = [];\n } else if (output[_Su] != null && output[_Su][_m] != null) {\n contents[_Su] = de_StackInstanceResourceDriftsSummaries((0, import_smithy_client.getArrayIfSingleItem)(output[_Su][_m]), context);\n }\n if (output[_NT] != null) {\n contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);\n }\n return contents;\n}, \"de_ListStackInstanceResourceDriftsOutput\");\nvar de_ListStackInstancesOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output.Summaries === \"\") {\n contents[_Su] = [];\n } else if (output[_Su] != null && output[_Su][_m] != null) {\n contents[_Su] = de_StackInstanceSummaries((0, import_smithy_client.getArrayIfSingleItem)(output[_Su][_m]), context);\n }\n if (output[_NT] != null) {\n contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);\n }\n return contents;\n}, \"de_ListStackInstancesOutput\");\nvar de_ListStackRefactorActionsOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output.StackRefactorActions === \"\") {\n contents[_SRA] = [];\n } else if (output[_SRA] != null && output[_SRA][_m] != null) {\n contents[_SRA] = de_StackRefactorActions((0, import_smithy_client.getArrayIfSingleItem)(output[_SRA][_m]), context);\n }\n if (output[_NT] != null) {\n contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);\n }\n return contents;\n}, \"de_ListStackRefactorActionsOutput\");\nvar de_ListStackRefactorsOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output.StackRefactorSummaries === \"\") {\n contents[_SRSt] = [];\n } else if (output[_SRSt] != null && output[_SRSt][_m] != null) {\n contents[_SRSt] = de_StackRefactorSummaries((0, import_smithy_client.getArrayIfSingleItem)(output[_SRSt][_m]), context);\n }\n if (output[_NT] != null) {\n contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);\n }\n return contents;\n}, \"de_ListStackRefactorsOutput\");\nvar de_ListStackResourcesOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output.StackResourceSummaries === \"\") {\n contents[_SRSta] = [];\n } else if (output[_SRSta] != null && output[_SRSta][_m] != null) {\n contents[_SRSta] = de_StackResourceSummaries((0, import_smithy_client.getArrayIfSingleItem)(output[_SRSta][_m]), context);\n }\n if (output[_NT] != null) {\n contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);\n }\n return contents;\n}, \"de_ListStackResourcesOutput\");\nvar de_ListStackSetAutoDeploymentTargetsOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output.Summaries === \"\") {\n contents[_Su] = [];\n } else if (output[_Su] != null && output[_Su][_m] != null) {\n contents[_Su] = de_StackSetAutoDeploymentTargetSummaries((0, import_smithy_client.getArrayIfSingleItem)(output[_Su][_m]), context);\n }\n if (output[_NT] != null) {\n contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);\n }\n return contents;\n}, \"de_ListStackSetAutoDeploymentTargetsOutput\");\nvar de_ListStackSetOperationResultsOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output.Summaries === \"\") {\n contents[_Su] = [];\n } else if (output[_Su] != null && output[_Su][_m] != null) {\n contents[_Su] = de_StackSetOperationResultSummaries((0, import_smithy_client.getArrayIfSingleItem)(output[_Su][_m]), context);\n }\n if (output[_NT] != null) {\n contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);\n }\n return contents;\n}, \"de_ListStackSetOperationResultsOutput\");\nvar de_ListStackSetOperationsOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output.Summaries === \"\") {\n contents[_Su] = [];\n } else if (output[_Su] != null && output[_Su][_m] != null) {\n contents[_Su] = de_StackSetOperationSummaries((0, import_smithy_client.getArrayIfSingleItem)(output[_Su][_m]), context);\n }\n if (output[_NT] != null) {\n contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);\n }\n return contents;\n}, \"de_ListStackSetOperationsOutput\");\nvar de_ListStackSetsOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output.Summaries === \"\") {\n contents[_Su] = [];\n } else if (output[_Su] != null && output[_Su][_m] != null) {\n contents[_Su] = de_StackSetSummaries((0, import_smithy_client.getArrayIfSingleItem)(output[_Su][_m]), context);\n }\n if (output[_NT] != null) {\n contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);\n }\n return contents;\n}, \"de_ListStackSetsOutput\");\nvar de_ListStacksOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output.StackSummaries === \"\") {\n contents[_SSt] = [];\n } else if (output[_SSt] != null && output[_SSt][_m] != null) {\n contents[_SSt] = de_StackSummaries((0, import_smithy_client.getArrayIfSingleItem)(output[_SSt][_m]), context);\n }\n if (output[_NT] != null) {\n contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);\n }\n return contents;\n}, \"de_ListStacksOutput\");\nvar de_ListTypeRegistrationsOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output.RegistrationTokenList === \"\") {\n contents[_RTL] = [];\n } else if (output[_RTL] != null && output[_RTL][_m] != null) {\n contents[_RTL] = de_RegistrationTokenList((0, import_smithy_client.getArrayIfSingleItem)(output[_RTL][_m]), context);\n }\n if (output[_NT] != null) {\n contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);\n }\n return contents;\n}, \"de_ListTypeRegistrationsOutput\");\nvar de_ListTypesOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output.TypeSummaries === \"\") {\n contents[_TSy] = [];\n } else if (output[_TSy] != null && output[_TSy][_m] != null) {\n contents[_TSy] = de_TypeSummaries((0, import_smithy_client.getArrayIfSingleItem)(output[_TSy][_m]), context);\n }\n if (output[_NT] != null) {\n contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);\n }\n return contents;\n}, \"de_ListTypesOutput\");\nvar de_ListTypeVersionsOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output.TypeVersionSummaries === \"\") {\n contents[_TVS] = [];\n } else if (output[_TVS] != null && output[_TVS][_m] != null) {\n contents[_TVS] = de_TypeVersionSummaries((0, import_smithy_client.getArrayIfSingleItem)(output[_TVS][_m]), context);\n }\n if (output[_NT] != null) {\n contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);\n }\n return contents;\n}, \"de_ListTypeVersionsOutput\");\nvar de_LoggingConfig = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_LRA] != null) {\n contents[_LRA] = (0, import_smithy_client.expectString)(output[_LRA]);\n }\n if (output[_LGN] != null) {\n contents[_LGN] = (0, import_smithy_client.expectString)(output[_LGN]);\n }\n return contents;\n}, \"de_LoggingConfig\");\nvar de_LogicalResourceIds = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return (0, import_smithy_client.expectString)(entry);\n });\n}, \"de_LogicalResourceIds\");\nvar de_ManagedExecution = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_Act] != null) {\n contents[_Act] = (0, import_smithy_client.parseBoolean)(output[_Act]);\n }\n return contents;\n}, \"de_ManagedExecution\");\nvar de_ModuleInfo = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_TH] != null) {\n contents[_TH] = (0, import_smithy_client.expectString)(output[_TH]);\n }\n if (output[_LIH] != null) {\n contents[_LIH] = (0, import_smithy_client.expectString)(output[_LIH]);\n }\n return contents;\n}, \"de_ModuleInfo\");\nvar de_NameAlreadyExistsException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_M] != null) {\n contents[_M] = (0, import_smithy_client.expectString)(output[_M]);\n }\n return contents;\n}, \"de_NameAlreadyExistsException\");\nvar de_NotificationARNs = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return (0, import_smithy_client.expectString)(entry);\n });\n}, \"de_NotificationARNs\");\nvar de_OperationIdAlreadyExistsException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_M] != null) {\n contents[_M] = (0, import_smithy_client.expectString)(output[_M]);\n }\n return contents;\n}, \"de_OperationIdAlreadyExistsException\");\nvar de_OperationInProgressException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_M] != null) {\n contents[_M] = (0, import_smithy_client.expectString)(output[_M]);\n }\n return contents;\n}, \"de_OperationInProgressException\");\nvar de_OperationNotFoundException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_M] != null) {\n contents[_M] = (0, import_smithy_client.expectString)(output[_M]);\n }\n return contents;\n}, \"de_OperationNotFoundException\");\nvar de_OperationStatusCheckFailedException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_M] != null) {\n contents[_M] = (0, import_smithy_client.expectString)(output[_M]);\n }\n return contents;\n}, \"de_OperationStatusCheckFailedException\");\nvar de_OrganizationalUnitIdList = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return (0, import_smithy_client.expectString)(entry);\n });\n}, \"de_OrganizationalUnitIdList\");\nvar de_Output = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_OK] != null) {\n contents[_OK] = (0, import_smithy_client.expectString)(output[_OK]);\n }\n if (output[_OV] != null) {\n contents[_OV] = (0, import_smithy_client.expectString)(output[_OV]);\n }\n if (output[_D] != null) {\n contents[_D] = (0, import_smithy_client.expectString)(output[_D]);\n }\n if (output[_EN] != null) {\n contents[_EN] = (0, import_smithy_client.expectString)(output[_EN]);\n }\n return contents;\n}, \"de_Output\");\nvar de_Outputs = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_Output(entry, context);\n });\n}, \"de_Outputs\");\nvar de_Parameter = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_PK] != null) {\n contents[_PK] = (0, import_smithy_client.expectString)(output[_PK]);\n }\n if (output[_PV] != null) {\n contents[_PV] = (0, import_smithy_client.expectString)(output[_PV]);\n }\n if (output[_UPV] != null) {\n contents[_UPV] = (0, import_smithy_client.parseBoolean)(output[_UPV]);\n }\n if (output[_RV] != null) {\n contents[_RV] = (0, import_smithy_client.expectString)(output[_RV]);\n }\n return contents;\n}, \"de_Parameter\");\nvar de_ParameterConstraints = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output.AllowedValues === \"\") {\n contents[_AV] = [];\n } else if (output[_AV] != null && output[_AV][_m] != null) {\n contents[_AV] = de_AllowedValues((0, import_smithy_client.getArrayIfSingleItem)(output[_AV][_m]), context);\n }\n return contents;\n}, \"de_ParameterConstraints\");\nvar de_ParameterDeclaration = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_PK] != null) {\n contents[_PK] = (0, import_smithy_client.expectString)(output[_PK]);\n }\n if (output[_DV] != null) {\n contents[_DV] = (0, import_smithy_client.expectString)(output[_DV]);\n }\n if (output[_PTa] != null) {\n contents[_PTa] = (0, import_smithy_client.expectString)(output[_PTa]);\n }\n if (output[_NE] != null) {\n contents[_NE] = (0, import_smithy_client.parseBoolean)(output[_NE]);\n }\n if (output[_D] != null) {\n contents[_D] = (0, import_smithy_client.expectString)(output[_D]);\n }\n if (output[_PCa] != null) {\n contents[_PCa] = de_ParameterConstraints(output[_PCa], context);\n }\n return contents;\n}, \"de_ParameterDeclaration\");\nvar de_ParameterDeclarations = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_ParameterDeclaration(entry, context);\n });\n}, \"de_ParameterDeclarations\");\nvar de_Parameters = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_Parameter(entry, context);\n });\n}, \"de_Parameters\");\nvar de_PhysicalResourceIdContext = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_PhysicalResourceIdContextKeyValuePair(entry, context);\n });\n}, \"de_PhysicalResourceIdContext\");\nvar de_PhysicalResourceIdContextKeyValuePair = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_K] != null) {\n contents[_K] = (0, import_smithy_client.expectString)(output[_K]);\n }\n if (output[_Val] != null) {\n contents[_Val] = (0, import_smithy_client.expectString)(output[_Val]);\n }\n return contents;\n}, \"de_PhysicalResourceIdContextKeyValuePair\");\nvar de_PropertyDifference = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_PPr] != null) {\n contents[_PPr] = (0, import_smithy_client.expectString)(output[_PPr]);\n }\n if (output[_EV] != null) {\n contents[_EV] = (0, import_smithy_client.expectString)(output[_EV]);\n }\n if (output[_AVc] != null) {\n contents[_AVc] = (0, import_smithy_client.expectString)(output[_AVc]);\n }\n if (output[_DTi] != null) {\n contents[_DTi] = (0, import_smithy_client.expectString)(output[_DTi]);\n }\n return contents;\n}, \"de_PropertyDifference\");\nvar de_PropertyDifferences = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_PropertyDifference(entry, context);\n });\n}, \"de_PropertyDifferences\");\nvar de_PublishTypeOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_PTA] != null) {\n contents[_PTA] = (0, import_smithy_client.expectString)(output[_PTA]);\n }\n return contents;\n}, \"de_PublishTypeOutput\");\nvar de_RecordHandlerProgressOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n return contents;\n}, \"de_RecordHandlerProgressOutput\");\nvar de_RegionList = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return (0, import_smithy_client.expectString)(entry);\n });\n}, \"de_RegionList\");\nvar de_RegisterPublisherOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_PI] != null) {\n contents[_PI] = (0, import_smithy_client.expectString)(output[_PI]);\n }\n return contents;\n}, \"de_RegisterPublisherOutput\");\nvar de_RegisterTypeOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_RTeg] != null) {\n contents[_RTeg] = (0, import_smithy_client.expectString)(output[_RTeg]);\n }\n return contents;\n}, \"de_RegisterTypeOutput\");\nvar de_RegistrationTokenList = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return (0, import_smithy_client.expectString)(entry);\n });\n}, \"de_RegistrationTokenList\");\nvar de_RelatedResources = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_ScannedResource(entry, context);\n });\n}, \"de_RelatedResources\");\nvar de_RequiredActivatedType = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_TNA] != null) {\n contents[_TNA] = (0, import_smithy_client.expectString)(output[_TNA]);\n }\n if (output[_OTN] != null) {\n contents[_OTN] = (0, import_smithy_client.expectString)(output[_OTN]);\n }\n if (output[_PI] != null) {\n contents[_PI] = (0, import_smithy_client.expectString)(output[_PI]);\n }\n if (output.SupportedMajorVersions === \"\") {\n contents[_SMV] = [];\n } else if (output[_SMV] != null && output[_SMV][_m] != null) {\n contents[_SMV] = de_SupportedMajorVersions((0, import_smithy_client.getArrayIfSingleItem)(output[_SMV][_m]), context);\n }\n return contents;\n}, \"de_RequiredActivatedType\");\nvar de_RequiredActivatedTypes = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_RequiredActivatedType(entry, context);\n });\n}, \"de_RequiredActivatedTypes\");\nvar de_ResourceChange = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_PA] != null) {\n contents[_PA] = (0, import_smithy_client.expectString)(output[_PA]);\n }\n if (output[_A] != null) {\n contents[_A] = (0, import_smithy_client.expectString)(output[_A]);\n }\n if (output[_LRI] != null) {\n contents[_LRI] = (0, import_smithy_client.expectString)(output[_LRI]);\n }\n if (output[_PRI] != null) {\n contents[_PRI] = (0, import_smithy_client.expectString)(output[_PRI]);\n }\n if (output[_RTes] != null) {\n contents[_RTes] = (0, import_smithy_client.expectString)(output[_RTes]);\n }\n if (output[_Rep] != null) {\n contents[_Rep] = (0, import_smithy_client.expectString)(output[_Rep]);\n }\n if (output.Scope === \"\") {\n contents[_Sco] = [];\n } else if (output[_Sco] != null && output[_Sco][_m] != null) {\n contents[_Sco] = de_Scope((0, import_smithy_client.getArrayIfSingleItem)(output[_Sco][_m]), context);\n }\n if (output.Details === \"\") {\n contents[_Det] = [];\n } else if (output[_Det] != null && output[_Det][_m] != null) {\n contents[_Det] = de_ResourceChangeDetails((0, import_smithy_client.getArrayIfSingleItem)(output[_Det][_m]), context);\n }\n if (output[_CSIh] != null) {\n contents[_CSIh] = (0, import_smithy_client.expectString)(output[_CSIh]);\n }\n if (output[_MI] != null) {\n contents[_MI] = de_ModuleInfo(output[_MI], context);\n }\n if (output[_BC] != null) {\n contents[_BC] = (0, import_smithy_client.expectString)(output[_BC]);\n }\n if (output[_AC] != null) {\n contents[_AC] = (0, import_smithy_client.expectString)(output[_AC]);\n }\n return contents;\n}, \"de_ResourceChange\");\nvar de_ResourceChangeDetail = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_Tar] != null) {\n contents[_Tar] = de_ResourceTargetDefinition(output[_Tar], context);\n }\n if (output[_Ev] != null) {\n contents[_Ev] = (0, import_smithy_client.expectString)(output[_Ev]);\n }\n if (output[_CSh] != null) {\n contents[_CSh] = (0, import_smithy_client.expectString)(output[_CSh]);\n }\n if (output[_CE] != null) {\n contents[_CE] = (0, import_smithy_client.expectString)(output[_CE]);\n }\n return contents;\n}, \"de_ResourceChangeDetail\");\nvar de_ResourceChangeDetails = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_ResourceChangeDetail(entry, context);\n });\n}, \"de_ResourceChangeDetails\");\nvar de_ResourceDetail = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_RTes] != null) {\n contents[_RTes] = (0, import_smithy_client.expectString)(output[_RTes]);\n }\n if (output[_LRI] != null) {\n contents[_LRI] = (0, import_smithy_client.expectString)(output[_LRI]);\n }\n if (output.ResourceIdentifier === \"\") {\n contents[_RI] = {};\n } else if (output[_RI] != null && output[_RI][_e] != null) {\n contents[_RI] = de_ResourceIdentifierProperties((0, import_smithy_client.getArrayIfSingleItem)(output[_RI][_e]), context);\n }\n if (output[_RSeso] != null) {\n contents[_RSeso] = (0, import_smithy_client.expectString)(output[_RSeso]);\n }\n if (output[_RSR] != null) {\n contents[_RSR] = (0, import_smithy_client.expectString)(output[_RSR]);\n }\n if (output.Warnings === \"\") {\n contents[_W] = [];\n } else if (output[_W] != null && output[_W][_m] != null) {\n contents[_W] = de_WarningDetails((0, import_smithy_client.getArrayIfSingleItem)(output[_W][_m]), context);\n }\n return contents;\n}, \"de_ResourceDetail\");\nvar de_ResourceDetails = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_ResourceDetail(entry, context);\n });\n}, \"de_ResourceDetails\");\nvar de_ResourceIdentifierProperties = /* @__PURE__ */ __name((output, context) => {\n return output.reduce((acc, pair) => {\n if (pair[\"value\"] === null) {\n return acc;\n }\n acc[pair[\"key\"]] = (0, import_smithy_client.expectString)(pair[\"value\"]);\n return acc;\n }, {});\n}, \"de_ResourceIdentifierProperties\");\nvar de_ResourceIdentifiers = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return (0, import_smithy_client.expectString)(entry);\n });\n}, \"de_ResourceIdentifiers\");\nvar de_ResourceIdentifierSummaries = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_ResourceIdentifierSummary(entry, context);\n });\n}, \"de_ResourceIdentifierSummaries\");\nvar de_ResourceIdentifierSummary = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_RTes] != null) {\n contents[_RTes] = (0, import_smithy_client.expectString)(output[_RTes]);\n }\n if (output.LogicalResourceIds === \"\") {\n contents[_LRIo] = [];\n } else if (output[_LRIo] != null && output[_LRIo][_m] != null) {\n contents[_LRIo] = de_LogicalResourceIds((0, import_smithy_client.getArrayIfSingleItem)(output[_LRIo][_m]), context);\n }\n if (output.ResourceIdentifiers === \"\") {\n contents[_RIe] = [];\n } else if (output[_RIe] != null && output[_RIe][_m] != null) {\n contents[_RIe] = de_ResourceIdentifiers((0, import_smithy_client.getArrayIfSingleItem)(output[_RIe][_m]), context);\n }\n return contents;\n}, \"de_ResourceIdentifierSummary\");\nvar de_ResourceLocation = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_SN] != null) {\n contents[_SN] = (0, import_smithy_client.expectString)(output[_SN]);\n }\n if (output[_LRI] != null) {\n contents[_LRI] = (0, import_smithy_client.expectString)(output[_LRI]);\n }\n return contents;\n}, \"de_ResourceLocation\");\nvar de_ResourceMapping = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_So] != null) {\n contents[_So] = de_ResourceLocation(output[_So], context);\n }\n if (output[_De] != null) {\n contents[_De] = de_ResourceLocation(output[_De], context);\n }\n return contents;\n}, \"de_ResourceMapping\");\nvar de_ResourceScanInProgressException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_M] != null) {\n contents[_M] = (0, import_smithy_client.expectString)(output[_M]);\n }\n return contents;\n}, \"de_ResourceScanInProgressException\");\nvar de_ResourceScanLimitExceededException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_M] != null) {\n contents[_M] = (0, import_smithy_client.expectString)(output[_M]);\n }\n return contents;\n}, \"de_ResourceScanLimitExceededException\");\nvar de_ResourceScanNotFoundException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_M] != null) {\n contents[_M] = (0, import_smithy_client.expectString)(output[_M]);\n }\n return contents;\n}, \"de_ResourceScanNotFoundException\");\nvar de_ResourceScanSummaries = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_ResourceScanSummary(entry, context);\n });\n}, \"de_ResourceScanSummaries\");\nvar de_ResourceScanSummary = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_RSI] != null) {\n contents[_RSI] = (0, import_smithy_client.expectString)(output[_RSI]);\n }\n if (output[_S] != null) {\n contents[_S] = (0, import_smithy_client.expectString)(output[_S]);\n }\n if (output[_SRt] != null) {\n contents[_SRt] = (0, import_smithy_client.expectString)(output[_SRt]);\n }\n if (output[_ST] != null) {\n contents[_ST] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_ST]));\n }\n if (output[_ET] != null) {\n contents[_ET] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_ET]));\n }\n if (output[_PC] != null) {\n contents[_PC] = (0, import_smithy_client.strictParseFloat)(output[_PC]);\n }\n if (output[_STc] != null) {\n contents[_STc] = (0, import_smithy_client.expectString)(output[_STc]);\n }\n return contents;\n}, \"de_ResourceScanSummary\");\nvar de_ResourceTargetDefinition = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_At] != null) {\n contents[_At] = (0, import_smithy_client.expectString)(output[_At]);\n }\n if (output[_N] != null) {\n contents[_N] = (0, import_smithy_client.expectString)(output[_N]);\n }\n if (output[_RReq] != null) {\n contents[_RReq] = (0, import_smithy_client.expectString)(output[_RReq]);\n }\n if (output[_Pa] != null) {\n contents[_Pa] = (0, import_smithy_client.expectString)(output[_Pa]);\n }\n if (output[_BV] != null) {\n contents[_BV] = (0, import_smithy_client.expectString)(output[_BV]);\n }\n if (output[_AVf] != null) {\n contents[_AVf] = (0, import_smithy_client.expectString)(output[_AVf]);\n }\n if (output[_ACT] != null) {\n contents[_ACT] = (0, import_smithy_client.expectString)(output[_ACT]);\n }\n return contents;\n}, \"de_ResourceTargetDefinition\");\nvar de_ResourceTypeFilters = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return (0, import_smithy_client.expectString)(entry);\n });\n}, \"de_ResourceTypeFilters\");\nvar de_ResourceTypes = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return (0, import_smithy_client.expectString)(entry);\n });\n}, \"de_ResourceTypes\");\nvar de_RollbackConfiguration = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output.RollbackTriggers === \"\") {\n contents[_RTo] = [];\n } else if (output[_RTo] != null && output[_RTo][_m] != null) {\n contents[_RTo] = de_RollbackTriggers((0, import_smithy_client.getArrayIfSingleItem)(output[_RTo][_m]), context);\n }\n if (output[_MTIM] != null) {\n contents[_MTIM] = (0, import_smithy_client.strictParseInt32)(output[_MTIM]);\n }\n return contents;\n}, \"de_RollbackConfiguration\");\nvar de_RollbackStackOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_SI] != null) {\n contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);\n }\n return contents;\n}, \"de_RollbackStackOutput\");\nvar de_RollbackTrigger = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_Ar] != null) {\n contents[_Ar] = (0, import_smithy_client.expectString)(output[_Ar]);\n }\n if (output[_T] != null) {\n contents[_T] = (0, import_smithy_client.expectString)(output[_T]);\n }\n return contents;\n}, \"de_RollbackTrigger\");\nvar de_RollbackTriggers = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_RollbackTrigger(entry, context);\n });\n}, \"de_RollbackTriggers\");\nvar de_ScanFilter = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output.Types === \"\") {\n contents[_Ty] = [];\n } else if (output[_Ty] != null && output[_Ty][_m] != null) {\n contents[_Ty] = de_ResourceTypeFilters((0, import_smithy_client.getArrayIfSingleItem)(output[_Ty][_m]), context);\n }\n return contents;\n}, \"de_ScanFilter\");\nvar de_ScanFilters = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_ScanFilter(entry, context);\n });\n}, \"de_ScanFilters\");\nvar de_ScannedResource = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_RTes] != null) {\n contents[_RTes] = (0, import_smithy_client.expectString)(output[_RTes]);\n }\n if (output.ResourceIdentifier === \"\") {\n contents[_RI] = {};\n } else if (output[_RI] != null && output[_RI][_e] != null) {\n contents[_RI] = de_JazzResourceIdentifierProperties((0, import_smithy_client.getArrayIfSingleItem)(output[_RI][_e]), context);\n }\n if (output[_MBS] != null) {\n contents[_MBS] = (0, import_smithy_client.parseBoolean)(output[_MBS]);\n }\n return contents;\n}, \"de_ScannedResource\");\nvar de_ScannedResources = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_ScannedResource(entry, context);\n });\n}, \"de_ScannedResources\");\nvar de_Scope = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return (0, import_smithy_client.expectString)(entry);\n });\n}, \"de_Scope\");\nvar de_SetTypeConfigurationOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_CAonf] != null) {\n contents[_CAonf] = (0, import_smithy_client.expectString)(output[_CAonf]);\n }\n return contents;\n}, \"de_SetTypeConfigurationOutput\");\nvar de_SetTypeDefaultVersionOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n return contents;\n}, \"de_SetTypeDefaultVersionOutput\");\nvar de_Stack = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_SI] != null) {\n contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);\n }\n if (output[_SN] != null) {\n contents[_SN] = (0, import_smithy_client.expectString)(output[_SN]);\n }\n if (output[_CSIh] != null) {\n contents[_CSIh] = (0, import_smithy_client.expectString)(output[_CSIh]);\n }\n if (output[_D] != null) {\n contents[_D] = (0, import_smithy_client.expectString)(output[_D]);\n }\n if (output.Parameters === \"\") {\n contents[_P] = [];\n } else if (output[_P] != null && output[_P][_m] != null) {\n contents[_P] = de_Parameters((0, import_smithy_client.getArrayIfSingleItem)(output[_P][_m]), context);\n }\n if (output[_CTr] != null) {\n contents[_CTr] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_CTr]));\n }\n if (output[_DTel] != null) {\n contents[_DTel] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_DTel]));\n }\n if (output[_LUT] != null) {\n contents[_LUT] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LUT]));\n }\n if (output[_RC] != null) {\n contents[_RC] = de_RollbackConfiguration(output[_RC], context);\n }\n if (output[_SSta] != null) {\n contents[_SSta] = (0, import_smithy_client.expectString)(output[_SSta]);\n }\n if (output[_SSR] != null) {\n contents[_SSR] = (0, import_smithy_client.expectString)(output[_SSR]);\n }\n if (output[_DR] != null) {\n contents[_DR] = (0, import_smithy_client.parseBoolean)(output[_DR]);\n }\n if (output.NotificationARNs === \"\") {\n contents[_NARN] = [];\n } else if (output[_NARN] != null && output[_NARN][_m] != null) {\n contents[_NARN] = de_NotificationARNs((0, import_smithy_client.getArrayIfSingleItem)(output[_NARN][_m]), context);\n }\n if (output[_TIM] != null) {\n contents[_TIM] = (0, import_smithy_client.strictParseInt32)(output[_TIM]);\n }\n if (output.Capabilities === \"\") {\n contents[_C] = [];\n } else if (output[_C] != null && output[_C][_m] != null) {\n contents[_C] = de_Capabilities((0, import_smithy_client.getArrayIfSingleItem)(output[_C][_m]), context);\n }\n if (output.Outputs === \"\") {\n contents[_O] = [];\n } else if (output[_O] != null && output[_O][_m] != null) {\n contents[_O] = de_Outputs((0, import_smithy_client.getArrayIfSingleItem)(output[_O][_m]), context);\n }\n if (output[_RARN] != null) {\n contents[_RARN] = (0, import_smithy_client.expectString)(output[_RARN]);\n }\n if (output.Tags === \"\") {\n contents[_Ta] = [];\n } else if (output[_Ta] != null && output[_Ta][_m] != null) {\n contents[_Ta] = de_Tags((0, import_smithy_client.getArrayIfSingleItem)(output[_Ta][_m]), context);\n }\n if (output[_ETP] != null) {\n contents[_ETP] = (0, import_smithy_client.parseBoolean)(output[_ETP]);\n }\n if (output[_PIa] != null) {\n contents[_PIa] = (0, import_smithy_client.expectString)(output[_PIa]);\n }\n if (output[_RIo] != null) {\n contents[_RIo] = (0, import_smithy_client.expectString)(output[_RIo]);\n }\n if (output[_DI] != null) {\n contents[_DI] = de_StackDriftInformation(output[_DI], context);\n }\n if (output[_REOC] != null) {\n contents[_REOC] = (0, import_smithy_client.parseBoolean)(output[_REOC]);\n }\n if (output[_DM] != null) {\n contents[_DM] = (0, import_smithy_client.expectString)(output[_DM]);\n }\n if (output[_DSeta] != null) {\n contents[_DSeta] = (0, import_smithy_client.expectString)(output[_DSeta]);\n }\n return contents;\n}, \"de_Stack\");\nvar de_StackDriftInformation = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_SDS] != null) {\n contents[_SDS] = (0, import_smithy_client.expectString)(output[_SDS]);\n }\n if (output[_LCT] != null) {\n contents[_LCT] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LCT]));\n }\n return contents;\n}, \"de_StackDriftInformation\");\nvar de_StackDriftInformationSummary = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_SDS] != null) {\n contents[_SDS] = (0, import_smithy_client.expectString)(output[_SDS]);\n }\n if (output[_LCT] != null) {\n contents[_LCT] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LCT]));\n }\n return contents;\n}, \"de_StackDriftInformationSummary\");\nvar de_StackEvent = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_SI] != null) {\n contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);\n }\n if (output[_EI] != null) {\n contents[_EI] = (0, import_smithy_client.expectString)(output[_EI]);\n }\n if (output[_SN] != null) {\n contents[_SN] = (0, import_smithy_client.expectString)(output[_SN]);\n }\n if (output[_LRI] != null) {\n contents[_LRI] = (0, import_smithy_client.expectString)(output[_LRI]);\n }\n if (output[_PRI] != null) {\n contents[_PRI] = (0, import_smithy_client.expectString)(output[_PRI]);\n }\n if (output[_RTes] != null) {\n contents[_RTes] = (0, import_smithy_client.expectString)(output[_RTes]);\n }\n if (output[_Ti] != null) {\n contents[_Ti] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_Ti]));\n }\n if (output[_RSeso] != null) {\n contents[_RSeso] = (0, import_smithy_client.expectString)(output[_RSeso]);\n }\n if (output[_RSR] != null) {\n contents[_RSR] = (0, import_smithy_client.expectString)(output[_RSR]);\n }\n if (output[_RPe] != null) {\n contents[_RPe] = (0, import_smithy_client.expectString)(output[_RPe]);\n }\n if (output[_CRT] != null) {\n contents[_CRT] = (0, import_smithy_client.expectString)(output[_CRT]);\n }\n if (output[_HT] != null) {\n contents[_HT] = (0, import_smithy_client.expectString)(output[_HT]);\n }\n if (output[_HS] != null) {\n contents[_HS] = (0, import_smithy_client.expectString)(output[_HS]);\n }\n if (output[_HSR] != null) {\n contents[_HSR] = (0, import_smithy_client.expectString)(output[_HSR]);\n }\n if (output[_HIP] != null) {\n contents[_HIP] = (0, import_smithy_client.expectString)(output[_HIP]);\n }\n if (output[_HFM] != null) {\n contents[_HFM] = (0, import_smithy_client.expectString)(output[_HFM]);\n }\n if (output[_DSeta] != null) {\n contents[_DSeta] = (0, import_smithy_client.expectString)(output[_DSeta]);\n }\n return contents;\n}, \"de_StackEvent\");\nvar de_StackEvents = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_StackEvent(entry, context);\n });\n}, \"de_StackEvents\");\nvar de_StackIds = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return (0, import_smithy_client.expectString)(entry);\n });\n}, \"de_StackIds\");\nvar de_StackInstance = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_SSI] != null) {\n contents[_SSI] = (0, import_smithy_client.expectString)(output[_SSI]);\n }\n if (output[_Reg] != null) {\n contents[_Reg] = (0, import_smithy_client.expectString)(output[_Reg]);\n }\n if (output[_Acc] != null) {\n contents[_Acc] = (0, import_smithy_client.expectString)(output[_Acc]);\n }\n if (output[_SI] != null) {\n contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);\n }\n if (output.ParameterOverrides === \"\") {\n contents[_PO] = [];\n } else if (output[_PO] != null && output[_PO][_m] != null) {\n contents[_PO] = de_Parameters((0, import_smithy_client.getArrayIfSingleItem)(output[_PO][_m]), context);\n }\n if (output[_S] != null) {\n contents[_S] = (0, import_smithy_client.expectString)(output[_S]);\n }\n if (output[_SIS] != null) {\n contents[_SIS] = de_StackInstanceComprehensiveStatus(output[_SIS], context);\n }\n if (output[_SRt] != null) {\n contents[_SRt] = (0, import_smithy_client.expectString)(output[_SRt]);\n }\n if (output[_OUIr] != null) {\n contents[_OUIr] = (0, import_smithy_client.expectString)(output[_OUIr]);\n }\n if (output[_DSr] != null) {\n contents[_DSr] = (0, import_smithy_client.expectString)(output[_DSr]);\n }\n if (output[_LDCT] != null) {\n contents[_LDCT] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LDCT]));\n }\n if (output[_LOI] != null) {\n contents[_LOI] = (0, import_smithy_client.expectString)(output[_LOI]);\n }\n return contents;\n}, \"de_StackInstance\");\nvar de_StackInstanceComprehensiveStatus = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_DSeta] != null) {\n contents[_DSeta] = (0, import_smithy_client.expectString)(output[_DSeta]);\n }\n return contents;\n}, \"de_StackInstanceComprehensiveStatus\");\nvar de_StackInstanceNotFoundException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_M] != null) {\n contents[_M] = (0, import_smithy_client.expectString)(output[_M]);\n }\n return contents;\n}, \"de_StackInstanceNotFoundException\");\nvar de_StackInstanceResourceDriftsSummaries = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_StackInstanceResourceDriftsSummary(entry, context);\n });\n}, \"de_StackInstanceResourceDriftsSummaries\");\nvar de_StackInstanceResourceDriftsSummary = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_SI] != null) {\n contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);\n }\n if (output[_LRI] != null) {\n contents[_LRI] = (0, import_smithy_client.expectString)(output[_LRI]);\n }\n if (output[_PRI] != null) {\n contents[_PRI] = (0, import_smithy_client.expectString)(output[_PRI]);\n }\n if (output.PhysicalResourceIdContext === \"\") {\n contents[_PRIC] = [];\n } else if (output[_PRIC] != null && output[_PRIC][_m] != null) {\n contents[_PRIC] = de_PhysicalResourceIdContext((0, import_smithy_client.getArrayIfSingleItem)(output[_PRIC][_m]), context);\n }\n if (output[_RTes] != null) {\n contents[_RTes] = (0, import_smithy_client.expectString)(output[_RTes]);\n }\n if (output.PropertyDifferences === \"\") {\n contents[_PD] = [];\n } else if (output[_PD] != null && output[_PD][_m] != null) {\n contents[_PD] = de_PropertyDifferences((0, import_smithy_client.getArrayIfSingleItem)(output[_PD][_m]), context);\n }\n if (output[_SRDS] != null) {\n contents[_SRDS] = (0, import_smithy_client.expectString)(output[_SRDS]);\n }\n if (output[_Ti] != null) {\n contents[_Ti] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_Ti]));\n }\n return contents;\n}, \"de_StackInstanceResourceDriftsSummary\");\nvar de_StackInstanceSummaries = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_StackInstanceSummary(entry, context);\n });\n}, \"de_StackInstanceSummaries\");\nvar de_StackInstanceSummary = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_SSI] != null) {\n contents[_SSI] = (0, import_smithy_client.expectString)(output[_SSI]);\n }\n if (output[_Reg] != null) {\n contents[_Reg] = (0, import_smithy_client.expectString)(output[_Reg]);\n }\n if (output[_Acc] != null) {\n contents[_Acc] = (0, import_smithy_client.expectString)(output[_Acc]);\n }\n if (output[_SI] != null) {\n contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);\n }\n if (output[_S] != null) {\n contents[_S] = (0, import_smithy_client.expectString)(output[_S]);\n }\n if (output[_SRt] != null) {\n contents[_SRt] = (0, import_smithy_client.expectString)(output[_SRt]);\n }\n if (output[_SIS] != null) {\n contents[_SIS] = de_StackInstanceComprehensiveStatus(output[_SIS], context);\n }\n if (output[_OUIr] != null) {\n contents[_OUIr] = (0, import_smithy_client.expectString)(output[_OUIr]);\n }\n if (output[_DSr] != null) {\n contents[_DSr] = (0, import_smithy_client.expectString)(output[_DSr]);\n }\n if (output[_LDCT] != null) {\n contents[_LDCT] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LDCT]));\n }\n if (output[_LOI] != null) {\n contents[_LOI] = (0, import_smithy_client.expectString)(output[_LOI]);\n }\n return contents;\n}, \"de_StackInstanceSummary\");\nvar de_StackNotFoundException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_M] != null) {\n contents[_M] = (0, import_smithy_client.expectString)(output[_M]);\n }\n return contents;\n}, \"de_StackNotFoundException\");\nvar de_StackRefactorAction = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_A] != null) {\n contents[_A] = (0, import_smithy_client.expectString)(output[_A]);\n }\n if (output[_En] != null) {\n contents[_En] = (0, import_smithy_client.expectString)(output[_En]);\n }\n if (output[_PRI] != null) {\n contents[_PRI] = (0, import_smithy_client.expectString)(output[_PRI]);\n }\n if (output[_RI] != null) {\n contents[_RI] = (0, import_smithy_client.expectString)(output[_RI]);\n }\n if (output[_D] != null) {\n contents[_D] = (0, import_smithy_client.expectString)(output[_D]);\n }\n if (output[_Dete] != null) {\n contents[_Dete] = (0, import_smithy_client.expectString)(output[_Dete]);\n }\n if (output[_DRe] != null) {\n contents[_DRe] = (0, import_smithy_client.expectString)(output[_DRe]);\n }\n if (output.TagResources === \"\") {\n contents[_TR] = [];\n } else if (output[_TR] != null && output[_TR][_m] != null) {\n contents[_TR] = de_StackRefactorTagResources((0, import_smithy_client.getArrayIfSingleItem)(output[_TR][_m]), context);\n }\n if (output.UntagResources === \"\") {\n contents[_UR] = [];\n } else if (output[_UR] != null && output[_UR][_m] != null) {\n contents[_UR] = de_StackRefactorUntagResources((0, import_smithy_client.getArrayIfSingleItem)(output[_UR][_m]), context);\n }\n if (output[_RMes] != null) {\n contents[_RMes] = de_ResourceMapping(output[_RMes], context);\n }\n return contents;\n}, \"de_StackRefactorAction\");\nvar de_StackRefactorActions = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_StackRefactorAction(entry, context);\n });\n}, \"de_StackRefactorActions\");\nvar de_StackRefactorNotFoundException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_M] != null) {\n contents[_M] = (0, import_smithy_client.expectString)(output[_M]);\n }\n return contents;\n}, \"de_StackRefactorNotFoundException\");\nvar de_StackRefactorSummaries = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_StackRefactorSummary(entry, context);\n });\n}, \"de_StackRefactorSummaries\");\nvar de_StackRefactorSummary = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_SRI] != null) {\n contents[_SRI] = (0, import_smithy_client.expectString)(output[_SRI]);\n }\n if (output[_D] != null) {\n contents[_D] = (0, import_smithy_client.expectString)(output[_D]);\n }\n if (output[_ES] != null) {\n contents[_ES] = (0, import_smithy_client.expectString)(output[_ES]);\n }\n if (output[_ESRx] != null) {\n contents[_ESRx] = (0, import_smithy_client.expectString)(output[_ESRx]);\n }\n if (output[_S] != null) {\n contents[_S] = (0, import_smithy_client.expectString)(output[_S]);\n }\n if (output[_SRt] != null) {\n contents[_SRt] = (0, import_smithy_client.expectString)(output[_SRt]);\n }\n return contents;\n}, \"de_StackRefactorSummary\");\nvar de_StackRefactorTagResources = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_Tag(entry, context);\n });\n}, \"de_StackRefactorTagResources\");\nvar de_StackRefactorUntagResources = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return (0, import_smithy_client.expectString)(entry);\n });\n}, \"de_StackRefactorUntagResources\");\nvar de_StackResource = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_SN] != null) {\n contents[_SN] = (0, import_smithy_client.expectString)(output[_SN]);\n }\n if (output[_SI] != null) {\n contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);\n }\n if (output[_LRI] != null) {\n contents[_LRI] = (0, import_smithy_client.expectString)(output[_LRI]);\n }\n if (output[_PRI] != null) {\n contents[_PRI] = (0, import_smithy_client.expectString)(output[_PRI]);\n }\n if (output[_RTes] != null) {\n contents[_RTes] = (0, import_smithy_client.expectString)(output[_RTes]);\n }\n if (output[_Ti] != null) {\n contents[_Ti] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_Ti]));\n }\n if (output[_RSeso] != null) {\n contents[_RSeso] = (0, import_smithy_client.expectString)(output[_RSeso]);\n }\n if (output[_RSR] != null) {\n contents[_RSR] = (0, import_smithy_client.expectString)(output[_RSR]);\n }\n if (output[_D] != null) {\n contents[_D] = (0, import_smithy_client.expectString)(output[_D]);\n }\n if (output[_DI] != null) {\n contents[_DI] = de_StackResourceDriftInformation(output[_DI], context);\n }\n if (output[_MI] != null) {\n contents[_MI] = de_ModuleInfo(output[_MI], context);\n }\n return contents;\n}, \"de_StackResource\");\nvar de_StackResourceDetail = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_SN] != null) {\n contents[_SN] = (0, import_smithy_client.expectString)(output[_SN]);\n }\n if (output[_SI] != null) {\n contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);\n }\n if (output[_LRI] != null) {\n contents[_LRI] = (0, import_smithy_client.expectString)(output[_LRI]);\n }\n if (output[_PRI] != null) {\n contents[_PRI] = (0, import_smithy_client.expectString)(output[_PRI]);\n }\n if (output[_RTes] != null) {\n contents[_RTes] = (0, import_smithy_client.expectString)(output[_RTes]);\n }\n if (output[_LUTa] != null) {\n contents[_LUTa] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LUTa]));\n }\n if (output[_RSeso] != null) {\n contents[_RSeso] = (0, import_smithy_client.expectString)(output[_RSeso]);\n }\n if (output[_RSR] != null) {\n contents[_RSR] = (0, import_smithy_client.expectString)(output[_RSR]);\n }\n if (output[_D] != null) {\n contents[_D] = (0, import_smithy_client.expectString)(output[_D]);\n }\n if (output[_Me] != null) {\n contents[_Me] = (0, import_smithy_client.expectString)(output[_Me]);\n }\n if (output[_DI] != null) {\n contents[_DI] = de_StackResourceDriftInformation(output[_DI], context);\n }\n if (output[_MI] != null) {\n contents[_MI] = de_ModuleInfo(output[_MI], context);\n }\n return contents;\n}, \"de_StackResourceDetail\");\nvar de_StackResourceDrift = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_SI] != null) {\n contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);\n }\n if (output[_LRI] != null) {\n contents[_LRI] = (0, import_smithy_client.expectString)(output[_LRI]);\n }\n if (output[_PRI] != null) {\n contents[_PRI] = (0, import_smithy_client.expectString)(output[_PRI]);\n }\n if (output.PhysicalResourceIdContext === \"\") {\n contents[_PRIC] = [];\n } else if (output[_PRIC] != null && output[_PRIC][_m] != null) {\n contents[_PRIC] = de_PhysicalResourceIdContext((0, import_smithy_client.getArrayIfSingleItem)(output[_PRIC][_m]), context);\n }\n if (output[_RTes] != null) {\n contents[_RTes] = (0, import_smithy_client.expectString)(output[_RTes]);\n }\n if (output[_EP] != null) {\n contents[_EP] = (0, import_smithy_client.expectString)(output[_EP]);\n }\n if (output[_AP] != null) {\n contents[_AP] = (0, import_smithy_client.expectString)(output[_AP]);\n }\n if (output.PropertyDifferences === \"\") {\n contents[_PD] = [];\n } else if (output[_PD] != null && output[_PD][_m] != null) {\n contents[_PD] = de_PropertyDifferences((0, import_smithy_client.getArrayIfSingleItem)(output[_PD][_m]), context);\n }\n if (output[_SRDS] != null) {\n contents[_SRDS] = (0, import_smithy_client.expectString)(output[_SRDS]);\n }\n if (output[_Ti] != null) {\n contents[_Ti] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_Ti]));\n }\n if (output[_MI] != null) {\n contents[_MI] = de_ModuleInfo(output[_MI], context);\n }\n return contents;\n}, \"de_StackResourceDrift\");\nvar de_StackResourceDriftInformation = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_SRDS] != null) {\n contents[_SRDS] = (0, import_smithy_client.expectString)(output[_SRDS]);\n }\n if (output[_LCT] != null) {\n contents[_LCT] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LCT]));\n }\n return contents;\n}, \"de_StackResourceDriftInformation\");\nvar de_StackResourceDriftInformationSummary = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_SRDS] != null) {\n contents[_SRDS] = (0, import_smithy_client.expectString)(output[_SRDS]);\n }\n if (output[_LCT] != null) {\n contents[_LCT] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LCT]));\n }\n return contents;\n}, \"de_StackResourceDriftInformationSummary\");\nvar de_StackResourceDrifts = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_StackResourceDrift(entry, context);\n });\n}, \"de_StackResourceDrifts\");\nvar de_StackResources = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_StackResource(entry, context);\n });\n}, \"de_StackResources\");\nvar de_StackResourceSummaries = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_StackResourceSummary(entry, context);\n });\n}, \"de_StackResourceSummaries\");\nvar de_StackResourceSummary = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_LRI] != null) {\n contents[_LRI] = (0, import_smithy_client.expectString)(output[_LRI]);\n }\n if (output[_PRI] != null) {\n contents[_PRI] = (0, import_smithy_client.expectString)(output[_PRI]);\n }\n if (output[_RTes] != null) {\n contents[_RTes] = (0, import_smithy_client.expectString)(output[_RTes]);\n }\n if (output[_LUTa] != null) {\n contents[_LUTa] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LUTa]));\n }\n if (output[_RSeso] != null) {\n contents[_RSeso] = (0, import_smithy_client.expectString)(output[_RSeso]);\n }\n if (output[_RSR] != null) {\n contents[_RSR] = (0, import_smithy_client.expectString)(output[_RSR]);\n }\n if (output[_DI] != null) {\n contents[_DI] = de_StackResourceDriftInformationSummary(output[_DI], context);\n }\n if (output[_MI] != null) {\n contents[_MI] = de_ModuleInfo(output[_MI], context);\n }\n return contents;\n}, \"de_StackResourceSummary\");\nvar de_Stacks = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_Stack(entry, context);\n });\n}, \"de_Stacks\");\nvar de_StackSet = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_SSN] != null) {\n contents[_SSN] = (0, import_smithy_client.expectString)(output[_SSN]);\n }\n if (output[_SSI] != null) {\n contents[_SSI] = (0, import_smithy_client.expectString)(output[_SSI]);\n }\n if (output[_D] != null) {\n contents[_D] = (0, import_smithy_client.expectString)(output[_D]);\n }\n if (output[_S] != null) {\n contents[_S] = (0, import_smithy_client.expectString)(output[_S]);\n }\n if (output[_TB] != null) {\n contents[_TB] = (0, import_smithy_client.expectString)(output[_TB]);\n }\n if (output.Parameters === \"\") {\n contents[_P] = [];\n } else if (output[_P] != null && output[_P][_m] != null) {\n contents[_P] = de_Parameters((0, import_smithy_client.getArrayIfSingleItem)(output[_P][_m]), context);\n }\n if (output.Capabilities === \"\") {\n contents[_C] = [];\n } else if (output[_C] != null && output[_C][_m] != null) {\n contents[_C] = de_Capabilities((0, import_smithy_client.getArrayIfSingleItem)(output[_C][_m]), context);\n }\n if (output.Tags === \"\") {\n contents[_Ta] = [];\n } else if (output[_Ta] != null && output[_Ta][_m] != null) {\n contents[_Ta] = de_Tags((0, import_smithy_client.getArrayIfSingleItem)(output[_Ta][_m]), context);\n }\n if (output[_SSARN] != null) {\n contents[_SSARN] = (0, import_smithy_client.expectString)(output[_SSARN]);\n }\n if (output[_ARARN] != null) {\n contents[_ARARN] = (0, import_smithy_client.expectString)(output[_ARARN]);\n }\n if (output[_ERN] != null) {\n contents[_ERN] = (0, import_smithy_client.expectString)(output[_ERN]);\n }\n if (output[_SSDDD] != null) {\n contents[_SSDDD] = de_StackSetDriftDetectionDetails(output[_SSDDD], context);\n }\n if (output[_AD] != null) {\n contents[_AD] = de_AutoDeployment(output[_AD], context);\n }\n if (output[_PM] != null) {\n contents[_PM] = (0, import_smithy_client.expectString)(output[_PM]);\n }\n if (output.OrganizationalUnitIds === \"\") {\n contents[_OUI] = [];\n } else if (output[_OUI] != null && output[_OUI][_m] != null) {\n contents[_OUI] = de_OrganizationalUnitIdList((0, import_smithy_client.getArrayIfSingleItem)(output[_OUI][_m]), context);\n }\n if (output[_ME] != null) {\n contents[_ME] = de_ManagedExecution(output[_ME], context);\n }\n if (output.Regions === \"\") {\n contents[_Re] = [];\n } else if (output[_Re] != null && output[_Re][_m] != null) {\n contents[_Re] = de_RegionList((0, import_smithy_client.getArrayIfSingleItem)(output[_Re][_m]), context);\n }\n return contents;\n}, \"de_StackSet\");\nvar de_StackSetAutoDeploymentTargetSummaries = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_StackSetAutoDeploymentTargetSummary(entry, context);\n });\n}, \"de_StackSetAutoDeploymentTargetSummaries\");\nvar de_StackSetAutoDeploymentTargetSummary = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_OUIr] != null) {\n contents[_OUIr] = (0, import_smithy_client.expectString)(output[_OUIr]);\n }\n if (output.Regions === \"\") {\n contents[_Re] = [];\n } else if (output[_Re] != null && output[_Re][_m] != null) {\n contents[_Re] = de_RegionList((0, import_smithy_client.getArrayIfSingleItem)(output[_Re][_m]), context);\n }\n return contents;\n}, \"de_StackSetAutoDeploymentTargetSummary\");\nvar de_StackSetDriftDetectionDetails = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_DSr] != null) {\n contents[_DSr] = (0, import_smithy_client.expectString)(output[_DSr]);\n }\n if (output[_DDS] != null) {\n contents[_DDS] = (0, import_smithy_client.expectString)(output[_DDS]);\n }\n if (output[_LDCT] != null) {\n contents[_LDCT] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LDCT]));\n }\n if (output[_TSIC] != null) {\n contents[_TSIC] = (0, import_smithy_client.strictParseInt32)(output[_TSIC]);\n }\n if (output[_DSIC] != null) {\n contents[_DSIC] = (0, import_smithy_client.strictParseInt32)(output[_DSIC]);\n }\n if (output[_ISSIC] != null) {\n contents[_ISSIC] = (0, import_smithy_client.strictParseInt32)(output[_ISSIC]);\n }\n if (output[_IPSIC] != null) {\n contents[_IPSIC] = (0, import_smithy_client.strictParseInt32)(output[_IPSIC]);\n }\n if (output[_FSIC] != null) {\n contents[_FSIC] = (0, import_smithy_client.strictParseInt32)(output[_FSIC]);\n }\n return contents;\n}, \"de_StackSetDriftDetectionDetails\");\nvar de_StackSetNotEmptyException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_M] != null) {\n contents[_M] = (0, import_smithy_client.expectString)(output[_M]);\n }\n return contents;\n}, \"de_StackSetNotEmptyException\");\nvar de_StackSetNotFoundException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_M] != null) {\n contents[_M] = (0, import_smithy_client.expectString)(output[_M]);\n }\n return contents;\n}, \"de_StackSetNotFoundException\");\nvar de_StackSetOperation = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_OI] != null) {\n contents[_OI] = (0, import_smithy_client.expectString)(output[_OI]);\n }\n if (output[_SSI] != null) {\n contents[_SSI] = (0, import_smithy_client.expectString)(output[_SSI]);\n }\n if (output[_A] != null) {\n contents[_A] = (0, import_smithy_client.expectString)(output[_A]);\n }\n if (output[_S] != null) {\n contents[_S] = (0, import_smithy_client.expectString)(output[_S]);\n }\n if (output[_OP] != null) {\n contents[_OP] = de_StackSetOperationPreferences(output[_OP], context);\n }\n if (output[_RSe] != null) {\n contents[_RSe] = (0, import_smithy_client.parseBoolean)(output[_RSe]);\n }\n if (output[_ARARN] != null) {\n contents[_ARARN] = (0, import_smithy_client.expectString)(output[_ARARN]);\n }\n if (output[_ERN] != null) {\n contents[_ERN] = (0, import_smithy_client.expectString)(output[_ERN]);\n }\n if (output[_CTre] != null) {\n contents[_CTre] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_CTre]));\n }\n if (output[_ETn] != null) {\n contents[_ETn] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_ETn]));\n }\n if (output[_DTep] != null) {\n contents[_DTep] = de_DeploymentTargets(output[_DTep], context);\n }\n if (output[_SSDDD] != null) {\n contents[_SSDDD] = de_StackSetDriftDetectionDetails(output[_SSDDD], context);\n }\n if (output[_SRt] != null) {\n contents[_SRt] = (0, import_smithy_client.expectString)(output[_SRt]);\n }\n if (output[_SDt] != null) {\n contents[_SDt] = de_StackSetOperationStatusDetails(output[_SDt], context);\n }\n return contents;\n}, \"de_StackSetOperation\");\nvar de_StackSetOperationPreferences = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_RCT] != null) {\n contents[_RCT] = (0, import_smithy_client.expectString)(output[_RCT]);\n }\n if (output.RegionOrder === \"\") {\n contents[_RO] = [];\n } else if (output[_RO] != null && output[_RO][_m] != null) {\n contents[_RO] = de_RegionList((0, import_smithy_client.getArrayIfSingleItem)(output[_RO][_m]), context);\n }\n if (output[_FTC] != null) {\n contents[_FTC] = (0, import_smithy_client.strictParseInt32)(output[_FTC]);\n }\n if (output[_FTP] != null) {\n contents[_FTP] = (0, import_smithy_client.strictParseInt32)(output[_FTP]);\n }\n if (output[_MCC] != null) {\n contents[_MCC] = (0, import_smithy_client.strictParseInt32)(output[_MCC]);\n }\n if (output[_MCP] != null) {\n contents[_MCP] = (0, import_smithy_client.strictParseInt32)(output[_MCP]);\n }\n if (output[_CM] != null) {\n contents[_CM] = (0, import_smithy_client.expectString)(output[_CM]);\n }\n return contents;\n}, \"de_StackSetOperationPreferences\");\nvar de_StackSetOperationResultSummaries = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_StackSetOperationResultSummary(entry, context);\n });\n}, \"de_StackSetOperationResultSummaries\");\nvar de_StackSetOperationResultSummary = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_Acc] != null) {\n contents[_Acc] = (0, import_smithy_client.expectString)(output[_Acc]);\n }\n if (output[_Reg] != null) {\n contents[_Reg] = (0, import_smithy_client.expectString)(output[_Reg]);\n }\n if (output[_S] != null) {\n contents[_S] = (0, import_smithy_client.expectString)(output[_S]);\n }\n if (output[_SRt] != null) {\n contents[_SRt] = (0, import_smithy_client.expectString)(output[_SRt]);\n }\n if (output[_AGR] != null) {\n contents[_AGR] = de_AccountGateResult(output[_AGR], context);\n }\n if (output[_OUIr] != null) {\n contents[_OUIr] = (0, import_smithy_client.expectString)(output[_OUIr]);\n }\n return contents;\n}, \"de_StackSetOperationResultSummary\");\nvar de_StackSetOperationStatusDetails = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_FSIC] != null) {\n contents[_FSIC] = (0, import_smithy_client.strictParseInt32)(output[_FSIC]);\n }\n return contents;\n}, \"de_StackSetOperationStatusDetails\");\nvar de_StackSetOperationSummaries = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_StackSetOperationSummary(entry, context);\n });\n}, \"de_StackSetOperationSummaries\");\nvar de_StackSetOperationSummary = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_OI] != null) {\n contents[_OI] = (0, import_smithy_client.expectString)(output[_OI]);\n }\n if (output[_A] != null) {\n contents[_A] = (0, import_smithy_client.expectString)(output[_A]);\n }\n if (output[_S] != null) {\n contents[_S] = (0, import_smithy_client.expectString)(output[_S]);\n }\n if (output[_CTre] != null) {\n contents[_CTre] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_CTre]));\n }\n if (output[_ETn] != null) {\n contents[_ETn] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_ETn]));\n }\n if (output[_SRt] != null) {\n contents[_SRt] = (0, import_smithy_client.expectString)(output[_SRt]);\n }\n if (output[_SDt] != null) {\n contents[_SDt] = de_StackSetOperationStatusDetails(output[_SDt], context);\n }\n if (output[_OP] != null) {\n contents[_OP] = de_StackSetOperationPreferences(output[_OP], context);\n }\n return contents;\n}, \"de_StackSetOperationSummary\");\nvar de_StackSetSummaries = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_StackSetSummary(entry, context);\n });\n}, \"de_StackSetSummaries\");\nvar de_StackSetSummary = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_SSN] != null) {\n contents[_SSN] = (0, import_smithy_client.expectString)(output[_SSN]);\n }\n if (output[_SSI] != null) {\n contents[_SSI] = (0, import_smithy_client.expectString)(output[_SSI]);\n }\n if (output[_D] != null) {\n contents[_D] = (0, import_smithy_client.expectString)(output[_D]);\n }\n if (output[_S] != null) {\n contents[_S] = (0, import_smithy_client.expectString)(output[_S]);\n }\n if (output[_AD] != null) {\n contents[_AD] = de_AutoDeployment(output[_AD], context);\n }\n if (output[_PM] != null) {\n contents[_PM] = (0, import_smithy_client.expectString)(output[_PM]);\n }\n if (output[_DSr] != null) {\n contents[_DSr] = (0, import_smithy_client.expectString)(output[_DSr]);\n }\n if (output[_LDCT] != null) {\n contents[_LDCT] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LDCT]));\n }\n if (output[_ME] != null) {\n contents[_ME] = de_ManagedExecution(output[_ME], context);\n }\n return contents;\n}, \"de_StackSetSummary\");\nvar de_StackSummaries = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_StackSummary(entry, context);\n });\n}, \"de_StackSummaries\");\nvar de_StackSummary = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_SI] != null) {\n contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);\n }\n if (output[_SN] != null) {\n contents[_SN] = (0, import_smithy_client.expectString)(output[_SN]);\n }\n if (output[_TDe] != null) {\n contents[_TDe] = (0, import_smithy_client.expectString)(output[_TDe]);\n }\n if (output[_CTr] != null) {\n contents[_CTr] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_CTr]));\n }\n if (output[_LUT] != null) {\n contents[_LUT] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LUT]));\n }\n if (output[_DTel] != null) {\n contents[_DTel] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_DTel]));\n }\n if (output[_SSta] != null) {\n contents[_SSta] = (0, import_smithy_client.expectString)(output[_SSta]);\n }\n if (output[_SSR] != null) {\n contents[_SSR] = (0, import_smithy_client.expectString)(output[_SSR]);\n }\n if (output[_PIa] != null) {\n contents[_PIa] = (0, import_smithy_client.expectString)(output[_PIa]);\n }\n if (output[_RIo] != null) {\n contents[_RIo] = (0, import_smithy_client.expectString)(output[_RIo]);\n }\n if (output[_DI] != null) {\n contents[_DI] = de_StackDriftInformationSummary(output[_DI], context);\n }\n return contents;\n}, \"de_StackSummary\");\nvar de_StageList = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return (0, import_smithy_client.expectString)(entry);\n });\n}, \"de_StageList\");\nvar de_StaleRequestException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_M] != null) {\n contents[_M] = (0, import_smithy_client.expectString)(output[_M]);\n }\n return contents;\n}, \"de_StaleRequestException\");\nvar de_StartResourceScanOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_RSI] != null) {\n contents[_RSI] = (0, import_smithy_client.expectString)(output[_RSI]);\n }\n return contents;\n}, \"de_StartResourceScanOutput\");\nvar de_StopStackSetOperationOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n return contents;\n}, \"de_StopStackSetOperationOutput\");\nvar de_SupportedMajorVersions = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return (0, import_smithy_client.strictParseInt32)(entry);\n });\n}, \"de_SupportedMajorVersions\");\nvar de_Tag = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_K] != null) {\n contents[_K] = (0, import_smithy_client.expectString)(output[_K]);\n }\n if (output[_Val] != null) {\n contents[_Val] = (0, import_smithy_client.expectString)(output[_Val]);\n }\n return contents;\n}, \"de_Tag\");\nvar de_Tags = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_Tag(entry, context);\n });\n}, \"de_Tags\");\nvar de_TemplateConfiguration = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_DPe] != null) {\n contents[_DPe] = (0, import_smithy_client.expectString)(output[_DPe]);\n }\n if (output[_URP] != null) {\n contents[_URP] = (0, import_smithy_client.expectString)(output[_URP]);\n }\n return contents;\n}, \"de_TemplateConfiguration\");\nvar de_TemplateParameter = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_PK] != null) {\n contents[_PK] = (0, import_smithy_client.expectString)(output[_PK]);\n }\n if (output[_DV] != null) {\n contents[_DV] = (0, import_smithy_client.expectString)(output[_DV]);\n }\n if (output[_NE] != null) {\n contents[_NE] = (0, import_smithy_client.parseBoolean)(output[_NE]);\n }\n if (output[_D] != null) {\n contents[_D] = (0, import_smithy_client.expectString)(output[_D]);\n }\n return contents;\n}, \"de_TemplateParameter\");\nvar de_TemplateParameters = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_TemplateParameter(entry, context);\n });\n}, \"de_TemplateParameters\");\nvar de_TemplateProgress = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_RSesou] != null) {\n contents[_RSesou] = (0, import_smithy_client.strictParseInt32)(output[_RSesou]);\n }\n if (output[_RF] != null) {\n contents[_RF] = (0, import_smithy_client.strictParseInt32)(output[_RF]);\n }\n if (output[_RPes] != null) {\n contents[_RPes] = (0, import_smithy_client.strictParseInt32)(output[_RPes]);\n }\n if (output[_RPeso] != null) {\n contents[_RPeso] = (0, import_smithy_client.strictParseInt32)(output[_RPeso]);\n }\n return contents;\n}, \"de_TemplateProgress\");\nvar de_TemplateSummaries = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_TemplateSummary(entry, context);\n });\n}, \"de_TemplateSummaries\");\nvar de_TemplateSummary = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_GTI] != null) {\n contents[_GTI] = (0, import_smithy_client.expectString)(output[_GTI]);\n }\n if (output[_GTN] != null) {\n contents[_GTN] = (0, import_smithy_client.expectString)(output[_GTN]);\n }\n if (output[_S] != null) {\n contents[_S] = (0, import_smithy_client.expectString)(output[_S]);\n }\n if (output[_SRt] != null) {\n contents[_SRt] = (0, import_smithy_client.expectString)(output[_SRt]);\n }\n if (output[_CTr] != null) {\n contents[_CTr] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_CTr]));\n }\n if (output[_LUT] != null) {\n contents[_LUT] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LUT]));\n }\n if (output[_NOR] != null) {\n contents[_NOR] = (0, import_smithy_client.strictParseInt32)(output[_NOR]);\n }\n return contents;\n}, \"de_TemplateSummary\");\nvar de_TestTypeOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_TVA] != null) {\n contents[_TVA] = (0, import_smithy_client.expectString)(output[_TVA]);\n }\n return contents;\n}, \"de_TestTypeOutput\");\nvar de_TokenAlreadyExistsException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_M] != null) {\n contents[_M] = (0, import_smithy_client.expectString)(output[_M]);\n }\n return contents;\n}, \"de_TokenAlreadyExistsException\");\nvar de_TransformsList = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return (0, import_smithy_client.expectString)(entry);\n });\n}, \"de_TransformsList\");\nvar de_TypeConfigurationDetails = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_Ar] != null) {\n contents[_Ar] = (0, import_smithy_client.expectString)(output[_Ar]);\n }\n if (output[_Al] != null) {\n contents[_Al] = (0, import_smithy_client.expectString)(output[_Al]);\n }\n if (output[_Co] != null) {\n contents[_Co] = (0, import_smithy_client.expectString)(output[_Co]);\n }\n if (output[_LU] != null) {\n contents[_LU] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LU]));\n }\n if (output[_TA] != null) {\n contents[_TA] = (0, import_smithy_client.expectString)(output[_TA]);\n }\n if (output[_TN] != null) {\n contents[_TN] = (0, import_smithy_client.expectString)(output[_TN]);\n }\n if (output[_IDC] != null) {\n contents[_IDC] = (0, import_smithy_client.parseBoolean)(output[_IDC]);\n }\n return contents;\n}, \"de_TypeConfigurationDetails\");\nvar de_TypeConfigurationDetailsList = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_TypeConfigurationDetails(entry, context);\n });\n}, \"de_TypeConfigurationDetailsList\");\nvar de_TypeConfigurationIdentifier = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_TA] != null) {\n contents[_TA] = (0, import_smithy_client.expectString)(output[_TA]);\n }\n if (output[_TCA] != null) {\n contents[_TCA] = (0, import_smithy_client.expectString)(output[_TCA]);\n }\n if (output[_TCAy] != null) {\n contents[_TCAy] = (0, import_smithy_client.expectString)(output[_TCAy]);\n }\n if (output[_T] != null) {\n contents[_T] = (0, import_smithy_client.expectString)(output[_T]);\n }\n if (output[_TN] != null) {\n contents[_TN] = (0, import_smithy_client.expectString)(output[_TN]);\n }\n return contents;\n}, \"de_TypeConfigurationIdentifier\");\nvar de_TypeConfigurationNotFoundException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_M] != null) {\n contents[_M] = (0, import_smithy_client.expectString)(output[_M]);\n }\n return contents;\n}, \"de_TypeConfigurationNotFoundException\");\nvar de_TypeNotFoundException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_M] != null) {\n contents[_M] = (0, import_smithy_client.expectString)(output[_M]);\n }\n return contents;\n}, \"de_TypeNotFoundException\");\nvar de_TypeSummaries = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_TypeSummary(entry, context);\n });\n}, \"de_TypeSummaries\");\nvar de_TypeSummary = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_T] != null) {\n contents[_T] = (0, import_smithy_client.expectString)(output[_T]);\n }\n if (output[_TN] != null) {\n contents[_TN] = (0, import_smithy_client.expectString)(output[_TN]);\n }\n if (output[_DVI] != null) {\n contents[_DVI] = (0, import_smithy_client.expectString)(output[_DVI]);\n }\n if (output[_TA] != null) {\n contents[_TA] = (0, import_smithy_client.expectString)(output[_TA]);\n }\n if (output[_LU] != null) {\n contents[_LU] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LU]));\n }\n if (output[_D] != null) {\n contents[_D] = (0, import_smithy_client.expectString)(output[_D]);\n }\n if (output[_PI] != null) {\n contents[_PI] = (0, import_smithy_client.expectString)(output[_PI]);\n }\n if (output[_OTN] != null) {\n contents[_OTN] = (0, import_smithy_client.expectString)(output[_OTN]);\n }\n if (output[_PVN] != null) {\n contents[_PVN] = (0, import_smithy_client.expectString)(output[_PVN]);\n }\n if (output[_LPV] != null) {\n contents[_LPV] = (0, import_smithy_client.expectString)(output[_LPV]);\n }\n if (output[_PIu] != null) {\n contents[_PIu] = (0, import_smithy_client.expectString)(output[_PIu]);\n }\n if (output[_PN] != null) {\n contents[_PN] = (0, import_smithy_client.expectString)(output[_PN]);\n }\n if (output[_IA] != null) {\n contents[_IA] = (0, import_smithy_client.parseBoolean)(output[_IA]);\n }\n return contents;\n}, \"de_TypeSummary\");\nvar de_TypeVersionSummaries = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_TypeVersionSummary(entry, context);\n });\n}, \"de_TypeVersionSummaries\");\nvar de_TypeVersionSummary = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_T] != null) {\n contents[_T] = (0, import_smithy_client.expectString)(output[_T]);\n }\n if (output[_TN] != null) {\n contents[_TN] = (0, import_smithy_client.expectString)(output[_TN]);\n }\n if (output[_VI] != null) {\n contents[_VI] = (0, import_smithy_client.expectString)(output[_VI]);\n }\n if (output[_IDV] != null) {\n contents[_IDV] = (0, import_smithy_client.parseBoolean)(output[_IDV]);\n }\n if (output[_Ar] != null) {\n contents[_Ar] = (0, import_smithy_client.expectString)(output[_Ar]);\n }\n if (output[_TCi] != null) {\n contents[_TCi] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_TCi]));\n }\n if (output[_D] != null) {\n contents[_D] = (0, import_smithy_client.expectString)(output[_D]);\n }\n if (output[_PVN] != null) {\n contents[_PVN] = (0, import_smithy_client.expectString)(output[_PVN]);\n }\n return contents;\n}, \"de_TypeVersionSummary\");\nvar de_UnprocessedTypeConfigurations = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_TypeConfigurationIdentifier(entry, context);\n });\n}, \"de_UnprocessedTypeConfigurations\");\nvar de_UpdateGeneratedTemplateOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_GTI] != null) {\n contents[_GTI] = (0, import_smithy_client.expectString)(output[_GTI]);\n }\n return contents;\n}, \"de_UpdateGeneratedTemplateOutput\");\nvar de_UpdateStackInstancesOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_OI] != null) {\n contents[_OI] = (0, import_smithy_client.expectString)(output[_OI]);\n }\n return contents;\n}, \"de_UpdateStackInstancesOutput\");\nvar de_UpdateStackOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_SI] != null) {\n contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);\n }\n return contents;\n}, \"de_UpdateStackOutput\");\nvar de_UpdateStackSetOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_OI] != null) {\n contents[_OI] = (0, import_smithy_client.expectString)(output[_OI]);\n }\n return contents;\n}, \"de_UpdateStackSetOutput\");\nvar de_UpdateTerminationProtectionOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_SI] != null) {\n contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);\n }\n return contents;\n}, \"de_UpdateTerminationProtectionOutput\");\nvar de_ValidateTemplateOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output.Parameters === \"\") {\n contents[_P] = [];\n } else if (output[_P] != null && output[_P][_m] != null) {\n contents[_P] = de_TemplateParameters((0, import_smithy_client.getArrayIfSingleItem)(output[_P][_m]), context);\n }\n if (output[_D] != null) {\n contents[_D] = (0, import_smithy_client.expectString)(output[_D]);\n }\n if (output.Capabilities === \"\") {\n contents[_C] = [];\n } else if (output[_C] != null && output[_C][_m] != null) {\n contents[_C] = de_Capabilities((0, import_smithy_client.getArrayIfSingleItem)(output[_C][_m]), context);\n }\n if (output[_CR] != null) {\n contents[_CR] = (0, import_smithy_client.expectString)(output[_CR]);\n }\n if (output.DeclaredTransforms === \"\") {\n contents[_DTec] = [];\n } else if (output[_DTec] != null && output[_DTec][_m] != null) {\n contents[_DTec] = de_TransformsList((0, import_smithy_client.getArrayIfSingleItem)(output[_DTec][_m]), context);\n }\n return contents;\n}, \"de_ValidateTemplateOutput\");\nvar de_WarningDetail = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_T] != null) {\n contents[_T] = (0, import_smithy_client.expectString)(output[_T]);\n }\n if (output.Properties === \"\") {\n contents[_Pro] = [];\n } else if (output[_Pro] != null && output[_Pro][_m] != null) {\n contents[_Pro] = de_WarningProperties((0, import_smithy_client.getArrayIfSingleItem)(output[_Pro][_m]), context);\n }\n return contents;\n}, \"de_WarningDetail\");\nvar de_WarningDetails = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_WarningDetail(entry, context);\n });\n}, \"de_WarningDetails\");\nvar de_WarningProperties = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_WarningProperty(entry, context);\n });\n}, \"de_WarningProperties\");\nvar de_WarningProperty = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_PPr] != null) {\n contents[_PPr] = (0, import_smithy_client.expectString)(output[_PPr]);\n }\n if (output[_Req] != null) {\n contents[_Req] = (0, import_smithy_client.parseBoolean)(output[_Req]);\n }\n if (output[_D] != null) {\n contents[_D] = (0, import_smithy_client.expectString)(output[_D]);\n }\n return contents;\n}, \"de_WarningProperty\");\nvar de_Warnings = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output.UnrecognizedResourceTypes === \"\") {\n contents[_URT] = [];\n } else if (output[_URT] != null && output[_URT][_m] != null) {\n contents[_URT] = de_ResourceTypes((0, import_smithy_client.getArrayIfSingleItem)(output[_URT][_m]), context);\n }\n return contents;\n}, \"de_Warnings\");\nvar deserializeMetadata = /* @__PURE__ */ __name((output) => ({\n httpStatusCode: output.statusCode,\n requestId: output.headers[\"x-amzn-requestid\"] ?? output.headers[\"x-amzn-request-id\"] ?? output.headers[\"x-amz-request-id\"],\n extendedRequestId: output.headers[\"x-amz-id-2\"],\n cfId: output.headers[\"x-amz-cf-id\"]\n}), \"deserializeMetadata\");\nvar throwDefaultError = (0, import_smithy_client.withBaseException)(CloudFormationServiceException);\nvar buildHttpRpcRequest = /* @__PURE__ */ __name(async (context, headers, path, resolvedHostname, body) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const contents = {\n protocol,\n hostname,\n port,\n method: \"POST\",\n path: basePath.endsWith(\"/\") ? basePath.slice(0, -1) + path : basePath + path,\n headers\n };\n if (resolvedHostname !== void 0) {\n contents.hostname = resolvedHostname;\n }\n if (body !== void 0) {\n contents.body = body;\n }\n return new import_protocol_http.HttpRequest(contents);\n}, \"buildHttpRpcRequest\");\nvar SHARED_HEADERS = {\n \"content-type\": \"application/x-www-form-urlencoded\"\n};\nvar _ = \"2010-05-15\";\nvar _A = \"Action\";\nvar _AC = \"AfterContext\";\nvar _ACT = \"AttributeChangeType\";\nvar _AD = \"AutoDeployment\";\nvar _AFT = \"AccountFilterType\";\nvar _AGR = \"AccountGateResult\";\nvar _AL = \"AccountLimits\";\nvar _AOA = \"ActivateOrganizationsAccess\";\nvar _AP = \"ActualProperties\";\nvar _AR = \"AddResources\";\nvar _ARARN = \"AdministrationRoleARN\";\nvar _AT = \"ActivateType\";\nvar _ATAC = \"AcceptTermsAndConditions\";\nvar _AU = \"AutoUpdate\";\nvar _AUc = \"AccountsUrl\";\nvar _AV = \"AllowedValues\";\nvar _AVc = \"ActualValue\";\nvar _AVf = \"AfterValue\";\nvar _Ac = \"Accounts\";\nvar _Acc = \"Account\";\nvar _Act = \"Active\";\nvar _Al = \"Alias\";\nvar _Ar = \"Arn\";\nvar _At = \"Attribute\";\nvar _BC = \"BeforeContext\";\nvar _BDTC = \"BatchDescribeTypeConfigurations\";\nvar _BT = \"BearerToken\";\nvar _BV = \"BeforeValue\";\nvar _C = \"Capabilities\";\nvar _CA = \"CallAs\";\nvar _CAo = \"ConnectionArn\";\nvar _CAon = \"ConfigurationAlias\";\nvar _CAonf = \"ConfigurationArn\";\nvar _CCS = \"CreateChangeSet\";\nvar _CE = \"CausingEntity\";\nvar _CGT = \"CreateGeneratedTemplate\";\nvar _CM = \"ConcurrencyMode\";\nvar _COS = \"CurrentOperationStatus\";\nvar _CR = \"CapabilitiesReason\";\nvar _CRT = \"ClientRequestToken\";\nvar _CS = \"CreateStack\";\nvar _CSI = \"CreateStackInstances\";\nvar _CSIh = \"ChangeSetId\";\nvar _CSN = \"ChangeSetName\";\nvar _CSR = \"CreateStackRefactor\";\nvar _CSS = \"CreateStackSet\";\nvar _CST = \"ChangeSetType\";\nvar _CSh = \"ChangeSource\";\nvar _CSo = \"ConfigurationSchema\";\nvar _CT = \"ClientToken\";\nvar _CTr = \"CreationTime\";\nvar _CTre = \"CreationTimestamp\";\nvar _CUR = \"ContinueUpdateRollback\";\nvar _CUS = \"CancelUpdateStack\";\nvar _Ca = \"Category\";\nvar _Ch = \"Changes\";\nvar _Co = \"Configuration\";\nvar _D = \"Description\";\nvar _DAL = \"DescribeAccountLimits\";\nvar _DCS = \"DeleteChangeSet\";\nvar _DCSH = \"DescribeChangeSetHooks\";\nvar _DCSe = \"DescribeChangeSet\";\nvar _DDS = \"DriftDetectionStatus\";\nvar _DGT = \"DeleteGeneratedTemplate\";\nvar _DGTe = \"DescribeGeneratedTemplate\";\nvar _DI = \"DriftInformation\";\nvar _DM = \"DeletionMode\";\nvar _DOA = \"DeactivateOrganizationsAccess\";\nvar _DOAe = \"DescribeOrganizationsAccess\";\nvar _DP = \"DescribePublisher\";\nvar _DPe = \"DeletionPolicy\";\nvar _DR = \"DisableRollback\";\nvar _DRS = \"DescribeResourceScan\";\nvar _DRe = \"DetectionReason\";\nvar _DS = \"DeleteStack\";\nvar _DSD = \"DetectStackDrift\";\nvar _DSDDS = \"DescribeStackDriftDetectionStatus\";\nvar _DSE = \"DescribeStackEvents\";\nvar _DSI = \"DeleteStackInstances\";\nvar _DSIC = \"DriftedStackInstancesCount\";\nvar _DSIe = \"DescribeStackInstance\";\nvar _DSR = \"DescribeStackRefactor\";\nvar _DSRC = \"DriftedStackResourceCount\";\nvar _DSRD = \"DescribeStackResourceDrifts\";\nvar _DSRDe = \"DetectStackResourceDrift\";\nvar _DSRe = \"DescribeStackResource\";\nvar _DSRes = \"DescribeStackResources\";\nvar _DSRet = \"DetectionStatusReason\";\nvar _DSS = \"DeleteStackSet\";\nvar _DSSD = \"DetectStackSetDrift\";\nvar _DSSO = \"DescribeStackSetOperation\";\nvar _DSSe = \"DescribeStackSet\";\nvar _DSe = \"DescribeStacks\";\nvar _DSep = \"DeprecatedStatus\";\nvar _DSet = \"DetectionStatus\";\nvar _DSeta = \"DetailedStatus\";\nvar _DSr = \"DriftStatus\";\nvar _DT = \"DeactivateType\";\nvar _DTR = \"DescribeTypeRegistration\";\nvar _DTe = \"DeregisterType\";\nvar _DTec = \"DeclaredTransforms\";\nvar _DTel = \"DeletionTime\";\nvar _DTep = \"DeploymentTargets\";\nvar _DTes = \"DescribeType\";\nvar _DTi = \"DifferenceType\";\nvar _DU = \"DocumentationUrl\";\nvar _DV = \"DefaultValue\";\nvar _DVI = \"DefaultVersionId\";\nvar _De = \"Destination\";\nvar _Det = \"Details\";\nvar _Dete = \"Detection\";\nvar _E = \"Enabled\";\nvar _EC = \"ErrorCode\";\nvar _ECS = \"ExecuteChangeSet\";\nvar _EI = \"EventId\";\nvar _EM = \"ErrorMessage\";\nvar _EN = \"ExportName\";\nvar _EP = \"ExpectedProperties\";\nvar _ERA = \"ExecutionRoleArn\";\nvar _ERN = \"ExecutionRoleName\";\nvar _ES = \"ExecutionStatus\";\nvar _ESC = \"EnableStackCreation\";\nvar _ESF = \"ExecutionStatusFilter\";\nvar _ESI = \"ExportingStackId\";\nvar _ESR = \"ExecuteStackRefactor\";\nvar _ESRx = \"ExecutionStatusReason\";\nvar _ET = \"EndTime\";\nvar _ETC = \"EstimateTemplateCost\";\nvar _ETP = \"EnableTerminationProtection\";\nvar _ETn = \"EndTimestamp\";\nvar _EV = \"ExpectedValue\";\nvar _En = \"Entity\";\nvar _Er = \"Errors\";\nvar _Ev = \"Evaluation\";\nvar _Ex = \"Exports\";\nvar _F = \"Format\";\nvar _FM = \"FailureMode\";\nvar _FSIC = \"FailedStackInstancesCount\";\nvar _FTC = \"FailureToleranceCount\";\nvar _FTP = \"FailureTolerancePercentage\";\nvar _Fi = \"Filters\";\nvar _GGT = \"GetGeneratedTemplate\";\nvar _GSP = \"GetStackPolicy\";\nvar _GT = \"GetTemplate\";\nvar _GTI = \"GeneratedTemplateId\";\nvar _GTN = \"GeneratedTemplateName\";\nvar _GTS = \"GetTemplateSummary\";\nvar _H = \"Hooks\";\nvar _HFM = \"HookFailureMode\";\nvar _HIC = \"HookInvocationCount\";\nvar _HIP = \"HookInvocationPoint\";\nvar _HR = \"HookResults\";\nvar _HS = \"HookStatus\";\nvar _HSR = \"HookStatusReason\";\nvar _HT = \"HookType\";\nvar _I = \"Id\";\nvar _IA = \"IsActivated\";\nvar _IDC = \"IsDefaultConfiguration\";\nvar _IDV = \"IsDefaultVersion\";\nvar _IER = \"ImportExistingResources\";\nvar _INS = \"IncludeNestedStacks\";\nvar _IP = \"InvocationPoint\";\nvar _IPSIC = \"InProgressStackInstancesCount\";\nvar _IPV = \"IncludePropertyValues\";\nvar _IPd = \"IdentityProvider\";\nvar _ISSIC = \"InSyncStackInstancesCount\";\nvar _ISTSS = \"ImportStacksToStackSet\";\nvar _Im = \"Imports\";\nvar _K = \"Key\";\nvar _LC = \"LoggingConfig\";\nvar _LCS = \"ListChangeSets\";\nvar _LCT = \"LastCheckTimestamp\";\nvar _LDB = \"LogDeliveryBucket\";\nvar _LDCT = \"LastDriftCheckTimestamp\";\nvar _LE = \"ListExports\";\nvar _LGN = \"LogGroupName\";\nvar _LGT = \"ListGeneratedTemplates\";\nvar _LHR = \"ListHookResults\";\nvar _LI = \"ListImports\";\nvar _LIH = \"LogicalIdHierarchy\";\nvar _LOI = \"LastOperationId\";\nvar _LPV = \"LatestPublicVersion\";\nvar _LRA = \"LogRoleArn\";\nvar _LRI = \"LogicalResourceId\";\nvar _LRIo = \"LogicalResourceIds\";\nvar _LRS = \"ListResourceScans\";\nvar _LRSR = \"ListResourceScanResources\";\nvar _LRSRR = \"ListResourceScanRelatedResources\";\nvar _LS = \"ListStacks\";\nvar _LSI = \"ListStackInstances\";\nvar _LSIRD = \"ListStackInstanceResourceDrifts\";\nvar _LSR = \"ListStackRefactors\";\nvar _LSRA = \"ListStackRefactorActions\";\nvar _LSRi = \"ListStackResources\";\nvar _LSS = \"ListStackSets\";\nvar _LSSADT = \"ListStackSetAutoDeploymentTargets\";\nvar _LSSO = \"ListStackSetOperations\";\nvar _LSSOR = \"ListStackSetOperationResults\";\nvar _LT = \"ListTypes\";\nvar _LTR = \"ListTypeRegistrations\";\nvar _LTV = \"ListTypeVersions\";\nvar _LU = \"LastUpdated\";\nvar _LUT = \"LastUpdatedTime\";\nvar _LUTa = \"LastUpdatedTimestamp\";\nvar _M = \"Message\";\nvar _MBS = \"ManagedByStack\";\nvar _MCC = \"MaxConcurrentCount\";\nvar _MCP = \"MaxConcurrentPercentage\";\nvar _ME = \"ManagedExecution\";\nvar _MI = \"ModuleInfo\";\nvar _MR = \"MaxResults\";\nvar _MTIM = \"MonitoringTimeInMinutes\";\nvar _MV = \"MajorVersion\";\nvar _Me = \"Metadata\";\nvar _N = \"Name\";\nvar _NARN = \"NotificationARNs\";\nvar _NE = \"NoEcho\";\nvar _NGTN = \"NewGeneratedTemplateName\";\nvar _NOR = \"NumberOfResources\";\nvar _NT = \"NextToken\";\nvar _O = \"Outputs\";\nvar _OF = \"OnFailure\";\nvar _OI = \"OperationId\";\nvar _OK = \"OutputKey\";\nvar _OP = \"OperationPreferences\";\nvar _OS = \"OperationStatus\";\nvar _OSF = \"OnStackFailure\";\nvar _OTA = \"OriginalTypeArn\";\nvar _OTN = \"OriginalTypeName\";\nvar _OUI = \"OrganizationalUnitIds\";\nvar _OUIr = \"OrganizationalUnitId\";\nvar _OV = \"OutputValue\";\nvar _P = \"Parameters\";\nvar _PA = \"PolicyAction\";\nvar _PC = \"PercentageCompleted\";\nvar _PCSI = \"ParentChangeSetId\";\nvar _PCa = \"ParameterConstraints\";\nvar _PD = \"PropertyDifferences\";\nvar _PI = \"PublisherId\";\nvar _PIa = \"ParentId\";\nvar _PIu = \"PublisherIdentity\";\nvar _PK = \"ParameterKey\";\nvar _PM = \"PermissionModel\";\nvar _PN = \"PublisherName\";\nvar _PO = \"ParameterOverrides\";\nvar _PP = \"PublisherProfile\";\nvar _PPr = \"PropertyPath\";\nvar _PRI = \"PhysicalResourceId\";\nvar _PRIC = \"PhysicalResourceIdContext\";\nvar _PS = \"PublisherStatus\";\nvar _PSr = \"ProgressStatus\";\nvar _PT = \"PublishType\";\nvar _PTA = \"PublicTypeArn\";\nvar _PTa = \"ParameterType\";\nvar _PTr = \"ProvisioningType\";\nvar _PV = \"ParameterValue\";\nvar _PVN = \"PublicVersionNumber\";\nvar _Pa = \"Path\";\nvar _Pr = \"Progress\";\nvar _Pro = \"Properties\";\nvar _R = \"Resources\";\nvar _RA = \"ResourceAction\";\nvar _RAR = \"RefreshAllResources\";\nvar _RARN = \"RoleARN\";\nvar _RAT = \"RequiredActivatedTypes\";\nvar _RC = \"RollbackConfiguration\";\nvar _RCSI = \"RootChangeSetId\";\nvar _RCT = \"RegionConcurrencyType\";\nvar _RCe = \"ResourceChange\";\nvar _REOC = \"RetainExceptOnCreate\";\nvar _RF = \"ResourcesFailed\";\nvar _RHP = \"RecordHandlerProgress\";\nvar _RI = \"ResourceIdentifier\";\nvar _RIS = \"ResourceIdentifierSummaries\";\nvar _RIe = \"ResourceIdentifiers\";\nvar _RIo = \"RootId\";\nvar _RM = \"ResourceMappings\";\nvar _RMe = \"ResourceModel\";\nvar _RMes = \"ResourceMapping\";\nvar _RO = \"RegionOrder\";\nvar _RP = \"RegisterPublisher\";\nvar _RPe = \"ResourceProperties\";\nvar _RPes = \"ResourcesProcessing\";\nvar _RPeso = \"ResourcesPending\";\nvar _RR = \"RetainResources\";\nvar _RRe = \"RemoveResources\";\nvar _RRel = \"RelatedResources\";\nvar _RReq = \"RequiresRecreation\";\nvar _RRes = \"ResourcesRead\";\nvar _RS = \"RollbackStack\";\nvar _RSF = \"RegistrationStatusFilter\";\nvar _RSI = \"ResourceScanId\";\nvar _RSOAR = \"RetainStacksOnAccountRemoval\";\nvar _RSR = \"ResourceStatusReason\";\nvar _RSS = \"ResourceScanSummaries\";\nvar _RSe = \"RetainStacks\";\nvar _RSes = \"ResourcesScanned\";\nvar _RSeso = \"ResourceStatus\";\nvar _RSesou = \"ResourcesSucceeded\";\nvar _RT = \"RegisterType\";\nvar _RTD = \"ResourceTargetDetails\";\nvar _RTI = \"ResourcesToImport\";\nvar _RTL = \"RegistrationTokenList\";\nvar _RTP = \"ResourceTypePrefix\";\nvar _RTS = \"ResourcesToSkip\";\nvar _RTe = \"ResourceTypes\";\nvar _RTeg = \"RegistrationToken\";\nvar _RTes = \"ResourceType\";\nvar _RTo = \"RollbackTriggers\";\nvar _RV = \"ResolvedValue\";\nvar _Re = \"Regions\";\nvar _Reg = \"Region\";\nvar _Rep = \"Replacement\";\nvar _Req = \"Required\";\nvar _S = \"Status\";\nvar _SA = \"StagesAvailable\";\nvar _SD = \"StackDefinitions\";\nvar _SDDI = \"StackDriftDetectionId\";\nvar _SDS = \"StackDriftStatus\";\nvar _SDt = \"StatusDetails\";\nvar _SE = \"StackEvents\";\nvar _SF = \"ScanFilters\";\nvar _SHP = \"SchemaHandlerPackage\";\nvar _SI = \"StackId\";\nvar _SIA = \"StackInstanceAccount\";\nvar _SIR = \"StackInstanceRegion\";\nvar _SIRDS = \"StackInstanceResourceDriftStatuses\";\nvar _SIS = \"StackInstanceStatus\";\nvar _SIU = \"StackIdsUrl\";\nvar _SIt = \"StackIds\";\nvar _SIta = \"StackInstance\";\nvar _SM = \"StatusMessage\";\nvar _SMV = \"SupportedMajorVersions\";\nvar _SN = \"StackName\";\nvar _SPB = \"StackPolicyBody\";\nvar _SPDUB = \"StackPolicyDuringUpdateBody\";\nvar _SPDUURL = \"StackPolicyDuringUpdateURL\";\nvar _SPURL = \"StackPolicyURL\";\nvar _SR = \"SignalResource\";\nvar _SRA = \"StackRefactorActions\";\nvar _SRD = \"StackResourceDrifts\";\nvar _SRDS = \"StackResourceDriftStatus\";\nvar _SRDSF = \"StackResourceDriftStatusFilters\";\nvar _SRDt = \"StackResourceDetail\";\nvar _SRDta = \"StackResourceDrift\";\nvar _SRI = \"StackRefactorId\";\nvar _SRS = \"StartResourceScan\";\nvar _SRSt = \"StackRefactorSummaries\";\nvar _SRSta = \"StackResourceSummaries\";\nvar _SRt = \"StatusReason\";\nvar _SRta = \"StackResources\";\nvar _SS = \"StackSet\";\nvar _SSARN = \"StackSetARN\";\nvar _SSDDD = \"StackSetDriftDetectionDetails\";\nvar _SSF = \"StackStatusFilter\";\nvar _SSI = \"StackSetId\";\nvar _SSN = \"StackSetName\";\nvar _SSO = \"StackSetOperation\";\nvar _SSP = \"SetStackPolicy\";\nvar _SSR = \"StackStatusReason\";\nvar _SSSO = \"StopStackSetOperation\";\nvar _SSt = \"StackSummaries\";\nvar _SSta = \"StackStatus\";\nvar _ST = \"StartTime\";\nvar _STC = \"SetTypeConfiguration\";\nvar _STDV = \"SetTypeDefaultVersion\";\nvar _STF = \"ScanTypeFilter\";\nvar _STc = \"ScanType\";\nvar _SU = \"SourceUrl\";\nvar _Sc = \"Schema\";\nvar _Sco = \"Scope\";\nvar _So = \"Source\";\nvar _St = \"Stacks\";\nvar _Su = \"Summaries\";\nvar _T = \"Type\";\nvar _TA = \"TypeArn\";\nvar _TB = \"TemplateBody\";\nvar _TC = \"TemplateConfiguration\";\nvar _TCA = \"TypeConfigurationAlias\";\nvar _TCAy = \"TypeConfigurationArn\";\nvar _TCI = \"TypeConfigurationIdentifiers\";\nvar _TCIy = \"TypeConfigurationIdentifier\";\nvar _TCVI = \"TypeConfigurationVersionId\";\nvar _TCi = \"TimeCreated\";\nvar _TCy = \"TypeConfigurations\";\nvar _TD = \"TargetDetails\";\nvar _TDe = \"TemplateDescription\";\nvar _TH = \"TypeHierarchy\";\nvar _TI = \"TargetId\";\nvar _TIM = \"TimeoutInMinutes\";\nvar _TK = \"TagKey\";\nvar _TN = \"TypeName\";\nvar _TNA = \"TypeNameAlias\";\nvar _TNP = \"TypeNamePrefix\";\nvar _TR = \"TagResources\";\nvar _TS = \"TemplateStage\";\nvar _TSC = \"TemplateSummaryConfig\";\nvar _TSIC = \"TotalStackInstancesCount\";\nvar _TSy = \"TypeSummaries\";\nvar _TT = \"TestType\";\nvar _TTS = \"TypeTestsStatus\";\nvar _TTSD = \"TypeTestsStatusDescription\";\nvar _TTa = \"TargetType\";\nvar _TURL = \"TemplateURL\";\nvar _TURTAW = \"TreatUnrecognizedResourceTypesAsWarnings\";\nvar _TV = \"TagValue\";\nvar _TVA = \"TypeVersionArn\";\nvar _TVI = \"TypeVersionId\";\nvar _TVS = \"TypeVersionSummaries\";\nvar _TW = \"TotalWarnings\";\nvar _Ta = \"Tags\";\nvar _Tar = \"Target\";\nvar _Ti = \"Timestamp\";\nvar _Ty = \"Types\";\nvar _U = \"Url\";\nvar _UGT = \"UpdateGeneratedTemplate\";\nvar _UI = \"UniqueId\";\nvar _UPT = \"UsePreviousTemplate\";\nvar _UPV = \"UsePreviousValue\";\nvar _UR = \"UntagResources\";\nvar _URP = \"UpdateReplacePolicy\";\nvar _URT = \"UnrecognizedResourceTypes\";\nvar _US = \"UpdateStack\";\nvar _USI = \"UpdateStackInstances\";\nvar _USS = \"UpdateStackSet\";\nvar _UTC = \"UnprocessedTypeConfigurations\";\nvar _UTP = \"UpdateTerminationProtection\";\nvar _V = \"Version\";\nvar _VB = \"VersionBump\";\nvar _VI = \"VersionId\";\nvar _VT = \"ValidateTemplate\";\nvar _Va = \"Values\";\nvar _Val = \"Value\";\nvar _Vi = \"Visibility\";\nvar _W = \"Warnings\";\nvar _e = \"entry\";\nvar _m = \"member\";\nvar buildFormUrlencodedString = /* @__PURE__ */ __name((formEntries) => Object.entries(formEntries).map(([key, value]) => (0, import_smithy_client.extendedEncodeURIComponent)(key) + \"=\" + (0, import_smithy_client.extendedEncodeURIComponent)(value)).join(\"&\"), \"buildFormUrlencodedString\");\nvar loadQueryErrorCode = /* @__PURE__ */ __name((output, data) => {\n if (data.Error?.Code !== void 0) {\n return data.Error.Code;\n }\n if (output.statusCode == 404) {\n return \"NotFound\";\n }\n}, \"loadQueryErrorCode\");\n\n// src/commands/ActivateOrganizationsAccessCommand.ts\nvar ActivateOrganizationsAccessCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"ActivateOrganizationsAccess\", {}).n(\"CloudFormationClient\", \"ActivateOrganizationsAccessCommand\").f(void 0, void 0).ser(se_ActivateOrganizationsAccessCommand).de(de_ActivateOrganizationsAccessCommand).build() {\n static {\n __name(this, \"ActivateOrganizationsAccessCommand\");\n }\n};\n\n// src/commands/ActivateTypeCommand.ts\n\n\n\nvar ActivateTypeCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"ActivateType\", {}).n(\"CloudFormationClient\", \"ActivateTypeCommand\").f(void 0, void 0).ser(se_ActivateTypeCommand).de(de_ActivateTypeCommand).build() {\n static {\n __name(this, \"ActivateTypeCommand\");\n }\n};\n\n// src/commands/BatchDescribeTypeConfigurationsCommand.ts\n\n\n\nvar BatchDescribeTypeConfigurationsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"BatchDescribeTypeConfigurations\", {}).n(\"CloudFormationClient\", \"BatchDescribeTypeConfigurationsCommand\").f(void 0, void 0).ser(se_BatchDescribeTypeConfigurationsCommand).de(de_BatchDescribeTypeConfigurationsCommand).build() {\n static {\n __name(this, \"BatchDescribeTypeConfigurationsCommand\");\n }\n};\n\n// src/commands/CancelUpdateStackCommand.ts\n\n\n\nvar CancelUpdateStackCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"CancelUpdateStack\", {}).n(\"CloudFormationClient\", \"CancelUpdateStackCommand\").f(void 0, void 0).ser(se_CancelUpdateStackCommand).de(de_CancelUpdateStackCommand).build() {\n static {\n __name(this, \"CancelUpdateStackCommand\");\n }\n};\n\n// src/commands/ContinueUpdateRollbackCommand.ts\n\n\n\nvar ContinueUpdateRollbackCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"ContinueUpdateRollback\", {}).n(\"CloudFormationClient\", \"ContinueUpdateRollbackCommand\").f(void 0, void 0).ser(se_ContinueUpdateRollbackCommand).de(de_ContinueUpdateRollbackCommand).build() {\n static {\n __name(this, \"ContinueUpdateRollbackCommand\");\n }\n};\n\n// src/commands/CreateChangeSetCommand.ts\n\n\n\nvar CreateChangeSetCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"CreateChangeSet\", {}).n(\"CloudFormationClient\", \"CreateChangeSetCommand\").f(void 0, void 0).ser(se_CreateChangeSetCommand).de(de_CreateChangeSetCommand).build() {\n static {\n __name(this, \"CreateChangeSetCommand\");\n }\n};\n\n// src/commands/CreateGeneratedTemplateCommand.ts\n\n\n\nvar CreateGeneratedTemplateCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"CreateGeneratedTemplate\", {}).n(\"CloudFormationClient\", \"CreateGeneratedTemplateCommand\").f(void 0, void 0).ser(se_CreateGeneratedTemplateCommand).de(de_CreateGeneratedTemplateCommand).build() {\n static {\n __name(this, \"CreateGeneratedTemplateCommand\");\n }\n};\n\n// src/commands/CreateStackCommand.ts\n\n\n\nvar CreateStackCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"CreateStack\", {}).n(\"CloudFormationClient\", \"CreateStackCommand\").f(void 0, void 0).ser(se_CreateStackCommand).de(de_CreateStackCommand).build() {\n static {\n __name(this, \"CreateStackCommand\");\n }\n};\n\n// src/commands/CreateStackInstancesCommand.ts\n\n\n\nvar CreateStackInstancesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"CreateStackInstances\", {}).n(\"CloudFormationClient\", \"CreateStackInstancesCommand\").f(void 0, void 0).ser(se_CreateStackInstancesCommand).de(de_CreateStackInstancesCommand).build() {\n static {\n __name(this, \"CreateStackInstancesCommand\");\n }\n};\n\n// src/commands/CreateStackRefactorCommand.ts\n\n\n\nvar CreateStackRefactorCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"CreateStackRefactor\", {}).n(\"CloudFormationClient\", \"CreateStackRefactorCommand\").f(void 0, void 0).ser(se_CreateStackRefactorCommand).de(de_CreateStackRefactorCommand).build() {\n static {\n __name(this, \"CreateStackRefactorCommand\");\n }\n};\n\n// src/commands/CreateStackSetCommand.ts\n\n\n\nvar CreateStackSetCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"CreateStackSet\", {}).n(\"CloudFormationClient\", \"CreateStackSetCommand\").f(void 0, void 0).ser(se_CreateStackSetCommand).de(de_CreateStackSetCommand).build() {\n static {\n __name(this, \"CreateStackSetCommand\");\n }\n};\n\n// src/commands/DeactivateOrganizationsAccessCommand.ts\n\n\n\nvar DeactivateOrganizationsAccessCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"DeactivateOrganizationsAccess\", {}).n(\"CloudFormationClient\", \"DeactivateOrganizationsAccessCommand\").f(void 0, void 0).ser(se_DeactivateOrganizationsAccessCommand).de(de_DeactivateOrganizationsAccessCommand).build() {\n static {\n __name(this, \"DeactivateOrganizationsAccessCommand\");\n }\n};\n\n// src/commands/DeactivateTypeCommand.ts\n\n\n\nvar DeactivateTypeCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"DeactivateType\", {}).n(\"CloudFormationClient\", \"DeactivateTypeCommand\").f(void 0, void 0).ser(se_DeactivateTypeCommand).de(de_DeactivateTypeCommand).build() {\n static {\n __name(this, \"DeactivateTypeCommand\");\n }\n};\n\n// src/commands/DeleteChangeSetCommand.ts\n\n\n\nvar DeleteChangeSetCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"DeleteChangeSet\", {}).n(\"CloudFormationClient\", \"DeleteChangeSetCommand\").f(void 0, void 0).ser(se_DeleteChangeSetCommand).de(de_DeleteChangeSetCommand).build() {\n static {\n __name(this, \"DeleteChangeSetCommand\");\n }\n};\n\n// src/commands/DeleteGeneratedTemplateCommand.ts\n\n\n\nvar DeleteGeneratedTemplateCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"DeleteGeneratedTemplate\", {}).n(\"CloudFormationClient\", \"DeleteGeneratedTemplateCommand\").f(void 0, void 0).ser(se_DeleteGeneratedTemplateCommand).de(de_DeleteGeneratedTemplateCommand).build() {\n static {\n __name(this, \"DeleteGeneratedTemplateCommand\");\n }\n};\n\n// src/commands/DeleteStackCommand.ts\n\n\n\nvar DeleteStackCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"DeleteStack\", {}).n(\"CloudFormationClient\", \"DeleteStackCommand\").f(void 0, void 0).ser(se_DeleteStackCommand).de(de_DeleteStackCommand).build() {\n static {\n __name(this, \"DeleteStackCommand\");\n }\n};\n\n// src/commands/DeleteStackInstancesCommand.ts\n\n\n\nvar DeleteStackInstancesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"DeleteStackInstances\", {}).n(\"CloudFormationClient\", \"DeleteStackInstancesCommand\").f(void 0, void 0).ser(se_DeleteStackInstancesCommand).de(de_DeleteStackInstancesCommand).build() {\n static {\n __name(this, \"DeleteStackInstancesCommand\");\n }\n};\n\n// src/commands/DeleteStackSetCommand.ts\n\n\n\nvar DeleteStackSetCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"DeleteStackSet\", {}).n(\"CloudFormationClient\", \"DeleteStackSetCommand\").f(void 0, void 0).ser(se_DeleteStackSetCommand).de(de_DeleteStackSetCommand).build() {\n static {\n __name(this, \"DeleteStackSetCommand\");\n }\n};\n\n// src/commands/DeregisterTypeCommand.ts\n\n\n\nvar DeregisterTypeCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"DeregisterType\", {}).n(\"CloudFormationClient\", \"DeregisterTypeCommand\").f(void 0, void 0).ser(se_DeregisterTypeCommand).de(de_DeregisterTypeCommand).build() {\n static {\n __name(this, \"DeregisterTypeCommand\");\n }\n};\n\n// src/commands/DescribeAccountLimitsCommand.ts\n\n\n\nvar DescribeAccountLimitsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"DescribeAccountLimits\", {}).n(\"CloudFormationClient\", \"DescribeAccountLimitsCommand\").f(void 0, void 0).ser(se_DescribeAccountLimitsCommand).de(de_DescribeAccountLimitsCommand).build() {\n static {\n __name(this, \"DescribeAccountLimitsCommand\");\n }\n};\n\n// src/commands/DescribeChangeSetCommand.ts\n\n\n\nvar DescribeChangeSetCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"DescribeChangeSet\", {}).n(\"CloudFormationClient\", \"DescribeChangeSetCommand\").f(void 0, void 0).ser(se_DescribeChangeSetCommand).de(de_DescribeChangeSetCommand).build() {\n static {\n __name(this, \"DescribeChangeSetCommand\");\n }\n};\n\n// src/commands/DescribeChangeSetHooksCommand.ts\n\n\n\nvar DescribeChangeSetHooksCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"DescribeChangeSetHooks\", {}).n(\"CloudFormationClient\", \"DescribeChangeSetHooksCommand\").f(void 0, void 0).ser(se_DescribeChangeSetHooksCommand).de(de_DescribeChangeSetHooksCommand).build() {\n static {\n __name(this, \"DescribeChangeSetHooksCommand\");\n }\n};\n\n// src/commands/DescribeGeneratedTemplateCommand.ts\n\n\n\nvar DescribeGeneratedTemplateCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"DescribeGeneratedTemplate\", {}).n(\"CloudFormationClient\", \"DescribeGeneratedTemplateCommand\").f(void 0, void 0).ser(se_DescribeGeneratedTemplateCommand).de(de_DescribeGeneratedTemplateCommand).build() {\n static {\n __name(this, \"DescribeGeneratedTemplateCommand\");\n }\n};\n\n// src/commands/DescribeOrganizationsAccessCommand.ts\n\n\n\nvar DescribeOrganizationsAccessCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"DescribeOrganizationsAccess\", {}).n(\"CloudFormationClient\", \"DescribeOrganizationsAccessCommand\").f(void 0, void 0).ser(se_DescribeOrganizationsAccessCommand).de(de_DescribeOrganizationsAccessCommand).build() {\n static {\n __name(this, \"DescribeOrganizationsAccessCommand\");\n }\n};\n\n// src/commands/DescribePublisherCommand.ts\n\n\n\nvar DescribePublisherCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"DescribePublisher\", {}).n(\"CloudFormationClient\", \"DescribePublisherCommand\").f(void 0, void 0).ser(se_DescribePublisherCommand).de(de_DescribePublisherCommand).build() {\n static {\n __name(this, \"DescribePublisherCommand\");\n }\n};\n\n// src/commands/DescribeResourceScanCommand.ts\n\n\n\nvar DescribeResourceScanCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"DescribeResourceScan\", {}).n(\"CloudFormationClient\", \"DescribeResourceScanCommand\").f(void 0, void 0).ser(se_DescribeResourceScanCommand).de(de_DescribeResourceScanCommand).build() {\n static {\n __name(this, \"DescribeResourceScanCommand\");\n }\n};\n\n// src/commands/DescribeStackDriftDetectionStatusCommand.ts\n\n\n\nvar DescribeStackDriftDetectionStatusCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"DescribeStackDriftDetectionStatus\", {}).n(\"CloudFormationClient\", \"DescribeStackDriftDetectionStatusCommand\").f(void 0, void 0).ser(se_DescribeStackDriftDetectionStatusCommand).de(de_DescribeStackDriftDetectionStatusCommand).build() {\n static {\n __name(this, \"DescribeStackDriftDetectionStatusCommand\");\n }\n};\n\n// src/commands/DescribeStackEventsCommand.ts\n\n\n\nvar DescribeStackEventsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"DescribeStackEvents\", {}).n(\"CloudFormationClient\", \"DescribeStackEventsCommand\").f(void 0, void 0).ser(se_DescribeStackEventsCommand).de(de_DescribeStackEventsCommand).build() {\n static {\n __name(this, \"DescribeStackEventsCommand\");\n }\n};\n\n// src/commands/DescribeStackInstanceCommand.ts\n\n\n\nvar DescribeStackInstanceCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"DescribeStackInstance\", {}).n(\"CloudFormationClient\", \"DescribeStackInstanceCommand\").f(void 0, void 0).ser(se_DescribeStackInstanceCommand).de(de_DescribeStackInstanceCommand).build() {\n static {\n __name(this, \"DescribeStackInstanceCommand\");\n }\n};\n\n// src/commands/DescribeStackRefactorCommand.ts\n\n\n\nvar DescribeStackRefactorCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"DescribeStackRefactor\", {}).n(\"CloudFormationClient\", \"DescribeStackRefactorCommand\").f(void 0, void 0).ser(se_DescribeStackRefactorCommand).de(de_DescribeStackRefactorCommand).build() {\n static {\n __name(this, \"DescribeStackRefactorCommand\");\n }\n};\n\n// src/commands/DescribeStackResourceCommand.ts\n\n\n\nvar DescribeStackResourceCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"DescribeStackResource\", {}).n(\"CloudFormationClient\", \"DescribeStackResourceCommand\").f(void 0, void 0).ser(se_DescribeStackResourceCommand).de(de_DescribeStackResourceCommand).build() {\n static {\n __name(this, \"DescribeStackResourceCommand\");\n }\n};\n\n// src/commands/DescribeStackResourceDriftsCommand.ts\n\n\n\nvar DescribeStackResourceDriftsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"DescribeStackResourceDrifts\", {}).n(\"CloudFormationClient\", \"DescribeStackResourceDriftsCommand\").f(void 0, void 0).ser(se_DescribeStackResourceDriftsCommand).de(de_DescribeStackResourceDriftsCommand).build() {\n static {\n __name(this, \"DescribeStackResourceDriftsCommand\");\n }\n};\n\n// src/commands/DescribeStackResourcesCommand.ts\n\n\n\nvar DescribeStackResourcesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"DescribeStackResources\", {}).n(\"CloudFormationClient\", \"DescribeStackResourcesCommand\").f(void 0, void 0).ser(se_DescribeStackResourcesCommand).de(de_DescribeStackResourcesCommand).build() {\n static {\n __name(this, \"DescribeStackResourcesCommand\");\n }\n};\n\n// src/commands/DescribeStacksCommand.ts\n\n\n\nvar DescribeStacksCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"DescribeStacks\", {}).n(\"CloudFormationClient\", \"DescribeStacksCommand\").f(void 0, void 0).ser(se_DescribeStacksCommand).de(de_DescribeStacksCommand).build() {\n static {\n __name(this, \"DescribeStacksCommand\");\n }\n};\n\n// src/commands/DescribeStackSetCommand.ts\n\n\n\nvar DescribeStackSetCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"DescribeStackSet\", {}).n(\"CloudFormationClient\", \"DescribeStackSetCommand\").f(void 0, void 0).ser(se_DescribeStackSetCommand).de(de_DescribeStackSetCommand).build() {\n static {\n __name(this, \"DescribeStackSetCommand\");\n }\n};\n\n// src/commands/DescribeStackSetOperationCommand.ts\n\n\n\nvar DescribeStackSetOperationCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"DescribeStackSetOperation\", {}).n(\"CloudFormationClient\", \"DescribeStackSetOperationCommand\").f(void 0, void 0).ser(se_DescribeStackSetOperationCommand).de(de_DescribeStackSetOperationCommand).build() {\n static {\n __name(this, \"DescribeStackSetOperationCommand\");\n }\n};\n\n// src/commands/DescribeTypeCommand.ts\n\n\n\nvar DescribeTypeCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"DescribeType\", {}).n(\"CloudFormationClient\", \"DescribeTypeCommand\").f(void 0, void 0).ser(se_DescribeTypeCommand).de(de_DescribeTypeCommand).build() {\n static {\n __name(this, \"DescribeTypeCommand\");\n }\n};\n\n// src/commands/DescribeTypeRegistrationCommand.ts\n\n\n\nvar DescribeTypeRegistrationCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"DescribeTypeRegistration\", {}).n(\"CloudFormationClient\", \"DescribeTypeRegistrationCommand\").f(void 0, void 0).ser(se_DescribeTypeRegistrationCommand).de(de_DescribeTypeRegistrationCommand).build() {\n static {\n __name(this, \"DescribeTypeRegistrationCommand\");\n }\n};\n\n// src/commands/DetectStackDriftCommand.ts\n\n\n\nvar DetectStackDriftCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"DetectStackDrift\", {}).n(\"CloudFormationClient\", \"DetectStackDriftCommand\").f(void 0, void 0).ser(se_DetectStackDriftCommand).de(de_DetectStackDriftCommand).build() {\n static {\n __name(this, \"DetectStackDriftCommand\");\n }\n};\n\n// src/commands/DetectStackResourceDriftCommand.ts\n\n\n\nvar DetectStackResourceDriftCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"DetectStackResourceDrift\", {}).n(\"CloudFormationClient\", \"DetectStackResourceDriftCommand\").f(void 0, void 0).ser(se_DetectStackResourceDriftCommand).de(de_DetectStackResourceDriftCommand).build() {\n static {\n __name(this, \"DetectStackResourceDriftCommand\");\n }\n};\n\n// src/commands/DetectStackSetDriftCommand.ts\n\n\n\nvar DetectStackSetDriftCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"DetectStackSetDrift\", {}).n(\"CloudFormationClient\", \"DetectStackSetDriftCommand\").f(void 0, void 0).ser(se_DetectStackSetDriftCommand).de(de_DetectStackSetDriftCommand).build() {\n static {\n __name(this, \"DetectStackSetDriftCommand\");\n }\n};\n\n// src/commands/EstimateTemplateCostCommand.ts\n\n\n\nvar EstimateTemplateCostCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"EstimateTemplateCost\", {}).n(\"CloudFormationClient\", \"EstimateTemplateCostCommand\").f(void 0, void 0).ser(se_EstimateTemplateCostCommand).de(de_EstimateTemplateCostCommand).build() {\n static {\n __name(this, \"EstimateTemplateCostCommand\");\n }\n};\n\n// src/commands/ExecuteChangeSetCommand.ts\n\n\n\nvar ExecuteChangeSetCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"ExecuteChangeSet\", {}).n(\"CloudFormationClient\", \"ExecuteChangeSetCommand\").f(void 0, void 0).ser(se_ExecuteChangeSetCommand).de(de_ExecuteChangeSetCommand).build() {\n static {\n __name(this, \"ExecuteChangeSetCommand\");\n }\n};\n\n// src/commands/ExecuteStackRefactorCommand.ts\n\n\n\nvar ExecuteStackRefactorCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"ExecuteStackRefactor\", {}).n(\"CloudFormationClient\", \"ExecuteStackRefactorCommand\").f(void 0, void 0).ser(se_ExecuteStackRefactorCommand).de(de_ExecuteStackRefactorCommand).build() {\n static {\n __name(this, \"ExecuteStackRefactorCommand\");\n }\n};\n\n// src/commands/GetGeneratedTemplateCommand.ts\n\n\n\nvar GetGeneratedTemplateCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"GetGeneratedTemplate\", {}).n(\"CloudFormationClient\", \"GetGeneratedTemplateCommand\").f(void 0, void 0).ser(se_GetGeneratedTemplateCommand).de(de_GetGeneratedTemplateCommand).build() {\n static {\n __name(this, \"GetGeneratedTemplateCommand\");\n }\n};\n\n// src/commands/GetStackPolicyCommand.ts\n\n\n\nvar GetStackPolicyCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"GetStackPolicy\", {}).n(\"CloudFormationClient\", \"GetStackPolicyCommand\").f(void 0, void 0).ser(se_GetStackPolicyCommand).de(de_GetStackPolicyCommand).build() {\n static {\n __name(this, \"GetStackPolicyCommand\");\n }\n};\n\n// src/commands/GetTemplateCommand.ts\n\n\n\nvar GetTemplateCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"GetTemplate\", {}).n(\"CloudFormationClient\", \"GetTemplateCommand\").f(void 0, void 0).ser(se_GetTemplateCommand).de(de_GetTemplateCommand).build() {\n static {\n __name(this, \"GetTemplateCommand\");\n }\n};\n\n// src/commands/GetTemplateSummaryCommand.ts\n\n\n\nvar GetTemplateSummaryCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"GetTemplateSummary\", {}).n(\"CloudFormationClient\", \"GetTemplateSummaryCommand\").f(void 0, void 0).ser(se_GetTemplateSummaryCommand).de(de_GetTemplateSummaryCommand).build() {\n static {\n __name(this, \"GetTemplateSummaryCommand\");\n }\n};\n\n// src/commands/ImportStacksToStackSetCommand.ts\n\n\n\nvar ImportStacksToStackSetCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"ImportStacksToStackSet\", {}).n(\"CloudFormationClient\", \"ImportStacksToStackSetCommand\").f(void 0, void 0).ser(se_ImportStacksToStackSetCommand).de(de_ImportStacksToStackSetCommand).build() {\n static {\n __name(this, \"ImportStacksToStackSetCommand\");\n }\n};\n\n// src/commands/ListChangeSetsCommand.ts\n\n\n\nvar ListChangeSetsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"ListChangeSets\", {}).n(\"CloudFormationClient\", \"ListChangeSetsCommand\").f(void 0, void 0).ser(se_ListChangeSetsCommand).de(de_ListChangeSetsCommand).build() {\n static {\n __name(this, \"ListChangeSetsCommand\");\n }\n};\n\n// src/commands/ListExportsCommand.ts\n\n\n\nvar ListExportsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"ListExports\", {}).n(\"CloudFormationClient\", \"ListExportsCommand\").f(void 0, void 0).ser(se_ListExportsCommand).de(de_ListExportsCommand).build() {\n static {\n __name(this, \"ListExportsCommand\");\n }\n};\n\n// src/commands/ListGeneratedTemplatesCommand.ts\n\n\n\nvar ListGeneratedTemplatesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"ListGeneratedTemplates\", {}).n(\"CloudFormationClient\", \"ListGeneratedTemplatesCommand\").f(void 0, void 0).ser(se_ListGeneratedTemplatesCommand).de(de_ListGeneratedTemplatesCommand).build() {\n static {\n __name(this, \"ListGeneratedTemplatesCommand\");\n }\n};\n\n// src/commands/ListHookResultsCommand.ts\n\n\n\nvar ListHookResultsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"ListHookResults\", {}).n(\"CloudFormationClient\", \"ListHookResultsCommand\").f(void 0, void 0).ser(se_ListHookResultsCommand).de(de_ListHookResultsCommand).build() {\n static {\n __name(this, \"ListHookResultsCommand\");\n }\n};\n\n// src/commands/ListImportsCommand.ts\n\n\n\nvar ListImportsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"ListImports\", {}).n(\"CloudFormationClient\", \"ListImportsCommand\").f(void 0, void 0).ser(se_ListImportsCommand).de(de_ListImportsCommand).build() {\n static {\n __name(this, \"ListImportsCommand\");\n }\n};\n\n// src/commands/ListResourceScanRelatedResourcesCommand.ts\n\n\n\nvar ListResourceScanRelatedResourcesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"ListResourceScanRelatedResources\", {}).n(\"CloudFormationClient\", \"ListResourceScanRelatedResourcesCommand\").f(void 0, void 0).ser(se_ListResourceScanRelatedResourcesCommand).de(de_ListResourceScanRelatedResourcesCommand).build() {\n static {\n __name(this, \"ListResourceScanRelatedResourcesCommand\");\n }\n};\n\n// src/commands/ListResourceScanResourcesCommand.ts\n\n\n\nvar ListResourceScanResourcesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"ListResourceScanResources\", {}).n(\"CloudFormationClient\", \"ListResourceScanResourcesCommand\").f(void 0, void 0).ser(se_ListResourceScanResourcesCommand).de(de_ListResourceScanResourcesCommand).build() {\n static {\n __name(this, \"ListResourceScanResourcesCommand\");\n }\n};\n\n// src/commands/ListResourceScansCommand.ts\n\n\n\nvar ListResourceScansCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"ListResourceScans\", {}).n(\"CloudFormationClient\", \"ListResourceScansCommand\").f(void 0, void 0).ser(se_ListResourceScansCommand).de(de_ListResourceScansCommand).build() {\n static {\n __name(this, \"ListResourceScansCommand\");\n }\n};\n\n// src/commands/ListStackInstanceResourceDriftsCommand.ts\n\n\n\nvar ListStackInstanceResourceDriftsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"ListStackInstanceResourceDrifts\", {}).n(\"CloudFormationClient\", \"ListStackInstanceResourceDriftsCommand\").f(void 0, void 0).ser(se_ListStackInstanceResourceDriftsCommand).de(de_ListStackInstanceResourceDriftsCommand).build() {\n static {\n __name(this, \"ListStackInstanceResourceDriftsCommand\");\n }\n};\n\n// src/commands/ListStackInstancesCommand.ts\n\n\n\nvar ListStackInstancesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"ListStackInstances\", {}).n(\"CloudFormationClient\", \"ListStackInstancesCommand\").f(void 0, void 0).ser(se_ListStackInstancesCommand).de(de_ListStackInstancesCommand).build() {\n static {\n __name(this, \"ListStackInstancesCommand\");\n }\n};\n\n// src/commands/ListStackRefactorActionsCommand.ts\n\n\n\nvar ListStackRefactorActionsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"ListStackRefactorActions\", {}).n(\"CloudFormationClient\", \"ListStackRefactorActionsCommand\").f(void 0, void 0).ser(se_ListStackRefactorActionsCommand).de(de_ListStackRefactorActionsCommand).build() {\n static {\n __name(this, \"ListStackRefactorActionsCommand\");\n }\n};\n\n// src/commands/ListStackRefactorsCommand.ts\n\n\n\nvar ListStackRefactorsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"ListStackRefactors\", {}).n(\"CloudFormationClient\", \"ListStackRefactorsCommand\").f(void 0, void 0).ser(se_ListStackRefactorsCommand).de(de_ListStackRefactorsCommand).build() {\n static {\n __name(this, \"ListStackRefactorsCommand\");\n }\n};\n\n// src/commands/ListStackResourcesCommand.ts\n\n\n\nvar ListStackResourcesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"ListStackResources\", {}).n(\"CloudFormationClient\", \"ListStackResourcesCommand\").f(void 0, void 0).ser(se_ListStackResourcesCommand).de(de_ListStackResourcesCommand).build() {\n static {\n __name(this, \"ListStackResourcesCommand\");\n }\n};\n\n// src/commands/ListStacksCommand.ts\n\n\n\nvar ListStacksCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"ListStacks\", {}).n(\"CloudFormationClient\", \"ListStacksCommand\").f(void 0, void 0).ser(se_ListStacksCommand).de(de_ListStacksCommand).build() {\n static {\n __name(this, \"ListStacksCommand\");\n }\n};\n\n// src/commands/ListStackSetAutoDeploymentTargetsCommand.ts\n\n\n\nvar ListStackSetAutoDeploymentTargetsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"ListStackSetAutoDeploymentTargets\", {}).n(\"CloudFormationClient\", \"ListStackSetAutoDeploymentTargetsCommand\").f(void 0, void 0).ser(se_ListStackSetAutoDeploymentTargetsCommand).de(de_ListStackSetAutoDeploymentTargetsCommand).build() {\n static {\n __name(this, \"ListStackSetAutoDeploymentTargetsCommand\");\n }\n};\n\n// src/commands/ListStackSetOperationResultsCommand.ts\n\n\n\nvar ListStackSetOperationResultsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"ListStackSetOperationResults\", {}).n(\"CloudFormationClient\", \"ListStackSetOperationResultsCommand\").f(void 0, void 0).ser(se_ListStackSetOperationResultsCommand).de(de_ListStackSetOperationResultsCommand).build() {\n static {\n __name(this, \"ListStackSetOperationResultsCommand\");\n }\n};\n\n// src/commands/ListStackSetOperationsCommand.ts\n\n\n\nvar ListStackSetOperationsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"ListStackSetOperations\", {}).n(\"CloudFormationClient\", \"ListStackSetOperationsCommand\").f(void 0, void 0).ser(se_ListStackSetOperationsCommand).de(de_ListStackSetOperationsCommand).build() {\n static {\n __name(this, \"ListStackSetOperationsCommand\");\n }\n};\n\n// src/commands/ListStackSetsCommand.ts\n\n\n\nvar ListStackSetsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"ListStackSets\", {}).n(\"CloudFormationClient\", \"ListStackSetsCommand\").f(void 0, void 0).ser(se_ListStackSetsCommand).de(de_ListStackSetsCommand).build() {\n static {\n __name(this, \"ListStackSetsCommand\");\n }\n};\n\n// src/commands/ListTypeRegistrationsCommand.ts\n\n\n\nvar ListTypeRegistrationsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"ListTypeRegistrations\", {}).n(\"CloudFormationClient\", \"ListTypeRegistrationsCommand\").f(void 0, void 0).ser(se_ListTypeRegistrationsCommand).de(de_ListTypeRegistrationsCommand).build() {\n static {\n __name(this, \"ListTypeRegistrationsCommand\");\n }\n};\n\n// src/commands/ListTypesCommand.ts\n\n\n\nvar ListTypesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"ListTypes\", {}).n(\"CloudFormationClient\", \"ListTypesCommand\").f(void 0, void 0).ser(se_ListTypesCommand).de(de_ListTypesCommand).build() {\n static {\n __name(this, \"ListTypesCommand\");\n }\n};\n\n// src/commands/ListTypeVersionsCommand.ts\n\n\n\nvar ListTypeVersionsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"ListTypeVersions\", {}).n(\"CloudFormationClient\", \"ListTypeVersionsCommand\").f(void 0, void 0).ser(se_ListTypeVersionsCommand).de(de_ListTypeVersionsCommand).build() {\n static {\n __name(this, \"ListTypeVersionsCommand\");\n }\n};\n\n// src/commands/PublishTypeCommand.ts\n\n\n\nvar PublishTypeCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"PublishType\", {}).n(\"CloudFormationClient\", \"PublishTypeCommand\").f(void 0, void 0).ser(se_PublishTypeCommand).de(de_PublishTypeCommand).build() {\n static {\n __name(this, \"PublishTypeCommand\");\n }\n};\n\n// src/commands/RecordHandlerProgressCommand.ts\n\n\n\nvar RecordHandlerProgressCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"RecordHandlerProgress\", {}).n(\"CloudFormationClient\", \"RecordHandlerProgressCommand\").f(void 0, void 0).ser(se_RecordHandlerProgressCommand).de(de_RecordHandlerProgressCommand).build() {\n static {\n __name(this, \"RecordHandlerProgressCommand\");\n }\n};\n\n// src/commands/RegisterPublisherCommand.ts\n\n\n\nvar RegisterPublisherCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"RegisterPublisher\", {}).n(\"CloudFormationClient\", \"RegisterPublisherCommand\").f(void 0, void 0).ser(se_RegisterPublisherCommand).de(de_RegisterPublisherCommand).build() {\n static {\n __name(this, \"RegisterPublisherCommand\");\n }\n};\n\n// src/commands/RegisterTypeCommand.ts\n\n\n\nvar RegisterTypeCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"RegisterType\", {}).n(\"CloudFormationClient\", \"RegisterTypeCommand\").f(void 0, void 0).ser(se_RegisterTypeCommand).de(de_RegisterTypeCommand).build() {\n static {\n __name(this, \"RegisterTypeCommand\");\n }\n};\n\n// src/commands/RollbackStackCommand.ts\n\n\n\nvar RollbackStackCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"RollbackStack\", {}).n(\"CloudFormationClient\", \"RollbackStackCommand\").f(void 0, void 0).ser(se_RollbackStackCommand).de(de_RollbackStackCommand).build() {\n static {\n __name(this, \"RollbackStackCommand\");\n }\n};\n\n// src/commands/SetStackPolicyCommand.ts\n\n\n\nvar SetStackPolicyCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"SetStackPolicy\", {}).n(\"CloudFormationClient\", \"SetStackPolicyCommand\").f(void 0, void 0).ser(se_SetStackPolicyCommand).de(de_SetStackPolicyCommand).build() {\n static {\n __name(this, \"SetStackPolicyCommand\");\n }\n};\n\n// src/commands/SetTypeConfigurationCommand.ts\n\n\n\nvar SetTypeConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"SetTypeConfiguration\", {}).n(\"CloudFormationClient\", \"SetTypeConfigurationCommand\").f(void 0, void 0).ser(se_SetTypeConfigurationCommand).de(de_SetTypeConfigurationCommand).build() {\n static {\n __name(this, \"SetTypeConfigurationCommand\");\n }\n};\n\n// src/commands/SetTypeDefaultVersionCommand.ts\n\n\n\nvar SetTypeDefaultVersionCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"SetTypeDefaultVersion\", {}).n(\"CloudFormationClient\", \"SetTypeDefaultVersionCommand\").f(void 0, void 0).ser(se_SetTypeDefaultVersionCommand).de(de_SetTypeDefaultVersionCommand).build() {\n static {\n __name(this, \"SetTypeDefaultVersionCommand\");\n }\n};\n\n// src/commands/SignalResourceCommand.ts\n\n\n\nvar SignalResourceCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"SignalResource\", {}).n(\"CloudFormationClient\", \"SignalResourceCommand\").f(void 0, void 0).ser(se_SignalResourceCommand).de(de_SignalResourceCommand).build() {\n static {\n __name(this, \"SignalResourceCommand\");\n }\n};\n\n// src/commands/StartResourceScanCommand.ts\n\n\n\nvar StartResourceScanCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"StartResourceScan\", {}).n(\"CloudFormationClient\", \"StartResourceScanCommand\").f(void 0, void 0).ser(se_StartResourceScanCommand).de(de_StartResourceScanCommand).build() {\n static {\n __name(this, \"StartResourceScanCommand\");\n }\n};\n\n// src/commands/StopStackSetOperationCommand.ts\n\n\n\nvar StopStackSetOperationCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"StopStackSetOperation\", {}).n(\"CloudFormationClient\", \"StopStackSetOperationCommand\").f(void 0, void 0).ser(se_StopStackSetOperationCommand).de(de_StopStackSetOperationCommand).build() {\n static {\n __name(this, \"StopStackSetOperationCommand\");\n }\n};\n\n// src/commands/TestTypeCommand.ts\n\n\n\nvar TestTypeCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"TestType\", {}).n(\"CloudFormationClient\", \"TestTypeCommand\").f(void 0, void 0).ser(se_TestTypeCommand).de(de_TestTypeCommand).build() {\n static {\n __name(this, \"TestTypeCommand\");\n }\n};\n\n// src/commands/UpdateGeneratedTemplateCommand.ts\n\n\n\nvar UpdateGeneratedTemplateCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"UpdateGeneratedTemplate\", {}).n(\"CloudFormationClient\", \"UpdateGeneratedTemplateCommand\").f(void 0, void 0).ser(se_UpdateGeneratedTemplateCommand).de(de_UpdateGeneratedTemplateCommand).build() {\n static {\n __name(this, \"UpdateGeneratedTemplateCommand\");\n }\n};\n\n// src/commands/UpdateStackCommand.ts\n\n\n\nvar UpdateStackCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"UpdateStack\", {}).n(\"CloudFormationClient\", \"UpdateStackCommand\").f(void 0, void 0).ser(se_UpdateStackCommand).de(de_UpdateStackCommand).build() {\n static {\n __name(this, \"UpdateStackCommand\");\n }\n};\n\n// src/commands/UpdateStackInstancesCommand.ts\n\n\n\nvar UpdateStackInstancesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"UpdateStackInstances\", {}).n(\"CloudFormationClient\", \"UpdateStackInstancesCommand\").f(void 0, void 0).ser(se_UpdateStackInstancesCommand).de(de_UpdateStackInstancesCommand).build() {\n static {\n __name(this, \"UpdateStackInstancesCommand\");\n }\n};\n\n// src/commands/UpdateStackSetCommand.ts\n\n\n\nvar UpdateStackSetCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"UpdateStackSet\", {}).n(\"CloudFormationClient\", \"UpdateStackSetCommand\").f(void 0, void 0).ser(se_UpdateStackSetCommand).de(de_UpdateStackSetCommand).build() {\n static {\n __name(this, \"UpdateStackSetCommand\");\n }\n};\n\n// src/commands/UpdateTerminationProtectionCommand.ts\n\n\n\nvar UpdateTerminationProtectionCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"UpdateTerminationProtection\", {}).n(\"CloudFormationClient\", \"UpdateTerminationProtectionCommand\").f(void 0, void 0).ser(se_UpdateTerminationProtectionCommand).de(de_UpdateTerminationProtectionCommand).build() {\n static {\n __name(this, \"UpdateTerminationProtectionCommand\");\n }\n};\n\n// src/commands/ValidateTemplateCommand.ts\n\n\n\nvar ValidateTemplateCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"ValidateTemplate\", {}).n(\"CloudFormationClient\", \"ValidateTemplateCommand\").f(void 0, void 0).ser(se_ValidateTemplateCommand).de(de_ValidateTemplateCommand).build() {\n static {\n __name(this, \"ValidateTemplateCommand\");\n }\n};\n\n// src/CloudFormation.ts\nvar commands = {\n ActivateOrganizationsAccessCommand,\n ActivateTypeCommand,\n BatchDescribeTypeConfigurationsCommand,\n CancelUpdateStackCommand,\n ContinueUpdateRollbackCommand,\n CreateChangeSetCommand,\n CreateGeneratedTemplateCommand,\n CreateStackCommand,\n CreateStackInstancesCommand,\n CreateStackRefactorCommand,\n CreateStackSetCommand,\n DeactivateOrganizationsAccessCommand,\n DeactivateTypeCommand,\n DeleteChangeSetCommand,\n DeleteGeneratedTemplateCommand,\n DeleteStackCommand,\n DeleteStackInstancesCommand,\n DeleteStackSetCommand,\n DeregisterTypeCommand,\n DescribeAccountLimitsCommand,\n DescribeChangeSetCommand,\n DescribeChangeSetHooksCommand,\n DescribeGeneratedTemplateCommand,\n DescribeOrganizationsAccessCommand,\n DescribePublisherCommand,\n DescribeResourceScanCommand,\n DescribeStackDriftDetectionStatusCommand,\n DescribeStackEventsCommand,\n DescribeStackInstanceCommand,\n DescribeStackRefactorCommand,\n DescribeStackResourceCommand,\n DescribeStackResourceDriftsCommand,\n DescribeStackResourcesCommand,\n DescribeStacksCommand,\n DescribeStackSetCommand,\n DescribeStackSetOperationCommand,\n DescribeTypeCommand,\n DescribeTypeRegistrationCommand,\n DetectStackDriftCommand,\n DetectStackResourceDriftCommand,\n DetectStackSetDriftCommand,\n EstimateTemplateCostCommand,\n ExecuteChangeSetCommand,\n ExecuteStackRefactorCommand,\n GetGeneratedTemplateCommand,\n GetStackPolicyCommand,\n GetTemplateCommand,\n GetTemplateSummaryCommand,\n ImportStacksToStackSetCommand,\n ListChangeSetsCommand,\n ListExportsCommand,\n ListGeneratedTemplatesCommand,\n ListHookResultsCommand,\n ListImportsCommand,\n ListResourceScanRelatedResourcesCommand,\n ListResourceScanResourcesCommand,\n ListResourceScansCommand,\n ListStackInstanceResourceDriftsCommand,\n ListStackInstancesCommand,\n ListStackRefactorActionsCommand,\n ListStackRefactorsCommand,\n ListStackResourcesCommand,\n ListStacksCommand,\n ListStackSetAutoDeploymentTargetsCommand,\n ListStackSetOperationResultsCommand,\n ListStackSetOperationsCommand,\n ListStackSetsCommand,\n ListTypeRegistrationsCommand,\n ListTypesCommand,\n ListTypeVersionsCommand,\n PublishTypeCommand,\n RecordHandlerProgressCommand,\n RegisterPublisherCommand,\n RegisterTypeCommand,\n RollbackStackCommand,\n SetStackPolicyCommand,\n SetTypeConfigurationCommand,\n SetTypeDefaultVersionCommand,\n SignalResourceCommand,\n StartResourceScanCommand,\n StopStackSetOperationCommand,\n TestTypeCommand,\n UpdateGeneratedTemplateCommand,\n UpdateStackCommand,\n UpdateStackInstancesCommand,\n UpdateStackSetCommand,\n UpdateTerminationProtectionCommand,\n ValidateTemplateCommand\n};\nvar CloudFormation = class extends CloudFormationClient {\n static {\n __name(this, \"CloudFormation\");\n }\n};\n(0, import_smithy_client.createAggregatedClient)(commands, CloudFormation);\n\n// src/pagination/DescribeAccountLimitsPaginator.ts\n\nvar paginateDescribeAccountLimits = (0, import_core.createPaginator)(CloudFormationClient, DescribeAccountLimitsCommand, \"NextToken\", \"NextToken\", \"\");\n\n// src/pagination/DescribeStackEventsPaginator.ts\n\nvar paginateDescribeStackEvents = (0, import_core.createPaginator)(CloudFormationClient, DescribeStackEventsCommand, \"NextToken\", \"NextToken\", \"\");\n\n// src/pagination/DescribeStackResourceDriftsPaginator.ts\n\nvar paginateDescribeStackResourceDrifts = (0, import_core.createPaginator)(CloudFormationClient, DescribeStackResourceDriftsCommand, \"NextToken\", \"NextToken\", \"MaxResults\");\n\n// src/pagination/DescribeStacksPaginator.ts\n\nvar paginateDescribeStacks = (0, import_core.createPaginator)(CloudFormationClient, DescribeStacksCommand, \"NextToken\", \"NextToken\", \"\");\n\n// src/pagination/ListChangeSetsPaginator.ts\n\nvar paginateListChangeSets = (0, import_core.createPaginator)(CloudFormationClient, ListChangeSetsCommand, \"NextToken\", \"NextToken\", \"\");\n\n// src/pagination/ListExportsPaginator.ts\n\nvar paginateListExports = (0, import_core.createPaginator)(CloudFormationClient, ListExportsCommand, \"NextToken\", \"NextToken\", \"\");\n\n// src/pagination/ListGeneratedTemplatesPaginator.ts\n\nvar paginateListGeneratedTemplates = (0, import_core.createPaginator)(CloudFormationClient, ListGeneratedTemplatesCommand, \"NextToken\", \"NextToken\", \"MaxResults\");\n\n// src/pagination/ListImportsPaginator.ts\n\nvar paginateListImports = (0, import_core.createPaginator)(CloudFormationClient, ListImportsCommand, \"NextToken\", \"NextToken\", \"\");\n\n// src/pagination/ListResourceScanRelatedResourcesPaginator.ts\n\nvar paginateListResourceScanRelatedResources = (0, import_core.createPaginator)(CloudFormationClient, ListResourceScanRelatedResourcesCommand, \"NextToken\", \"NextToken\", \"MaxResults\");\n\n// src/pagination/ListResourceScanResourcesPaginator.ts\n\nvar paginateListResourceScanResources = (0, import_core.createPaginator)(CloudFormationClient, ListResourceScanResourcesCommand, \"NextToken\", \"NextToken\", \"MaxResults\");\n\n// src/pagination/ListResourceScansPaginator.ts\n\nvar paginateListResourceScans = (0, import_core.createPaginator)(CloudFormationClient, ListResourceScansCommand, \"NextToken\", \"NextToken\", \"MaxResults\");\n\n// src/pagination/ListStackInstancesPaginator.ts\n\nvar paginateListStackInstances = (0, import_core.createPaginator)(CloudFormationClient, ListStackInstancesCommand, \"NextToken\", \"NextToken\", \"MaxResults\");\n\n// src/pagination/ListStackRefactorActionsPaginator.ts\n\nvar paginateListStackRefactorActions = (0, import_core.createPaginator)(CloudFormationClient, ListStackRefactorActionsCommand, \"NextToken\", \"NextToken\", \"MaxResults\");\n\n// src/pagination/ListStackRefactorsPaginator.ts\n\nvar paginateListStackRefactors = (0, import_core.createPaginator)(CloudFormationClient, ListStackRefactorsCommand, \"NextToken\", \"NextToken\", \"MaxResults\");\n\n// src/pagination/ListStackResourcesPaginator.ts\n\nvar paginateListStackResources = (0, import_core.createPaginator)(CloudFormationClient, ListStackResourcesCommand, \"NextToken\", \"NextToken\", \"\");\n\n// src/pagination/ListStackSetOperationResultsPaginator.ts\n\nvar paginateListStackSetOperationResults = (0, import_core.createPaginator)(CloudFormationClient, ListStackSetOperationResultsCommand, \"NextToken\", \"NextToken\", \"MaxResults\");\n\n// src/pagination/ListStackSetOperationsPaginator.ts\n\nvar paginateListStackSetOperations = (0, import_core.createPaginator)(CloudFormationClient, ListStackSetOperationsCommand, \"NextToken\", \"NextToken\", \"MaxResults\");\n\n// src/pagination/ListStackSetsPaginator.ts\n\nvar paginateListStackSets = (0, import_core.createPaginator)(CloudFormationClient, ListStackSetsCommand, \"NextToken\", \"NextToken\", \"MaxResults\");\n\n// src/pagination/ListStacksPaginator.ts\n\nvar paginateListStacks = (0, import_core.createPaginator)(CloudFormationClient, ListStacksCommand, \"NextToken\", \"NextToken\", \"\");\n\n// src/pagination/ListTypeRegistrationsPaginator.ts\n\nvar paginateListTypeRegistrations = (0, import_core.createPaginator)(CloudFormationClient, ListTypeRegistrationsCommand, \"NextToken\", \"NextToken\", \"MaxResults\");\n\n// src/pagination/ListTypeVersionsPaginator.ts\n\nvar paginateListTypeVersions = (0, import_core.createPaginator)(CloudFormationClient, ListTypeVersionsCommand, \"NextToken\", \"NextToken\", \"MaxResults\");\n\n// src/pagination/ListTypesPaginator.ts\n\nvar paginateListTypes = (0, import_core.createPaginator)(CloudFormationClient, ListTypesCommand, \"NextToken\", \"NextToken\", \"MaxResults\");\n\n// src/waiters/waitForChangeSetCreateComplete.ts\nvar import_util_waiter = require(\"@smithy/util-waiter\");\nvar checkState = /* @__PURE__ */ __name(async (client, input) => {\n let reason;\n try {\n const result = await client.send(new DescribeChangeSetCommand(input));\n reason = result;\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n return result.Status;\n }, \"returnComparator\");\n if (returnComparator() === \"CREATE_COMPLETE\") {\n return { state: import_util_waiter.WaiterState.SUCCESS, reason };\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n return result.Status;\n }, \"returnComparator\");\n if (returnComparator() === \"FAILED\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n } catch (e) {\n }\n } catch (exception) {\n reason = exception;\n if (exception.name && exception.name == \"ValidationError\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n }\n return { state: import_util_waiter.WaiterState.RETRY, reason };\n}, \"checkState\");\nvar waitForChangeSetCreateComplete = /* @__PURE__ */ __name(async (params, input) => {\n const serviceDefaults = { minDelay: 30, maxDelay: 120 };\n return (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState);\n}, \"waitForChangeSetCreateComplete\");\nvar waitUntilChangeSetCreateComplete = /* @__PURE__ */ __name(async (params, input) => {\n const serviceDefaults = { minDelay: 30, maxDelay: 120 };\n const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState);\n return (0, import_util_waiter.checkExceptions)(result);\n}, \"waitUntilChangeSetCreateComplete\");\n\n// src/waiters/waitForStackCreateComplete.ts\n\nvar checkState2 = /* @__PURE__ */ __name(async (client, input) => {\n let reason;\n try {\n const result = await client.send(new DescribeStacksCommand(input));\n reason = result;\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n let allStringEq_5 = returnComparator().length > 0;\n for (const element_4 of returnComparator()) {\n allStringEq_5 = allStringEq_5 && element_4 == \"CREATE_COMPLETE\";\n }\n if (allStringEq_5) {\n return { state: import_util_waiter.WaiterState.SUCCESS, reason };\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n let allStringEq_5 = returnComparator().length > 0;\n for (const element_4 of returnComparator()) {\n allStringEq_5 = allStringEq_5 && element_4 == \"UPDATE_COMPLETE\";\n }\n if (allStringEq_5) {\n return { state: import_util_waiter.WaiterState.SUCCESS, reason };\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n let allStringEq_5 = returnComparator().length > 0;\n for (const element_4 of returnComparator()) {\n allStringEq_5 = allStringEq_5 && element_4 == \"UPDATE_IN_PROGRESS\";\n }\n if (allStringEq_5) {\n return { state: import_util_waiter.WaiterState.SUCCESS, reason };\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n let allStringEq_5 = returnComparator().length > 0;\n for (const element_4 of returnComparator()) {\n allStringEq_5 = allStringEq_5 && element_4 == \"UPDATE_COMPLETE_CLEANUP_IN_PROGRESS\";\n }\n if (allStringEq_5) {\n return { state: import_util_waiter.WaiterState.SUCCESS, reason };\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n let allStringEq_5 = returnComparator().length > 0;\n for (const element_4 of returnComparator()) {\n allStringEq_5 = allStringEq_5 && element_4 == \"UPDATE_FAILED\";\n }\n if (allStringEq_5) {\n return { state: import_util_waiter.WaiterState.SUCCESS, reason };\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n let allStringEq_5 = returnComparator().length > 0;\n for (const element_4 of returnComparator()) {\n allStringEq_5 = allStringEq_5 && element_4 == \"UPDATE_ROLLBACK_IN_PROGRESS\";\n }\n if (allStringEq_5) {\n return { state: import_util_waiter.WaiterState.SUCCESS, reason };\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n let allStringEq_5 = returnComparator().length > 0;\n for (const element_4 of returnComparator()) {\n allStringEq_5 = allStringEq_5 && element_4 == \"UPDATE_ROLLBACK_FAILED\";\n }\n if (allStringEq_5) {\n return { state: import_util_waiter.WaiterState.SUCCESS, reason };\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n let allStringEq_5 = returnComparator().length > 0;\n for (const element_4 of returnComparator()) {\n allStringEq_5 = allStringEq_5 && element_4 == \"UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS\";\n }\n if (allStringEq_5) {\n return { state: import_util_waiter.WaiterState.SUCCESS, reason };\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n let allStringEq_5 = returnComparator().length > 0;\n for (const element_4 of returnComparator()) {\n allStringEq_5 = allStringEq_5 && element_4 == \"UPDATE_ROLLBACK_COMPLETE\";\n }\n if (allStringEq_5) {\n return { state: import_util_waiter.WaiterState.SUCCESS, reason };\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n for (const anyStringEq_4 of returnComparator()) {\n if (anyStringEq_4 == \"CREATE_FAILED\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n for (const anyStringEq_4 of returnComparator()) {\n if (anyStringEq_4 == \"DELETE_COMPLETE\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n for (const anyStringEq_4 of returnComparator()) {\n if (anyStringEq_4 == \"DELETE_FAILED\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n for (const anyStringEq_4 of returnComparator()) {\n if (anyStringEq_4 == \"ROLLBACK_FAILED\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n for (const anyStringEq_4 of returnComparator()) {\n if (anyStringEq_4 == \"ROLLBACK_COMPLETE\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n }\n } catch (e) {\n }\n } catch (exception) {\n reason = exception;\n if (exception.name && exception.name == \"ValidationError\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n }\n return { state: import_util_waiter.WaiterState.RETRY, reason };\n}, \"checkState\");\nvar waitForStackCreateComplete = /* @__PURE__ */ __name(async (params, input) => {\n const serviceDefaults = { minDelay: 30, maxDelay: 120 };\n return (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState2);\n}, \"waitForStackCreateComplete\");\nvar waitUntilStackCreateComplete = /* @__PURE__ */ __name(async (params, input) => {\n const serviceDefaults = { minDelay: 30, maxDelay: 120 };\n const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState2);\n return (0, import_util_waiter.checkExceptions)(result);\n}, \"waitUntilStackCreateComplete\");\n\n// src/waiters/waitForStackDeleteComplete.ts\n\nvar checkState3 = /* @__PURE__ */ __name(async (client, input) => {\n let reason;\n try {\n const result = await client.send(new DescribeStacksCommand(input));\n reason = result;\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n let allStringEq_5 = returnComparator().length > 0;\n for (const element_4 of returnComparator()) {\n allStringEq_5 = allStringEq_5 && element_4 == \"DELETE_COMPLETE\";\n }\n if (allStringEq_5) {\n return { state: import_util_waiter.WaiterState.SUCCESS, reason };\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n for (const anyStringEq_4 of returnComparator()) {\n if (anyStringEq_4 == \"DELETE_FAILED\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n for (const anyStringEq_4 of returnComparator()) {\n if (anyStringEq_4 == \"CREATE_FAILED\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n for (const anyStringEq_4 of returnComparator()) {\n if (anyStringEq_4 == \"ROLLBACK_FAILED\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n for (const anyStringEq_4 of returnComparator()) {\n if (anyStringEq_4 == \"UPDATE_ROLLBACK_IN_PROGRESS\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n for (const anyStringEq_4 of returnComparator()) {\n if (anyStringEq_4 == \"UPDATE_ROLLBACK_FAILED\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n for (const anyStringEq_4 of returnComparator()) {\n if (anyStringEq_4 == \"UPDATE_ROLLBACK_COMPLETE\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n for (const anyStringEq_4 of returnComparator()) {\n if (anyStringEq_4 == \"UPDATE_COMPLETE\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n }\n } catch (e) {\n }\n } catch (exception) {\n reason = exception;\n if (exception.name && exception.name == \"ValidationError\") {\n return { state: import_util_waiter.WaiterState.SUCCESS, reason };\n }\n }\n return { state: import_util_waiter.WaiterState.RETRY, reason };\n}, \"checkState\");\nvar waitForStackDeleteComplete = /* @__PURE__ */ __name(async (params, input) => {\n const serviceDefaults = { minDelay: 30, maxDelay: 120 };\n return (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState3);\n}, \"waitForStackDeleteComplete\");\nvar waitUntilStackDeleteComplete = /* @__PURE__ */ __name(async (params, input) => {\n const serviceDefaults = { minDelay: 30, maxDelay: 120 };\n const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState3);\n return (0, import_util_waiter.checkExceptions)(result);\n}, \"waitUntilStackDeleteComplete\");\n\n// src/waiters/waitForStackExists.ts\n\nvar checkState4 = /* @__PURE__ */ __name(async (client, input) => {\n let reason;\n try {\n const result = await client.send(new DescribeStacksCommand(input));\n reason = result;\n return { state: import_util_waiter.WaiterState.SUCCESS, reason };\n } catch (exception) {\n reason = exception;\n if (exception.name && exception.name == \"ValidationError\") {\n return { state: import_util_waiter.WaiterState.RETRY, reason };\n }\n }\n return { state: import_util_waiter.WaiterState.RETRY, reason };\n}, \"checkState\");\nvar waitForStackExists = /* @__PURE__ */ __name(async (params, input) => {\n const serviceDefaults = { minDelay: 5, maxDelay: 120 };\n return (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState4);\n}, \"waitForStackExists\");\nvar waitUntilStackExists = /* @__PURE__ */ __name(async (params, input) => {\n const serviceDefaults = { minDelay: 5, maxDelay: 120 };\n const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState4);\n return (0, import_util_waiter.checkExceptions)(result);\n}, \"waitUntilStackExists\");\n\n// src/waiters/waitForStackImportComplete.ts\n\nvar checkState5 = /* @__PURE__ */ __name(async (client, input) => {\n let reason;\n try {\n const result = await client.send(new DescribeStacksCommand(input));\n reason = result;\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n let allStringEq_5 = returnComparator().length > 0;\n for (const element_4 of returnComparator()) {\n allStringEq_5 = allStringEq_5 && element_4 == \"IMPORT_COMPLETE\";\n }\n if (allStringEq_5) {\n return { state: import_util_waiter.WaiterState.SUCCESS, reason };\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n for (const anyStringEq_4 of returnComparator()) {\n if (anyStringEq_4 == \"ROLLBACK_COMPLETE\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n for (const anyStringEq_4 of returnComparator()) {\n if (anyStringEq_4 == \"ROLLBACK_FAILED\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n for (const anyStringEq_4 of returnComparator()) {\n if (anyStringEq_4 == \"IMPORT_ROLLBACK_IN_PROGRESS\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n for (const anyStringEq_4 of returnComparator()) {\n if (anyStringEq_4 == \"IMPORT_ROLLBACK_FAILED\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n for (const anyStringEq_4 of returnComparator()) {\n if (anyStringEq_4 == \"IMPORT_ROLLBACK_COMPLETE\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n }\n } catch (e) {\n }\n } catch (exception) {\n reason = exception;\n if (exception.name && exception.name == \"ValidationError\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n }\n return { state: import_util_waiter.WaiterState.RETRY, reason };\n}, \"checkState\");\nvar waitForStackImportComplete = /* @__PURE__ */ __name(async (params, input) => {\n const serviceDefaults = { minDelay: 30, maxDelay: 120 };\n return (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState5);\n}, \"waitForStackImportComplete\");\nvar waitUntilStackImportComplete = /* @__PURE__ */ __name(async (params, input) => {\n const serviceDefaults = { minDelay: 30, maxDelay: 120 };\n const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState5);\n return (0, import_util_waiter.checkExceptions)(result);\n}, \"waitUntilStackImportComplete\");\n\n// src/waiters/waitForStackRefactorCreateComplete.ts\n\nvar checkState6 = /* @__PURE__ */ __name(async (client, input) => {\n let reason;\n try {\n const result = await client.send(new DescribeStackRefactorCommand(input));\n reason = result;\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n return result.Status;\n }, \"returnComparator\");\n if (returnComparator() === \"CREATE_COMPLETE\") {\n return { state: import_util_waiter.WaiterState.SUCCESS, reason };\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n return result.Status;\n }, \"returnComparator\");\n if (returnComparator() === \"CREATE_FAILED\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n } catch (e) {\n }\n } catch (exception) {\n reason = exception;\n if (exception.name && exception.name == \"ValidationError\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n }\n return { state: import_util_waiter.WaiterState.RETRY, reason };\n}, \"checkState\");\nvar waitForStackRefactorCreateComplete = /* @__PURE__ */ __name(async (params, input) => {\n const serviceDefaults = { minDelay: 5, maxDelay: 120 };\n return (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState6);\n}, \"waitForStackRefactorCreateComplete\");\nvar waitUntilStackRefactorCreateComplete = /* @__PURE__ */ __name(async (params, input) => {\n const serviceDefaults = { minDelay: 5, maxDelay: 120 };\n const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState6);\n return (0, import_util_waiter.checkExceptions)(result);\n}, \"waitUntilStackRefactorCreateComplete\");\n\n// src/waiters/waitForStackRefactorExecuteComplete.ts\n\nvar checkState7 = /* @__PURE__ */ __name(async (client, input) => {\n let reason;\n try {\n const result = await client.send(new DescribeStackRefactorCommand(input));\n reason = result;\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n return result.ExecutionStatus;\n }, \"returnComparator\");\n if (returnComparator() === \"EXECUTE_COMPLETE\") {\n return { state: import_util_waiter.WaiterState.SUCCESS, reason };\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n return result.ExecutionStatus;\n }, \"returnComparator\");\n if (returnComparator() === \"EXECUTE_FAILED\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n return result.ExecutionStatus;\n }, \"returnComparator\");\n if (returnComparator() === \"ROLLBACK_COMPLETE\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n } catch (e) {\n }\n } catch (exception) {\n reason = exception;\n if (exception.name && exception.name == \"ValidationError\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n }\n return { state: import_util_waiter.WaiterState.RETRY, reason };\n}, \"checkState\");\nvar waitForStackRefactorExecuteComplete = /* @__PURE__ */ __name(async (params, input) => {\n const serviceDefaults = { minDelay: 15, maxDelay: 120 };\n return (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState7);\n}, \"waitForStackRefactorExecuteComplete\");\nvar waitUntilStackRefactorExecuteComplete = /* @__PURE__ */ __name(async (params, input) => {\n const serviceDefaults = { minDelay: 15, maxDelay: 120 };\n const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState7);\n return (0, import_util_waiter.checkExceptions)(result);\n}, \"waitUntilStackRefactorExecuteComplete\");\n\n// src/waiters/waitForStackRollbackComplete.ts\n\nvar checkState8 = /* @__PURE__ */ __name(async (client, input) => {\n let reason;\n try {\n const result = await client.send(new DescribeStacksCommand(input));\n reason = result;\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n let allStringEq_5 = returnComparator().length > 0;\n for (const element_4 of returnComparator()) {\n allStringEq_5 = allStringEq_5 && element_4 == \"UPDATE_ROLLBACK_COMPLETE\";\n }\n if (allStringEq_5) {\n return { state: import_util_waiter.WaiterState.SUCCESS, reason };\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n for (const anyStringEq_4 of returnComparator()) {\n if (anyStringEq_4 == \"UPDATE_FAILED\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n for (const anyStringEq_4 of returnComparator()) {\n if (anyStringEq_4 == \"UPDATE_ROLLBACK_FAILED\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n for (const anyStringEq_4 of returnComparator()) {\n if (anyStringEq_4 == \"DELETE_FAILED\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n }\n } catch (e) {\n }\n } catch (exception) {\n reason = exception;\n if (exception.name && exception.name == \"ValidationError\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n }\n return { state: import_util_waiter.WaiterState.RETRY, reason };\n}, \"checkState\");\nvar waitForStackRollbackComplete = /* @__PURE__ */ __name(async (params, input) => {\n const serviceDefaults = { minDelay: 30, maxDelay: 120 };\n return (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState8);\n}, \"waitForStackRollbackComplete\");\nvar waitUntilStackRollbackComplete = /* @__PURE__ */ __name(async (params, input) => {\n const serviceDefaults = { minDelay: 30, maxDelay: 120 };\n const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState8);\n return (0, import_util_waiter.checkExceptions)(result);\n}, \"waitUntilStackRollbackComplete\");\n\n// src/waiters/waitForStackUpdateComplete.ts\n\nvar checkState9 = /* @__PURE__ */ __name(async (client, input) => {\n let reason;\n try {\n const result = await client.send(new DescribeStacksCommand(input));\n reason = result;\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n let allStringEq_5 = returnComparator().length > 0;\n for (const element_4 of returnComparator()) {\n allStringEq_5 = allStringEq_5 && element_4 == \"UPDATE_COMPLETE\";\n }\n if (allStringEq_5) {\n return { state: import_util_waiter.WaiterState.SUCCESS, reason };\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n for (const anyStringEq_4 of returnComparator()) {\n if (anyStringEq_4 == \"UPDATE_FAILED\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n for (const anyStringEq_4 of returnComparator()) {\n if (anyStringEq_4 == \"UPDATE_ROLLBACK_FAILED\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n for (const anyStringEq_4 of returnComparator()) {\n if (anyStringEq_4 == \"UPDATE_ROLLBACK_COMPLETE\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n }\n } catch (e) {\n }\n } catch (exception) {\n reason = exception;\n if (exception.name && exception.name == \"ValidationError\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n }\n return { state: import_util_waiter.WaiterState.RETRY, reason };\n}, \"checkState\");\nvar waitForStackUpdateComplete = /* @__PURE__ */ __name(async (params, input) => {\n const serviceDefaults = { minDelay: 30, maxDelay: 120 };\n return (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState9);\n}, \"waitForStackUpdateComplete\");\nvar waitUntilStackUpdateComplete = /* @__PURE__ */ __name(async (params, input) => {\n const serviceDefaults = { minDelay: 30, maxDelay: 120 };\n const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState9);\n return (0, import_util_waiter.checkExceptions)(result);\n}, \"waitUntilStackUpdateComplete\");\n\n// src/waiters/waitForTypeRegistrationComplete.ts\n\nvar checkState10 = /* @__PURE__ */ __name(async (client, input) => {\n let reason;\n try {\n const result = await client.send(new DescribeTypeRegistrationCommand(input));\n reason = result;\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n return result.ProgressStatus;\n }, \"returnComparator\");\n if (returnComparator() === \"COMPLETE\") {\n return { state: import_util_waiter.WaiterState.SUCCESS, reason };\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n return result.ProgressStatus;\n }, \"returnComparator\");\n if (returnComparator() === \"FAILED\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n } catch (e) {\n }\n } catch (exception) {\n reason = exception;\n }\n return { state: import_util_waiter.WaiterState.RETRY, reason };\n}, \"checkState\");\nvar waitForTypeRegistrationComplete = /* @__PURE__ */ __name(async (params, input) => {\n const serviceDefaults = { minDelay: 30, maxDelay: 120 };\n return (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState10);\n}, \"waitForTypeRegistrationComplete\");\nvar waitUntilTypeRegistrationComplete = /* @__PURE__ */ __name(async (params, input) => {\n const serviceDefaults = { minDelay: 30, maxDelay: 120 };\n const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState10);\n return (0, import_util_waiter.checkExceptions)(result);\n}, \"waitUntilTypeRegistrationComplete\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n CloudFormationServiceException,\n __Client,\n CloudFormationClient,\n CloudFormation,\n $Command,\n ActivateOrganizationsAccessCommand,\n ActivateTypeCommand,\n BatchDescribeTypeConfigurationsCommand,\n CancelUpdateStackCommand,\n ContinueUpdateRollbackCommand,\n CreateChangeSetCommand,\n CreateGeneratedTemplateCommand,\n CreateStackCommand,\n CreateStackInstancesCommand,\n CreateStackRefactorCommand,\n CreateStackSetCommand,\n DeactivateOrganizationsAccessCommand,\n DeactivateTypeCommand,\n DeleteChangeSetCommand,\n DeleteGeneratedTemplateCommand,\n DeleteStackCommand,\n DeleteStackInstancesCommand,\n DeleteStackSetCommand,\n DeregisterTypeCommand,\n DescribeAccountLimitsCommand,\n DescribeChangeSetCommand,\n DescribeChangeSetHooksCommand,\n DescribeGeneratedTemplateCommand,\n DescribeOrganizationsAccessCommand,\n DescribePublisherCommand,\n DescribeResourceScanCommand,\n DescribeStackDriftDetectionStatusCommand,\n DescribeStackEventsCommand,\n DescribeStackInstanceCommand,\n DescribeStackRefactorCommand,\n DescribeStackResourceCommand,\n DescribeStackResourceDriftsCommand,\n DescribeStackResourcesCommand,\n DescribeStackSetCommand,\n DescribeStackSetOperationCommand,\n DescribeStacksCommand,\n DescribeTypeCommand,\n DescribeTypeRegistrationCommand,\n DetectStackDriftCommand,\n DetectStackResourceDriftCommand,\n DetectStackSetDriftCommand,\n EstimateTemplateCostCommand,\n ExecuteChangeSetCommand,\n ExecuteStackRefactorCommand,\n GetGeneratedTemplateCommand,\n GetStackPolicyCommand,\n GetTemplateCommand,\n GetTemplateSummaryCommand,\n ImportStacksToStackSetCommand,\n ListChangeSetsCommand,\n ListExportsCommand,\n ListGeneratedTemplatesCommand,\n ListHookResultsCommand,\n ListImportsCommand,\n ListResourceScanRelatedResourcesCommand,\n ListResourceScanResourcesCommand,\n ListResourceScansCommand,\n ListStackInstanceResourceDriftsCommand,\n ListStackInstancesCommand,\n ListStackRefactorActionsCommand,\n ListStackRefactorsCommand,\n ListStackResourcesCommand,\n ListStackSetAutoDeploymentTargetsCommand,\n ListStackSetOperationResultsCommand,\n ListStackSetOperationsCommand,\n ListStackSetsCommand,\n ListStacksCommand,\n ListTypeRegistrationsCommand,\n ListTypeVersionsCommand,\n ListTypesCommand,\n PublishTypeCommand,\n RecordHandlerProgressCommand,\n RegisterPublisherCommand,\n RegisterTypeCommand,\n RollbackStackCommand,\n SetStackPolicyCommand,\n SetTypeConfigurationCommand,\n SetTypeDefaultVersionCommand,\n SignalResourceCommand,\n StartResourceScanCommand,\n StopStackSetOperationCommand,\n TestTypeCommand,\n UpdateGeneratedTemplateCommand,\n UpdateStackCommand,\n UpdateStackInstancesCommand,\n UpdateStackSetCommand,\n UpdateTerminationProtectionCommand,\n ValidateTemplateCommand,\n paginateDescribeAccountLimits,\n paginateDescribeStackEvents,\n paginateDescribeStackResourceDrifts,\n paginateDescribeStacks,\n paginateListChangeSets,\n paginateListExports,\n paginateListGeneratedTemplates,\n paginateListImports,\n paginateListResourceScanRelatedResources,\n paginateListResourceScanResources,\n paginateListResourceScans,\n paginateListStackInstances,\n paginateListStackRefactorActions,\n paginateListStackRefactors,\n paginateListStackResources,\n paginateListStackSetOperationResults,\n paginateListStackSetOperations,\n paginateListStackSets,\n paginateListStacks,\n paginateListTypeRegistrations,\n paginateListTypeVersions,\n paginateListTypes,\n waitForChangeSetCreateComplete,\n waitUntilChangeSetCreateComplete,\n waitForStackCreateComplete,\n waitUntilStackCreateComplete,\n waitForStackDeleteComplete,\n waitUntilStackDeleteComplete,\n waitForStackExists,\n waitUntilStackExists,\n waitForStackImportComplete,\n waitUntilStackImportComplete,\n waitForStackRefactorCreateComplete,\n waitUntilStackRefactorCreateComplete,\n waitForStackRefactorExecuteComplete,\n waitUntilStackRefactorExecuteComplete,\n waitForStackRollbackComplete,\n waitUntilStackRollbackComplete,\n waitForStackUpdateComplete,\n waitUntilStackUpdateComplete,\n waitForTypeRegistrationComplete,\n waitUntilTypeRegistrationComplete,\n AccountFilterType,\n AccountGateStatus,\n InvalidOperationException,\n OperationNotFoundException,\n ThirdPartyType,\n VersionBump,\n CFNRegistryException,\n TypeNotFoundException,\n AlreadyExistsException,\n AttributeChangeType,\n TypeConfigurationNotFoundException,\n CallAs,\n TokenAlreadyExistsException,\n Capability,\n Category,\n ChangeAction,\n ChangeSource,\n EvaluationType,\n ResourceAttribute,\n RequiresRecreation,\n PolicyAction,\n Replacement,\n ChangeType,\n HookFailureMode,\n HookInvocationPoint,\n HookTargetType,\n ChangeSetHooksStatus,\n ChangeSetNotFoundException,\n ChangeSetStatus,\n ExecutionStatus,\n ChangeSetType,\n OnStackFailure,\n InsufficientCapabilitiesException,\n LimitExceededException,\n ConcurrentResourcesLimitExceededException,\n GeneratedTemplateDeletionPolicy,\n GeneratedTemplateUpdateReplacePolicy,\n OnFailure,\n ConcurrencyMode,\n RegionConcurrencyType,\n OperationIdAlreadyExistsException,\n OperationInProgressException,\n StackSetNotFoundException,\n StaleRequestException,\n CreatedButModifiedException,\n PermissionModels,\n NameAlreadyExistsException,\n InvalidChangeSetStatusException,\n GeneratedTemplateNotFoundException,\n DeletionMode,\n StackSetNotEmptyException,\n RegistryType,\n GeneratedTemplateResourceStatus,\n WarningType,\n GeneratedTemplateStatus,\n OrganizationStatus,\n IdentityProvider,\n PublisherStatus,\n ResourceScanStatus,\n ResourceScanNotFoundException,\n StackDriftDetectionStatus,\n StackDriftStatus,\n DetailedStatus,\n HookStatus,\n ResourceStatus,\n StackInstanceDetailedStatus,\n StackInstanceStatus,\n StackInstanceNotFoundException,\n StackRefactorExecutionStatus,\n StackRefactorStatus,\n StackRefactorNotFoundException,\n StackResourceDriftStatus,\n DifferenceType,\n StackStatus,\n StackSetDriftDetectionStatus,\n StackSetDriftStatus,\n StackSetStatus,\n StackSetOperationAction,\n StackSetOperationStatus,\n DeprecatedStatus,\n ProvisioningType,\n TypeTestsStatus,\n Visibility,\n RegistrationStatus,\n TemplateFormat,\n TemplateStage,\n StackNotFoundException,\n HookResultNotFoundException,\n ListHookResultsTargetType,\n ResourceScanInProgressException,\n ScanType,\n StackInstanceFilterName,\n StackRefactorActionType,\n StackRefactorDetection,\n StackRefactorActionEntity,\n OperationResultFilterName,\n StackSetOperationResultStatus,\n InvalidStateTransitionException,\n OperationStatusCheckFailedException,\n OperationStatus,\n HandlerErrorCode,\n ResourceSignalStatus,\n ResourceScanLimitExceededException\n});\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getRuntimeConfig = void 0;\nconst tslib_1 = require(\"tslib\");\nconst package_json_1 = tslib_1.__importDefault(require(\"../package.json\"));\nconst core_1 = require(\"@aws-sdk/core\");\nconst credential_provider_node_1 = require(\"@aws-sdk/credential-provider-node\");\nconst util_user_agent_node_1 = require(\"@aws-sdk/util-user-agent-node\");\nconst config_resolver_1 = require(\"@smithy/config-resolver\");\nconst hash_node_1 = require(\"@smithy/hash-node\");\nconst middleware_retry_1 = require(\"@smithy/middleware-retry\");\nconst node_config_provider_1 = require(\"@smithy/node-config-provider\");\nconst node_http_handler_1 = require(\"@smithy/node-http-handler\");\nconst util_body_length_node_1 = require(\"@smithy/util-body-length-node\");\nconst util_retry_1 = require(\"@smithy/util-retry\");\nconst runtimeConfig_shared_1 = require(\"./runtimeConfig.shared\");\nconst smithy_client_1 = require(\"@smithy/smithy-client\");\nconst util_defaults_mode_node_1 = require(\"@smithy/util-defaults-mode-node\");\nconst smithy_client_2 = require(\"@smithy/smithy-client\");\nconst getRuntimeConfig = (config) => {\n (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);\n const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);\n const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);\n const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);\n (0, core_1.emitWarningIfUnsupportedVersion)(process.version);\n const loaderConfig = {\n profile: config?.profile,\n logger: clientSharedValues.logger,\n };\n return {\n ...clientSharedValues,\n ...config,\n runtime: \"node\",\n defaultsMode,\n authSchemePreference: config?.authSchemePreference ?? (0, node_config_provider_1.loadConfig)(core_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),\n bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,\n credentialDefaultProvider: config?.credentialDefaultProvider ?? credential_provider_node_1.defaultProvider,\n defaultUserAgentProvider: config?.defaultUserAgentProvider ??\n (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),\n maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),\n region: config?.region ??\n (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),\n requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),\n retryMode: config?.retryMode ??\n (0, node_config_provider_1.loadConfig)({\n ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,\n default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE,\n }, config),\n sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, \"sha256\"),\n streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,\n useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),\n };\n};\nexports.getRuntimeConfig = getRuntimeConfig;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getRuntimeConfig = void 0;\nconst core_1 = require(\"@aws-sdk/core\");\nconst smithy_client_1 = require(\"@smithy/smithy-client\");\nconst url_parser_1 = require(\"@smithy/url-parser\");\nconst util_base64_1 = require(\"@smithy/util-base64\");\nconst util_utf8_1 = require(\"@smithy/util-utf8\");\nconst httpAuthSchemeProvider_1 = require(\"./auth/httpAuthSchemeProvider\");\nconst endpointResolver_1 = require(\"./endpoint/endpointResolver\");\nconst getRuntimeConfig = (config) => {\n return {\n apiVersion: \"2010-05-15\",\n base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64,\n base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,\n disableHostPrefix: config?.disableHostPrefix ?? false,\n endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,\n extensions: config?.extensions ?? [],\n httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultCloudFormationHttpAuthSchemeProvider,\n httpAuthSchemes: config?.httpAuthSchemes ?? [\n {\n schemeId: \"aws.auth#sigv4\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"aws.auth#sigv4\"),\n signer: new core_1.AwsSdkSigV4Signer(),\n },\n ],\n logger: config?.logger ?? new smithy_client_1.NoOpLogger(),\n serviceId: config?.serviceId ?? \"CloudFormation\",\n urlParser: config?.urlParser ?? url_parser_1.parseUrl,\n utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,\n utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8,\n };\n};\nexports.getRuntimeConfig = getRuntimeConfig;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resolveHttpAuthSchemeConfig = exports.defaultCognitoIdentityHttpAuthSchemeProvider = exports.defaultCognitoIdentityHttpAuthSchemeParametersProvider = void 0;\nconst core_1 = require(\"@aws-sdk/core\");\nconst util_middleware_1 = require(\"@smithy/util-middleware\");\nconst defaultCognitoIdentityHttpAuthSchemeParametersProvider = async (config, context, input) => {\n return {\n operation: (0, util_middleware_1.getSmithyContext)(context).operation,\n region: (await (0, util_middleware_1.normalizeProvider)(config.region)()) ||\n (() => {\n throw new Error(\"expected `region` to be configured for `aws.auth#sigv4`\");\n })(),\n };\n};\nexports.defaultCognitoIdentityHttpAuthSchemeParametersProvider = defaultCognitoIdentityHttpAuthSchemeParametersProvider;\nfunction createAwsAuthSigv4HttpAuthOption(authParameters) {\n return {\n schemeId: \"aws.auth#sigv4\",\n signingProperties: {\n name: \"cognito-identity\",\n region: authParameters.region,\n },\n propertiesExtractor: (config, context) => ({\n signingProperties: {\n config,\n context,\n },\n }),\n };\n}\nfunction createSmithyApiNoAuthHttpAuthOption(authParameters) {\n return {\n schemeId: \"smithy.api#noAuth\",\n };\n}\nconst defaultCognitoIdentityHttpAuthSchemeProvider = (authParameters) => {\n const options = [];\n switch (authParameters.operation) {\n case \"GetCredentialsForIdentity\": {\n options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));\n break;\n }\n case \"GetId\": {\n options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));\n break;\n }\n case \"GetOpenIdToken\": {\n options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));\n break;\n }\n case \"UnlinkIdentity\": {\n options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));\n break;\n }\n default: {\n options.push(createAwsAuthSigv4HttpAuthOption(authParameters));\n }\n }\n return options;\n};\nexports.defaultCognitoIdentityHttpAuthSchemeProvider = defaultCognitoIdentityHttpAuthSchemeProvider;\nconst resolveHttpAuthSchemeConfig = (config) => {\n const config_0 = (0, core_1.resolveAwsSdkSigV4Config)(config);\n return Object.assign(config_0, {\n authSchemePreference: (0, util_middleware_1.normalizeProvider)(config.authSchemePreference ?? []),\n });\n};\nexports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.defaultEndpointResolver = void 0;\nconst util_endpoints_1 = require(\"@aws-sdk/util-endpoints\");\nconst util_endpoints_2 = require(\"@smithy/util-endpoints\");\nconst ruleset_1 = require(\"./ruleset\");\nconst cache = new util_endpoints_2.EndpointCache({\n size: 50,\n params: [\"Endpoint\", \"Region\", \"UseDualStack\", \"UseFIPS\"],\n});\nconst defaultEndpointResolver = (endpointParams, context = {}) => {\n return cache.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, {\n endpointParams: endpointParams,\n logger: context.logger,\n }));\n};\nexports.defaultEndpointResolver = defaultEndpointResolver;\nutil_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ruleSet = void 0;\nconst w = \"required\", x = \"fn\", y = \"argv\", z = \"ref\";\nconst a = true, b = \"isSet\", c = \"booleanEquals\", d = \"error\", e = \"endpoint\", f = \"tree\", g = \"PartitionResult\", h = \"getAttr\", i = \"stringEquals\", j = { [w]: false, \"type\": \"String\" }, k = { [w]: true, \"default\": false, \"type\": \"Boolean\" }, l = { [z]: \"Endpoint\" }, m = { [x]: c, [y]: [{ [z]: \"UseFIPS\" }, true] }, n = { [x]: c, [y]: [{ [z]: \"UseDualStack\" }, true] }, o = {}, p = { [z]: \"Region\" }, q = { [x]: h, [y]: [{ [z]: g }, \"supportsFIPS\"] }, r = { [z]: g }, s = { [x]: c, [y]: [true, { [x]: h, [y]: [r, \"supportsDualStack\"] }] }, t = [m], u = [n], v = [p];\nconst _data = { version: \"1.0\", parameters: { Region: j, UseDualStack: k, UseFIPS: k, Endpoint: j }, rules: [{ conditions: [{ [x]: b, [y]: [l] }], rules: [{ conditions: t, error: \"Invalid Configuration: FIPS and custom endpoint are not supported\", type: d }, { conditions: u, error: \"Invalid Configuration: Dualstack and custom endpoint are not supported\", type: d }, { endpoint: { url: l, properties: o, headers: o }, type: e }], type: f }, { conditions: [{ [x]: b, [y]: v }], rules: [{ conditions: [{ [x]: \"aws.partition\", [y]: v, assign: g }], rules: [{ conditions: [m, n], rules: [{ conditions: [{ [x]: c, [y]: [a, q] }, s], rules: [{ conditions: [{ [x]: i, [y]: [p, \"us-east-1\"] }], endpoint: { url: \"https://cognito-identity-fips.us-east-1.amazonaws.com\", properties: o, headers: o }, type: e }, { conditions: [{ [x]: i, [y]: [p, \"us-east-2\"] }], endpoint: { url: \"https://cognito-identity-fips.us-east-2.amazonaws.com\", properties: o, headers: o }, type: e }, { conditions: [{ [x]: i, [y]: [p, \"us-west-1\"] }], endpoint: { url: \"https://cognito-identity-fips.us-west-1.amazonaws.com\", properties: o, headers: o }, type: e }, { conditions: [{ [x]: i, [y]: [p, \"us-west-2\"] }], endpoint: { url: \"https://cognito-identity-fips.us-west-2.amazonaws.com\", properties: o, headers: o }, type: e }, { endpoint: { url: \"https://cognito-identity-fips.{Region}.{PartitionResult#dualStackDnsSuffix}\", properties: o, headers: o }, type: e }], type: f }, { error: \"FIPS and DualStack are enabled, but this partition does not support one or both\", type: d }], type: f }, { conditions: t, rules: [{ conditions: [{ [x]: c, [y]: [q, a] }], rules: [{ endpoint: { url: \"https://cognito-identity-fips.{Region}.{PartitionResult#dnsSuffix}\", properties: o, headers: o }, type: e }], type: f }, { error: \"FIPS is enabled but this partition does not support FIPS\", type: d }], type: f }, { conditions: u, rules: [{ conditions: [s], rules: [{ conditions: [{ [x]: i, [y]: [\"aws\", { [x]: h, [y]: [r, \"name\"] }] }], endpoint: { url: \"https://cognito-identity.{Region}.amazonaws.com\", properties: o, headers: o }, type: e }, { endpoint: { url: \"https://cognito-identity.{Region}.{PartitionResult#dualStackDnsSuffix}\", properties: o, headers: o }, type: e }], type: f }, { error: \"DualStack is enabled but this partition does not support DualStack\", type: d }], type: f }, { endpoint: { url: \"https://cognito-identity.{Region}.{PartitionResult#dnsSuffix}\", properties: o, headers: o }, type: e }], type: f }], type: f }, { error: \"Invalid Configuration: Missing Region\", type: d }] };\nexports.ruleSet = _data;\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar index_exports = {};\n__export(index_exports, {\n AmbiguousRoleResolutionType: () => AmbiguousRoleResolutionType,\n CognitoIdentity: () => CognitoIdentity,\n CognitoIdentityClient: () => CognitoIdentityClient,\n CognitoIdentityServiceException: () => CognitoIdentityServiceException,\n ConcurrentModificationException: () => ConcurrentModificationException,\n CreateIdentityPoolCommand: () => CreateIdentityPoolCommand,\n CredentialsFilterSensitiveLog: () => CredentialsFilterSensitiveLog,\n DeleteIdentitiesCommand: () => DeleteIdentitiesCommand,\n DeleteIdentityPoolCommand: () => DeleteIdentityPoolCommand,\n DescribeIdentityCommand: () => DescribeIdentityCommand,\n DescribeIdentityPoolCommand: () => DescribeIdentityPoolCommand,\n DeveloperUserAlreadyRegisteredException: () => DeveloperUserAlreadyRegisteredException,\n ErrorCode: () => ErrorCode,\n ExternalServiceException: () => ExternalServiceException,\n GetCredentialsForIdentityCommand: () => GetCredentialsForIdentityCommand,\n GetCredentialsForIdentityInputFilterSensitiveLog: () => GetCredentialsForIdentityInputFilterSensitiveLog,\n GetCredentialsForIdentityResponseFilterSensitiveLog: () => GetCredentialsForIdentityResponseFilterSensitiveLog,\n GetIdCommand: () => GetIdCommand,\n GetIdInputFilterSensitiveLog: () => GetIdInputFilterSensitiveLog,\n GetIdentityPoolRolesCommand: () => GetIdentityPoolRolesCommand,\n GetOpenIdTokenCommand: () => GetOpenIdTokenCommand,\n GetOpenIdTokenForDeveloperIdentityCommand: () => GetOpenIdTokenForDeveloperIdentityCommand,\n GetOpenIdTokenForDeveloperIdentityInputFilterSensitiveLog: () => GetOpenIdTokenForDeveloperIdentityInputFilterSensitiveLog,\n GetOpenIdTokenForDeveloperIdentityResponseFilterSensitiveLog: () => GetOpenIdTokenForDeveloperIdentityResponseFilterSensitiveLog,\n GetOpenIdTokenInputFilterSensitiveLog: () => GetOpenIdTokenInputFilterSensitiveLog,\n GetOpenIdTokenResponseFilterSensitiveLog: () => GetOpenIdTokenResponseFilterSensitiveLog,\n GetPrincipalTagAttributeMapCommand: () => GetPrincipalTagAttributeMapCommand,\n InternalErrorException: () => InternalErrorException,\n InvalidIdentityPoolConfigurationException: () => InvalidIdentityPoolConfigurationException,\n InvalidParameterException: () => InvalidParameterException,\n LimitExceededException: () => LimitExceededException,\n ListIdentitiesCommand: () => ListIdentitiesCommand,\n ListIdentityPoolsCommand: () => ListIdentityPoolsCommand,\n ListTagsForResourceCommand: () => ListTagsForResourceCommand,\n LookupDeveloperIdentityCommand: () => LookupDeveloperIdentityCommand,\n MappingRuleMatchType: () => MappingRuleMatchType,\n MergeDeveloperIdentitiesCommand: () => MergeDeveloperIdentitiesCommand,\n NotAuthorizedException: () => NotAuthorizedException,\n ResourceConflictException: () => ResourceConflictException,\n ResourceNotFoundException: () => ResourceNotFoundException,\n RoleMappingType: () => RoleMappingType,\n SetIdentityPoolRolesCommand: () => SetIdentityPoolRolesCommand,\n SetPrincipalTagAttributeMapCommand: () => SetPrincipalTagAttributeMapCommand,\n TagResourceCommand: () => TagResourceCommand,\n TooManyRequestsException: () => TooManyRequestsException,\n UnlinkDeveloperIdentityCommand: () => UnlinkDeveloperIdentityCommand,\n UnlinkIdentityCommand: () => UnlinkIdentityCommand,\n UnlinkIdentityInputFilterSensitiveLog: () => UnlinkIdentityInputFilterSensitiveLog,\n UntagResourceCommand: () => UntagResourceCommand,\n UpdateIdentityPoolCommand: () => UpdateIdentityPoolCommand,\n __Client: () => import_smithy_client.Client,\n paginateListIdentityPools: () => paginateListIdentityPools\n});\nmodule.exports = __toCommonJS(index_exports);\n\n// src/CognitoIdentityClient.ts\nvar import_middleware_host_header = require(\"@aws-sdk/middleware-host-header\");\nvar import_middleware_logger = require(\"@aws-sdk/middleware-logger\");\nvar import_middleware_recursion_detection = require(\"@aws-sdk/middleware-recursion-detection\");\nvar import_middleware_user_agent = require(\"@aws-sdk/middleware-user-agent\");\nvar import_config_resolver = require(\"@smithy/config-resolver\");\nvar import_core = require(\"@smithy/core\");\nvar import_middleware_content_length = require(\"@smithy/middleware-content-length\");\nvar import_middleware_endpoint = require(\"@smithy/middleware-endpoint\");\nvar import_middleware_retry = require(\"@smithy/middleware-retry\");\n\nvar import_httpAuthSchemeProvider = require(\"./auth/httpAuthSchemeProvider\");\n\n// src/endpoint/EndpointParameters.ts\nvar resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {\n return Object.assign(options, {\n useDualstackEndpoint: options.useDualstackEndpoint ?? false,\n useFipsEndpoint: options.useFipsEndpoint ?? false,\n defaultSigningName: \"cognito-identity\"\n });\n}, \"resolveClientEndpointParameters\");\nvar commonParams = {\n UseFIPS: { type: \"builtInParams\", name: \"useFipsEndpoint\" },\n Endpoint: { type: \"builtInParams\", name: \"endpoint\" },\n Region: { type: \"builtInParams\", name: \"region\" },\n UseDualStack: { type: \"builtInParams\", name: \"useDualstackEndpoint\" }\n};\n\n// src/CognitoIdentityClient.ts\nvar import_runtimeConfig = require(\"././runtimeConfig\");\n\n// src/runtimeExtensions.ts\nvar import_region_config_resolver = require(\"@aws-sdk/region-config-resolver\");\nvar import_protocol_http = require(\"@smithy/protocol-http\");\nvar import_smithy_client = require(\"@smithy/smithy-client\");\n\n// src/auth/httpAuthExtensionConfiguration.ts\nvar getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {\n const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;\n let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;\n let _credentials = runtimeConfig.credentials;\n return {\n setHttpAuthScheme(httpAuthScheme) {\n const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);\n if (index === -1) {\n _httpAuthSchemes.push(httpAuthScheme);\n } else {\n _httpAuthSchemes.splice(index, 1, httpAuthScheme);\n }\n },\n httpAuthSchemes() {\n return _httpAuthSchemes;\n },\n setHttpAuthSchemeProvider(httpAuthSchemeProvider) {\n _httpAuthSchemeProvider = httpAuthSchemeProvider;\n },\n httpAuthSchemeProvider() {\n return _httpAuthSchemeProvider;\n },\n setCredentials(credentials) {\n _credentials = credentials;\n },\n credentials() {\n return _credentials;\n }\n };\n}, \"getHttpAuthExtensionConfiguration\");\nvar resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => {\n return {\n httpAuthSchemes: config.httpAuthSchemes(),\n httpAuthSchemeProvider: config.httpAuthSchemeProvider(),\n credentials: config.credentials()\n };\n}, \"resolveHttpAuthRuntimeConfig\");\n\n// src/runtimeExtensions.ts\nvar resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {\n const extensionConfiguration = Object.assign(\n (0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig),\n (0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig),\n (0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig),\n getHttpAuthExtensionConfiguration(runtimeConfig)\n );\n extensions.forEach((extension) => extension.configure(extensionConfiguration));\n return Object.assign(\n runtimeConfig,\n (0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),\n (0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),\n (0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),\n resolveHttpAuthRuntimeConfig(extensionConfiguration)\n );\n}, \"resolveRuntimeExtensions\");\n\n// src/CognitoIdentityClient.ts\nvar CognitoIdentityClient = class extends import_smithy_client.Client {\n static {\n __name(this, \"CognitoIdentityClient\");\n }\n /**\n * The resolved configuration of CognitoIdentityClient class. This is resolved and normalized from the {@link CognitoIdentityClientConfig | constructor configuration interface}.\n */\n config;\n constructor(...[configuration]) {\n const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});\n super(_config_0);\n this.initConfig = _config_0;\n const _config_1 = resolveClientEndpointParameters(_config_0);\n const _config_2 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_1);\n const _config_3 = (0, import_middleware_retry.resolveRetryConfig)(_config_2);\n const _config_4 = (0, import_config_resolver.resolveRegionConfig)(_config_3);\n const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);\n const _config_6 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_5);\n const _config_7 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_6);\n const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);\n this.config = _config_8;\n this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));\n this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));\n this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));\n this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));\n this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));\n this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));\n this.middlewareStack.use(\n (0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {\n httpAuthSchemeParametersProvider: import_httpAuthSchemeProvider.defaultCognitoIdentityHttpAuthSchemeParametersProvider,\n identityProviderConfigProvider: /* @__PURE__ */ __name(async (config) => new import_core.DefaultIdentityProviderConfig({\n \"aws.auth#sigv4\": config.credentials\n }), \"identityProviderConfigProvider\")\n })\n );\n this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config));\n }\n /**\n * Destroy underlying resources, like sockets. It's usually not necessary to do this.\n * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.\n * Otherwise, sockets might stay open for quite a long time before the server terminates them.\n */\n destroy() {\n super.destroy();\n }\n};\n\n// src/CognitoIdentity.ts\n\n\n// src/commands/CreateIdentityPoolCommand.ts\n\nvar import_middleware_serde = require(\"@smithy/middleware-serde\");\n\n\n// src/protocols/Aws_json1_1.ts\nvar import_core2 = require(\"@aws-sdk/core\");\n\n\n\n// src/models/CognitoIdentityServiceException.ts\n\nvar CognitoIdentityServiceException = class _CognitoIdentityServiceException extends import_smithy_client.ServiceException {\n static {\n __name(this, \"CognitoIdentityServiceException\");\n }\n /**\n * @internal\n */\n constructor(options) {\n super(options);\n Object.setPrototypeOf(this, _CognitoIdentityServiceException.prototype);\n }\n};\n\n// src/models/models_0.ts\n\nvar AmbiguousRoleResolutionType = {\n AUTHENTICATED_ROLE: \"AuthenticatedRole\",\n DENY: \"Deny\"\n};\nvar InternalErrorException = class _InternalErrorException extends CognitoIdentityServiceException {\n static {\n __name(this, \"InternalErrorException\");\n }\n name = \"InternalErrorException\";\n $fault = \"server\";\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"InternalErrorException\",\n $fault: \"server\",\n ...opts\n });\n Object.setPrototypeOf(this, _InternalErrorException.prototype);\n }\n};\nvar InvalidParameterException = class _InvalidParameterException extends CognitoIdentityServiceException {\n static {\n __name(this, \"InvalidParameterException\");\n }\n name = \"InvalidParameterException\";\n $fault = \"client\";\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"InvalidParameterException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _InvalidParameterException.prototype);\n }\n};\nvar LimitExceededException = class _LimitExceededException extends CognitoIdentityServiceException {\n static {\n __name(this, \"LimitExceededException\");\n }\n name = \"LimitExceededException\";\n $fault = \"client\";\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"LimitExceededException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _LimitExceededException.prototype);\n }\n};\nvar NotAuthorizedException = class _NotAuthorizedException extends CognitoIdentityServiceException {\n static {\n __name(this, \"NotAuthorizedException\");\n }\n name = \"NotAuthorizedException\";\n $fault = \"client\";\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"NotAuthorizedException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _NotAuthorizedException.prototype);\n }\n};\nvar ResourceConflictException = class _ResourceConflictException extends CognitoIdentityServiceException {\n static {\n __name(this, \"ResourceConflictException\");\n }\n name = \"ResourceConflictException\";\n $fault = \"client\";\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"ResourceConflictException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _ResourceConflictException.prototype);\n }\n};\nvar TooManyRequestsException = class _TooManyRequestsException extends CognitoIdentityServiceException {\n static {\n __name(this, \"TooManyRequestsException\");\n }\n name = \"TooManyRequestsException\";\n $fault = \"client\";\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"TooManyRequestsException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _TooManyRequestsException.prototype);\n }\n};\nvar ErrorCode = {\n ACCESS_DENIED: \"AccessDenied\",\n INTERNAL_SERVER_ERROR: \"InternalServerError\"\n};\nvar ResourceNotFoundException = class _ResourceNotFoundException extends CognitoIdentityServiceException {\n static {\n __name(this, \"ResourceNotFoundException\");\n }\n name = \"ResourceNotFoundException\";\n $fault = \"client\";\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"ResourceNotFoundException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _ResourceNotFoundException.prototype);\n }\n};\nvar ExternalServiceException = class _ExternalServiceException extends CognitoIdentityServiceException {\n static {\n __name(this, \"ExternalServiceException\");\n }\n name = \"ExternalServiceException\";\n $fault = \"client\";\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"ExternalServiceException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _ExternalServiceException.prototype);\n }\n};\nvar InvalidIdentityPoolConfigurationException = class _InvalidIdentityPoolConfigurationException extends CognitoIdentityServiceException {\n static {\n __name(this, \"InvalidIdentityPoolConfigurationException\");\n }\n name = \"InvalidIdentityPoolConfigurationException\";\n $fault = \"client\";\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"InvalidIdentityPoolConfigurationException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _InvalidIdentityPoolConfigurationException.prototype);\n }\n};\nvar MappingRuleMatchType = {\n CONTAINS: \"Contains\",\n EQUALS: \"Equals\",\n NOT_EQUAL: \"NotEqual\",\n STARTS_WITH: \"StartsWith\"\n};\nvar RoleMappingType = {\n RULES: \"Rules\",\n TOKEN: \"Token\"\n};\nvar DeveloperUserAlreadyRegisteredException = class _DeveloperUserAlreadyRegisteredException extends CognitoIdentityServiceException {\n static {\n __name(this, \"DeveloperUserAlreadyRegisteredException\");\n }\n name = \"DeveloperUserAlreadyRegisteredException\";\n $fault = \"client\";\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"DeveloperUserAlreadyRegisteredException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _DeveloperUserAlreadyRegisteredException.prototype);\n }\n};\nvar ConcurrentModificationException = class _ConcurrentModificationException extends CognitoIdentityServiceException {\n static {\n __name(this, \"ConcurrentModificationException\");\n }\n name = \"ConcurrentModificationException\";\n $fault = \"client\";\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"ConcurrentModificationException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _ConcurrentModificationException.prototype);\n }\n};\nvar GetCredentialsForIdentityInputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.Logins && { Logins: import_smithy_client.SENSITIVE_STRING }\n}), \"GetCredentialsForIdentityInputFilterSensitiveLog\");\nvar CredentialsFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.SecretKey && { SecretKey: import_smithy_client.SENSITIVE_STRING }\n}), \"CredentialsFilterSensitiveLog\");\nvar GetCredentialsForIdentityResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) }\n}), \"GetCredentialsForIdentityResponseFilterSensitiveLog\");\nvar GetIdInputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.Logins && { Logins: import_smithy_client.SENSITIVE_STRING }\n}), \"GetIdInputFilterSensitiveLog\");\nvar GetOpenIdTokenInputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.Logins && { Logins: import_smithy_client.SENSITIVE_STRING }\n}), \"GetOpenIdTokenInputFilterSensitiveLog\");\nvar GetOpenIdTokenResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.Token && { Token: import_smithy_client.SENSITIVE_STRING }\n}), \"GetOpenIdTokenResponseFilterSensitiveLog\");\nvar GetOpenIdTokenForDeveloperIdentityInputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.Logins && { Logins: import_smithy_client.SENSITIVE_STRING }\n}), \"GetOpenIdTokenForDeveloperIdentityInputFilterSensitiveLog\");\nvar GetOpenIdTokenForDeveloperIdentityResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.Token && { Token: import_smithy_client.SENSITIVE_STRING }\n}), \"GetOpenIdTokenForDeveloperIdentityResponseFilterSensitiveLog\");\nvar UnlinkIdentityInputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.Logins && { Logins: import_smithy_client.SENSITIVE_STRING }\n}), \"UnlinkIdentityInputFilterSensitiveLog\");\n\n// src/protocols/Aws_json1_1.ts\nvar se_CreateIdentityPoolCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = sharedHeaders(\"CreateIdentityPool\");\n let body;\n body = JSON.stringify((0, import_smithy_client._json)(input));\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_CreateIdentityPoolCommand\");\nvar se_DeleteIdentitiesCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = sharedHeaders(\"DeleteIdentities\");\n let body;\n body = JSON.stringify((0, import_smithy_client._json)(input));\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DeleteIdentitiesCommand\");\nvar se_DeleteIdentityPoolCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = sharedHeaders(\"DeleteIdentityPool\");\n let body;\n body = JSON.stringify((0, import_smithy_client._json)(input));\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DeleteIdentityPoolCommand\");\nvar se_DescribeIdentityCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = sharedHeaders(\"DescribeIdentity\");\n let body;\n body = JSON.stringify((0, import_smithy_client._json)(input));\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DescribeIdentityCommand\");\nvar se_DescribeIdentityPoolCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = sharedHeaders(\"DescribeIdentityPool\");\n let body;\n body = JSON.stringify((0, import_smithy_client._json)(input));\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DescribeIdentityPoolCommand\");\nvar se_GetCredentialsForIdentityCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = sharedHeaders(\"GetCredentialsForIdentity\");\n let body;\n body = JSON.stringify((0, import_smithy_client._json)(input));\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_GetCredentialsForIdentityCommand\");\nvar se_GetIdCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = sharedHeaders(\"GetId\");\n let body;\n body = JSON.stringify((0, import_smithy_client._json)(input));\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_GetIdCommand\");\nvar se_GetIdentityPoolRolesCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = sharedHeaders(\"GetIdentityPoolRoles\");\n let body;\n body = JSON.stringify((0, import_smithy_client._json)(input));\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_GetIdentityPoolRolesCommand\");\nvar se_GetOpenIdTokenCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = sharedHeaders(\"GetOpenIdToken\");\n let body;\n body = JSON.stringify((0, import_smithy_client._json)(input));\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_GetOpenIdTokenCommand\");\nvar se_GetOpenIdTokenForDeveloperIdentityCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = sharedHeaders(\"GetOpenIdTokenForDeveloperIdentity\");\n let body;\n body = JSON.stringify((0, import_smithy_client._json)(input));\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_GetOpenIdTokenForDeveloperIdentityCommand\");\nvar se_GetPrincipalTagAttributeMapCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = sharedHeaders(\"GetPrincipalTagAttributeMap\");\n let body;\n body = JSON.stringify((0, import_smithy_client._json)(input));\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_GetPrincipalTagAttributeMapCommand\");\nvar se_ListIdentitiesCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = sharedHeaders(\"ListIdentities\");\n let body;\n body = JSON.stringify((0, import_smithy_client._json)(input));\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_ListIdentitiesCommand\");\nvar se_ListIdentityPoolsCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = sharedHeaders(\"ListIdentityPools\");\n let body;\n body = JSON.stringify((0, import_smithy_client._json)(input));\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_ListIdentityPoolsCommand\");\nvar se_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = sharedHeaders(\"ListTagsForResource\");\n let body;\n body = JSON.stringify((0, import_smithy_client._json)(input));\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_ListTagsForResourceCommand\");\nvar se_LookupDeveloperIdentityCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = sharedHeaders(\"LookupDeveloperIdentity\");\n let body;\n body = JSON.stringify((0, import_smithy_client._json)(input));\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_LookupDeveloperIdentityCommand\");\nvar se_MergeDeveloperIdentitiesCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = sharedHeaders(\"MergeDeveloperIdentities\");\n let body;\n body = JSON.stringify((0, import_smithy_client._json)(input));\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_MergeDeveloperIdentitiesCommand\");\nvar se_SetIdentityPoolRolesCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = sharedHeaders(\"SetIdentityPoolRoles\");\n let body;\n body = JSON.stringify((0, import_smithy_client._json)(input));\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_SetIdentityPoolRolesCommand\");\nvar se_SetPrincipalTagAttributeMapCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = sharedHeaders(\"SetPrincipalTagAttributeMap\");\n let body;\n body = JSON.stringify((0, import_smithy_client._json)(input));\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_SetPrincipalTagAttributeMapCommand\");\nvar se_TagResourceCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = sharedHeaders(\"TagResource\");\n let body;\n body = JSON.stringify((0, import_smithy_client._json)(input));\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_TagResourceCommand\");\nvar se_UnlinkDeveloperIdentityCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = sharedHeaders(\"UnlinkDeveloperIdentity\");\n let body;\n body = JSON.stringify((0, import_smithy_client._json)(input));\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_UnlinkDeveloperIdentityCommand\");\nvar se_UnlinkIdentityCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = sharedHeaders(\"UnlinkIdentity\");\n let body;\n body = JSON.stringify((0, import_smithy_client._json)(input));\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_UnlinkIdentityCommand\");\nvar se_UntagResourceCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = sharedHeaders(\"UntagResource\");\n let body;\n body = JSON.stringify((0, import_smithy_client._json)(input));\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_UntagResourceCommand\");\nvar se_UpdateIdentityPoolCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = sharedHeaders(\"UpdateIdentityPool\");\n let body;\n body = JSON.stringify((0, import_smithy_client._json)(input));\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_UpdateIdentityPoolCommand\");\nvar de_CreateIdentityPoolCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseJsonBody)(output.body, context);\n let contents = {};\n contents = (0, import_smithy_client._json)(data);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_CreateIdentityPoolCommand\");\nvar de_DeleteIdentitiesCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseJsonBody)(output.body, context);\n let contents = {};\n contents = (0, import_smithy_client._json)(data);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_DeleteIdentitiesCommand\");\nvar de_DeleteIdentityPoolCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n await (0, import_smithy_client.collectBody)(output.body, context);\n const response = {\n $metadata: deserializeMetadata(output)\n };\n return response;\n}, \"de_DeleteIdentityPoolCommand\");\nvar de_DescribeIdentityCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseJsonBody)(output.body, context);\n let contents = {};\n contents = de_IdentityDescription(data, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_DescribeIdentityCommand\");\nvar de_DescribeIdentityPoolCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseJsonBody)(output.body, context);\n let contents = {};\n contents = (0, import_smithy_client._json)(data);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_DescribeIdentityPoolCommand\");\nvar de_GetCredentialsForIdentityCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseJsonBody)(output.body, context);\n let contents = {};\n contents = de_GetCredentialsForIdentityResponse(data, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_GetCredentialsForIdentityCommand\");\nvar de_GetIdCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseJsonBody)(output.body, context);\n let contents = {};\n contents = (0, import_smithy_client._json)(data);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_GetIdCommand\");\nvar de_GetIdentityPoolRolesCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseJsonBody)(output.body, context);\n let contents = {};\n contents = (0, import_smithy_client._json)(data);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_GetIdentityPoolRolesCommand\");\nvar de_GetOpenIdTokenCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseJsonBody)(output.body, context);\n let contents = {};\n contents = (0, import_smithy_client._json)(data);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_GetOpenIdTokenCommand\");\nvar de_GetOpenIdTokenForDeveloperIdentityCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseJsonBody)(output.body, context);\n let contents = {};\n contents = (0, import_smithy_client._json)(data);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_GetOpenIdTokenForDeveloperIdentityCommand\");\nvar de_GetPrincipalTagAttributeMapCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseJsonBody)(output.body, context);\n let contents = {};\n contents = (0, import_smithy_client._json)(data);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_GetPrincipalTagAttributeMapCommand\");\nvar de_ListIdentitiesCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseJsonBody)(output.body, context);\n let contents = {};\n contents = de_ListIdentitiesResponse(data, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_ListIdentitiesCommand\");\nvar de_ListIdentityPoolsCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseJsonBody)(output.body, context);\n let contents = {};\n contents = (0, import_smithy_client._json)(data);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_ListIdentityPoolsCommand\");\nvar de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseJsonBody)(output.body, context);\n let contents = {};\n contents = (0, import_smithy_client._json)(data);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_ListTagsForResourceCommand\");\nvar de_LookupDeveloperIdentityCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseJsonBody)(output.body, context);\n let contents = {};\n contents = (0, import_smithy_client._json)(data);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_LookupDeveloperIdentityCommand\");\nvar de_MergeDeveloperIdentitiesCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseJsonBody)(output.body, context);\n let contents = {};\n contents = (0, import_smithy_client._json)(data);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_MergeDeveloperIdentitiesCommand\");\nvar de_SetIdentityPoolRolesCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n await (0, import_smithy_client.collectBody)(output.body, context);\n const response = {\n $metadata: deserializeMetadata(output)\n };\n return response;\n}, \"de_SetIdentityPoolRolesCommand\");\nvar de_SetPrincipalTagAttributeMapCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseJsonBody)(output.body, context);\n let contents = {};\n contents = (0, import_smithy_client._json)(data);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_SetPrincipalTagAttributeMapCommand\");\nvar de_TagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseJsonBody)(output.body, context);\n let contents = {};\n contents = (0, import_smithy_client._json)(data);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_TagResourceCommand\");\nvar de_UnlinkDeveloperIdentityCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n await (0, import_smithy_client.collectBody)(output.body, context);\n const response = {\n $metadata: deserializeMetadata(output)\n };\n return response;\n}, \"de_UnlinkDeveloperIdentityCommand\");\nvar de_UnlinkIdentityCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n await (0, import_smithy_client.collectBody)(output.body, context);\n const response = {\n $metadata: deserializeMetadata(output)\n };\n return response;\n}, \"de_UnlinkIdentityCommand\");\nvar de_UntagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseJsonBody)(output.body, context);\n let contents = {};\n contents = (0, import_smithy_client._json)(data);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_UntagResourceCommand\");\nvar de_UpdateIdentityPoolCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseJsonBody)(output.body, context);\n let contents = {};\n contents = (0, import_smithy_client._json)(data);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_UpdateIdentityPoolCommand\");\nvar de_CommandError = /* @__PURE__ */ __name(async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await (0, import_core2.parseJsonErrorBody)(output.body, context)\n };\n const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);\n switch (errorCode) {\n case \"InternalErrorException\":\n case \"com.amazonaws.cognitoidentity#InternalErrorException\":\n throw await de_InternalErrorExceptionRes(parsedOutput, context);\n case \"InvalidParameterException\":\n case \"com.amazonaws.cognitoidentity#InvalidParameterException\":\n throw await de_InvalidParameterExceptionRes(parsedOutput, context);\n case \"LimitExceededException\":\n case \"com.amazonaws.cognitoidentity#LimitExceededException\":\n throw await de_LimitExceededExceptionRes(parsedOutput, context);\n case \"NotAuthorizedException\":\n case \"com.amazonaws.cognitoidentity#NotAuthorizedException\":\n throw await de_NotAuthorizedExceptionRes(parsedOutput, context);\n case \"ResourceConflictException\":\n case \"com.amazonaws.cognitoidentity#ResourceConflictException\":\n throw await de_ResourceConflictExceptionRes(parsedOutput, context);\n case \"TooManyRequestsException\":\n case \"com.amazonaws.cognitoidentity#TooManyRequestsException\":\n throw await de_TooManyRequestsExceptionRes(parsedOutput, context);\n case \"ResourceNotFoundException\":\n case \"com.amazonaws.cognitoidentity#ResourceNotFoundException\":\n throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);\n case \"ExternalServiceException\":\n case \"com.amazonaws.cognitoidentity#ExternalServiceException\":\n throw await de_ExternalServiceExceptionRes(parsedOutput, context);\n case \"InvalidIdentityPoolConfigurationException\":\n case \"com.amazonaws.cognitoidentity#InvalidIdentityPoolConfigurationException\":\n throw await de_InvalidIdentityPoolConfigurationExceptionRes(parsedOutput, context);\n case \"DeveloperUserAlreadyRegisteredException\":\n case \"com.amazonaws.cognitoidentity#DeveloperUserAlreadyRegisteredException\":\n throw await de_DeveloperUserAlreadyRegisteredExceptionRes(parsedOutput, context);\n case \"ConcurrentModificationException\":\n case \"com.amazonaws.cognitoidentity#ConcurrentModificationException\":\n throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n return throwDefaultError({\n output,\n parsedBody,\n errorCode\n });\n }\n}, \"de_CommandError\");\nvar de_ConcurrentModificationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = (0, import_smithy_client._json)(body);\n const exception = new ConcurrentModificationException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_ConcurrentModificationExceptionRes\");\nvar de_DeveloperUserAlreadyRegisteredExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = (0, import_smithy_client._json)(body);\n const exception = new DeveloperUserAlreadyRegisteredException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_DeveloperUserAlreadyRegisteredExceptionRes\");\nvar de_ExternalServiceExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = (0, import_smithy_client._json)(body);\n const exception = new ExternalServiceException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_ExternalServiceExceptionRes\");\nvar de_InternalErrorExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = (0, import_smithy_client._json)(body);\n const exception = new InternalErrorException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_InternalErrorExceptionRes\");\nvar de_InvalidIdentityPoolConfigurationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = (0, import_smithy_client._json)(body);\n const exception = new InvalidIdentityPoolConfigurationException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_InvalidIdentityPoolConfigurationExceptionRes\");\nvar de_InvalidParameterExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = (0, import_smithy_client._json)(body);\n const exception = new InvalidParameterException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_InvalidParameterExceptionRes\");\nvar de_LimitExceededExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = (0, import_smithy_client._json)(body);\n const exception = new LimitExceededException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_LimitExceededExceptionRes\");\nvar de_NotAuthorizedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = (0, import_smithy_client._json)(body);\n const exception = new NotAuthorizedException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_NotAuthorizedExceptionRes\");\nvar de_ResourceConflictExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = (0, import_smithy_client._json)(body);\n const exception = new ResourceConflictException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_ResourceConflictExceptionRes\");\nvar de_ResourceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = (0, import_smithy_client._json)(body);\n const exception = new ResourceNotFoundException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_ResourceNotFoundExceptionRes\");\nvar de_TooManyRequestsExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = (0, import_smithy_client._json)(body);\n const exception = new TooManyRequestsException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_TooManyRequestsExceptionRes\");\nvar de_Credentials = /* @__PURE__ */ __name((output, context) => {\n return (0, import_smithy_client.take)(output, {\n AccessKeyId: import_smithy_client.expectString,\n Expiration: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), \"Expiration\"),\n SecretKey: import_smithy_client.expectString,\n SessionToken: import_smithy_client.expectString\n });\n}, \"de_Credentials\");\nvar de_GetCredentialsForIdentityResponse = /* @__PURE__ */ __name((output, context) => {\n return (0, import_smithy_client.take)(output, {\n Credentials: /* @__PURE__ */ __name((_) => de_Credentials(_, context), \"Credentials\"),\n IdentityId: import_smithy_client.expectString\n });\n}, \"de_GetCredentialsForIdentityResponse\");\nvar de_IdentitiesList = /* @__PURE__ */ __name((output, context) => {\n const retVal = (output || []).filter((e) => e != null).map((entry) => {\n return de_IdentityDescription(entry, context);\n });\n return retVal;\n}, \"de_IdentitiesList\");\nvar de_IdentityDescription = /* @__PURE__ */ __name((output, context) => {\n return (0, import_smithy_client.take)(output, {\n CreationDate: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), \"CreationDate\"),\n IdentityId: import_smithy_client.expectString,\n LastModifiedDate: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), \"LastModifiedDate\"),\n Logins: import_smithy_client._json\n });\n}, \"de_IdentityDescription\");\nvar de_ListIdentitiesResponse = /* @__PURE__ */ __name((output, context) => {\n return (0, import_smithy_client.take)(output, {\n Identities: /* @__PURE__ */ __name((_) => de_IdentitiesList(_, context), \"Identities\"),\n IdentityPoolId: import_smithy_client.expectString,\n NextToken: import_smithy_client.expectString\n });\n}, \"de_ListIdentitiesResponse\");\nvar deserializeMetadata = /* @__PURE__ */ __name((output) => ({\n httpStatusCode: output.statusCode,\n requestId: output.headers[\"x-amzn-requestid\"] ?? output.headers[\"x-amzn-request-id\"] ?? output.headers[\"x-amz-request-id\"],\n extendedRequestId: output.headers[\"x-amz-id-2\"],\n cfId: output.headers[\"x-amz-cf-id\"]\n}), \"deserializeMetadata\");\nvar throwDefaultError = (0, import_smithy_client.withBaseException)(CognitoIdentityServiceException);\nvar buildHttpRpcRequest = /* @__PURE__ */ __name(async (context, headers, path, resolvedHostname, body) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const contents = {\n protocol,\n hostname,\n port,\n method: \"POST\",\n path: basePath.endsWith(\"/\") ? basePath.slice(0, -1) + path : basePath + path,\n headers\n };\n if (resolvedHostname !== void 0) {\n contents.hostname = resolvedHostname;\n }\n if (body !== void 0) {\n contents.body = body;\n }\n return new import_protocol_http.HttpRequest(contents);\n}, \"buildHttpRpcRequest\");\nfunction sharedHeaders(operation) {\n return {\n \"content-type\": \"application/x-amz-json-1.1\",\n \"x-amz-target\": `AWSCognitoIdentityService.${operation}`\n };\n}\n__name(sharedHeaders, \"sharedHeaders\");\n\n// src/commands/CreateIdentityPoolCommand.ts\nvar CreateIdentityPoolCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSCognitoIdentityService\", \"CreateIdentityPool\", {}).n(\"CognitoIdentityClient\", \"CreateIdentityPoolCommand\").f(void 0, void 0).ser(se_CreateIdentityPoolCommand).de(de_CreateIdentityPoolCommand).build() {\n static {\n __name(this, \"CreateIdentityPoolCommand\");\n }\n};\n\n// src/commands/DeleteIdentitiesCommand.ts\n\n\n\nvar DeleteIdentitiesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSCognitoIdentityService\", \"DeleteIdentities\", {}).n(\"CognitoIdentityClient\", \"DeleteIdentitiesCommand\").f(void 0, void 0).ser(se_DeleteIdentitiesCommand).de(de_DeleteIdentitiesCommand).build() {\n static {\n __name(this, \"DeleteIdentitiesCommand\");\n }\n};\n\n// src/commands/DeleteIdentityPoolCommand.ts\n\n\n\nvar DeleteIdentityPoolCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSCognitoIdentityService\", \"DeleteIdentityPool\", {}).n(\"CognitoIdentityClient\", \"DeleteIdentityPoolCommand\").f(void 0, void 0).ser(se_DeleteIdentityPoolCommand).de(de_DeleteIdentityPoolCommand).build() {\n static {\n __name(this, \"DeleteIdentityPoolCommand\");\n }\n};\n\n// src/commands/DescribeIdentityCommand.ts\n\n\n\nvar DescribeIdentityCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSCognitoIdentityService\", \"DescribeIdentity\", {}).n(\"CognitoIdentityClient\", \"DescribeIdentityCommand\").f(void 0, void 0).ser(se_DescribeIdentityCommand).de(de_DescribeIdentityCommand).build() {\n static {\n __name(this, \"DescribeIdentityCommand\");\n }\n};\n\n// src/commands/DescribeIdentityPoolCommand.ts\n\n\n\nvar DescribeIdentityPoolCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSCognitoIdentityService\", \"DescribeIdentityPool\", {}).n(\"CognitoIdentityClient\", \"DescribeIdentityPoolCommand\").f(void 0, void 0).ser(se_DescribeIdentityPoolCommand).de(de_DescribeIdentityPoolCommand).build() {\n static {\n __name(this, \"DescribeIdentityPoolCommand\");\n }\n};\n\n// src/commands/GetCredentialsForIdentityCommand.ts\n\n\n\nvar GetCredentialsForIdentityCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSCognitoIdentityService\", \"GetCredentialsForIdentity\", {}).n(\"CognitoIdentityClient\", \"GetCredentialsForIdentityCommand\").f(GetCredentialsForIdentityInputFilterSensitiveLog, GetCredentialsForIdentityResponseFilterSensitiveLog).ser(se_GetCredentialsForIdentityCommand).de(de_GetCredentialsForIdentityCommand).build() {\n static {\n __name(this, \"GetCredentialsForIdentityCommand\");\n }\n};\n\n// src/commands/GetIdCommand.ts\n\n\n\nvar GetIdCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSCognitoIdentityService\", \"GetId\", {}).n(\"CognitoIdentityClient\", \"GetIdCommand\").f(GetIdInputFilterSensitiveLog, void 0).ser(se_GetIdCommand).de(de_GetIdCommand).build() {\n static {\n __name(this, \"GetIdCommand\");\n }\n};\n\n// src/commands/GetIdentityPoolRolesCommand.ts\n\n\n\nvar GetIdentityPoolRolesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSCognitoIdentityService\", \"GetIdentityPoolRoles\", {}).n(\"CognitoIdentityClient\", \"GetIdentityPoolRolesCommand\").f(void 0, void 0).ser(se_GetIdentityPoolRolesCommand).de(de_GetIdentityPoolRolesCommand).build() {\n static {\n __name(this, \"GetIdentityPoolRolesCommand\");\n }\n};\n\n// src/commands/GetOpenIdTokenCommand.ts\n\n\n\nvar GetOpenIdTokenCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSCognitoIdentityService\", \"GetOpenIdToken\", {}).n(\"CognitoIdentityClient\", \"GetOpenIdTokenCommand\").f(GetOpenIdTokenInputFilterSensitiveLog, GetOpenIdTokenResponseFilterSensitiveLog).ser(se_GetOpenIdTokenCommand).de(de_GetOpenIdTokenCommand).build() {\n static {\n __name(this, \"GetOpenIdTokenCommand\");\n }\n};\n\n// src/commands/GetOpenIdTokenForDeveloperIdentityCommand.ts\n\n\n\nvar GetOpenIdTokenForDeveloperIdentityCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSCognitoIdentityService\", \"GetOpenIdTokenForDeveloperIdentity\", {}).n(\"CognitoIdentityClient\", \"GetOpenIdTokenForDeveloperIdentityCommand\").f(\n GetOpenIdTokenForDeveloperIdentityInputFilterSensitiveLog,\n GetOpenIdTokenForDeveloperIdentityResponseFilterSensitiveLog\n).ser(se_GetOpenIdTokenForDeveloperIdentityCommand).de(de_GetOpenIdTokenForDeveloperIdentityCommand).build() {\n static {\n __name(this, \"GetOpenIdTokenForDeveloperIdentityCommand\");\n }\n};\n\n// src/commands/GetPrincipalTagAttributeMapCommand.ts\n\n\n\nvar GetPrincipalTagAttributeMapCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSCognitoIdentityService\", \"GetPrincipalTagAttributeMap\", {}).n(\"CognitoIdentityClient\", \"GetPrincipalTagAttributeMapCommand\").f(void 0, void 0).ser(se_GetPrincipalTagAttributeMapCommand).de(de_GetPrincipalTagAttributeMapCommand).build() {\n static {\n __name(this, \"GetPrincipalTagAttributeMapCommand\");\n }\n};\n\n// src/commands/ListIdentitiesCommand.ts\n\n\n\nvar ListIdentitiesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSCognitoIdentityService\", \"ListIdentities\", {}).n(\"CognitoIdentityClient\", \"ListIdentitiesCommand\").f(void 0, void 0).ser(se_ListIdentitiesCommand).de(de_ListIdentitiesCommand).build() {\n static {\n __name(this, \"ListIdentitiesCommand\");\n }\n};\n\n// src/commands/ListIdentityPoolsCommand.ts\n\n\n\nvar ListIdentityPoolsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSCognitoIdentityService\", \"ListIdentityPools\", {}).n(\"CognitoIdentityClient\", \"ListIdentityPoolsCommand\").f(void 0, void 0).ser(se_ListIdentityPoolsCommand).de(de_ListIdentityPoolsCommand).build() {\n static {\n __name(this, \"ListIdentityPoolsCommand\");\n }\n};\n\n// src/commands/ListTagsForResourceCommand.ts\n\n\n\nvar ListTagsForResourceCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSCognitoIdentityService\", \"ListTagsForResource\", {}).n(\"CognitoIdentityClient\", \"ListTagsForResourceCommand\").f(void 0, void 0).ser(se_ListTagsForResourceCommand).de(de_ListTagsForResourceCommand).build() {\n static {\n __name(this, \"ListTagsForResourceCommand\");\n }\n};\n\n// src/commands/LookupDeveloperIdentityCommand.ts\n\n\n\nvar LookupDeveloperIdentityCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSCognitoIdentityService\", \"LookupDeveloperIdentity\", {}).n(\"CognitoIdentityClient\", \"LookupDeveloperIdentityCommand\").f(void 0, void 0).ser(se_LookupDeveloperIdentityCommand).de(de_LookupDeveloperIdentityCommand).build() {\n static {\n __name(this, \"LookupDeveloperIdentityCommand\");\n }\n};\n\n// src/commands/MergeDeveloperIdentitiesCommand.ts\n\n\n\nvar MergeDeveloperIdentitiesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSCognitoIdentityService\", \"MergeDeveloperIdentities\", {}).n(\"CognitoIdentityClient\", \"MergeDeveloperIdentitiesCommand\").f(void 0, void 0).ser(se_MergeDeveloperIdentitiesCommand).de(de_MergeDeveloperIdentitiesCommand).build() {\n static {\n __name(this, \"MergeDeveloperIdentitiesCommand\");\n }\n};\n\n// src/commands/SetIdentityPoolRolesCommand.ts\n\n\n\nvar SetIdentityPoolRolesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSCognitoIdentityService\", \"SetIdentityPoolRoles\", {}).n(\"CognitoIdentityClient\", \"SetIdentityPoolRolesCommand\").f(void 0, void 0).ser(se_SetIdentityPoolRolesCommand).de(de_SetIdentityPoolRolesCommand).build() {\n static {\n __name(this, \"SetIdentityPoolRolesCommand\");\n }\n};\n\n// src/commands/SetPrincipalTagAttributeMapCommand.ts\n\n\n\nvar SetPrincipalTagAttributeMapCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSCognitoIdentityService\", \"SetPrincipalTagAttributeMap\", {}).n(\"CognitoIdentityClient\", \"SetPrincipalTagAttributeMapCommand\").f(void 0, void 0).ser(se_SetPrincipalTagAttributeMapCommand).de(de_SetPrincipalTagAttributeMapCommand).build() {\n static {\n __name(this, \"SetPrincipalTagAttributeMapCommand\");\n }\n};\n\n// src/commands/TagResourceCommand.ts\n\n\n\nvar TagResourceCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSCognitoIdentityService\", \"TagResource\", {}).n(\"CognitoIdentityClient\", \"TagResourceCommand\").f(void 0, void 0).ser(se_TagResourceCommand).de(de_TagResourceCommand).build() {\n static {\n __name(this, \"TagResourceCommand\");\n }\n};\n\n// src/commands/UnlinkDeveloperIdentityCommand.ts\n\n\n\nvar UnlinkDeveloperIdentityCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSCognitoIdentityService\", \"UnlinkDeveloperIdentity\", {}).n(\"CognitoIdentityClient\", \"UnlinkDeveloperIdentityCommand\").f(void 0, void 0).ser(se_UnlinkDeveloperIdentityCommand).de(de_UnlinkDeveloperIdentityCommand).build() {\n static {\n __name(this, \"UnlinkDeveloperIdentityCommand\");\n }\n};\n\n// src/commands/UnlinkIdentityCommand.ts\n\n\n\nvar UnlinkIdentityCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSCognitoIdentityService\", \"UnlinkIdentity\", {}).n(\"CognitoIdentityClient\", \"UnlinkIdentityCommand\").f(UnlinkIdentityInputFilterSensitiveLog, void 0).ser(se_UnlinkIdentityCommand).de(de_UnlinkIdentityCommand).build() {\n static {\n __name(this, \"UnlinkIdentityCommand\");\n }\n};\n\n// src/commands/UntagResourceCommand.ts\n\n\n\nvar UntagResourceCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSCognitoIdentityService\", \"UntagResource\", {}).n(\"CognitoIdentityClient\", \"UntagResourceCommand\").f(void 0, void 0).ser(se_UntagResourceCommand).de(de_UntagResourceCommand).build() {\n static {\n __name(this, \"UntagResourceCommand\");\n }\n};\n\n// src/commands/UpdateIdentityPoolCommand.ts\n\n\n\nvar UpdateIdentityPoolCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSCognitoIdentityService\", \"UpdateIdentityPool\", {}).n(\"CognitoIdentityClient\", \"UpdateIdentityPoolCommand\").f(void 0, void 0).ser(se_UpdateIdentityPoolCommand).de(de_UpdateIdentityPoolCommand).build() {\n static {\n __name(this, \"UpdateIdentityPoolCommand\");\n }\n};\n\n// src/CognitoIdentity.ts\nvar commands = {\n CreateIdentityPoolCommand,\n DeleteIdentitiesCommand,\n DeleteIdentityPoolCommand,\n DescribeIdentityCommand,\n DescribeIdentityPoolCommand,\n GetCredentialsForIdentityCommand,\n GetIdCommand,\n GetIdentityPoolRolesCommand,\n GetOpenIdTokenCommand,\n GetOpenIdTokenForDeveloperIdentityCommand,\n GetPrincipalTagAttributeMapCommand,\n ListIdentitiesCommand,\n ListIdentityPoolsCommand,\n ListTagsForResourceCommand,\n LookupDeveloperIdentityCommand,\n MergeDeveloperIdentitiesCommand,\n SetIdentityPoolRolesCommand,\n SetPrincipalTagAttributeMapCommand,\n TagResourceCommand,\n UnlinkDeveloperIdentityCommand,\n UnlinkIdentityCommand,\n UntagResourceCommand,\n UpdateIdentityPoolCommand\n};\nvar CognitoIdentity = class extends CognitoIdentityClient {\n static {\n __name(this, \"CognitoIdentity\");\n }\n};\n(0, import_smithy_client.createAggregatedClient)(commands, CognitoIdentity);\n\n// src/pagination/ListIdentityPoolsPaginator.ts\n\nvar paginateListIdentityPools = (0, import_core.createPaginator)(CognitoIdentityClient, ListIdentityPoolsCommand, \"NextToken\", \"NextToken\", \"MaxResults\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n CognitoIdentityServiceException,\n __Client,\n CognitoIdentityClient,\n CognitoIdentity,\n $Command,\n CreateIdentityPoolCommand,\n DeleteIdentitiesCommand,\n DeleteIdentityPoolCommand,\n DescribeIdentityCommand,\n DescribeIdentityPoolCommand,\n GetCredentialsForIdentityCommand,\n GetIdCommand,\n GetIdentityPoolRolesCommand,\n GetOpenIdTokenCommand,\n GetOpenIdTokenForDeveloperIdentityCommand,\n GetPrincipalTagAttributeMapCommand,\n ListIdentitiesCommand,\n ListIdentityPoolsCommand,\n ListTagsForResourceCommand,\n LookupDeveloperIdentityCommand,\n MergeDeveloperIdentitiesCommand,\n SetIdentityPoolRolesCommand,\n SetPrincipalTagAttributeMapCommand,\n TagResourceCommand,\n UnlinkDeveloperIdentityCommand,\n UnlinkIdentityCommand,\n UntagResourceCommand,\n UpdateIdentityPoolCommand,\n paginateListIdentityPools,\n AmbiguousRoleResolutionType,\n InternalErrorException,\n InvalidParameterException,\n LimitExceededException,\n NotAuthorizedException,\n ResourceConflictException,\n TooManyRequestsException,\n ErrorCode,\n ResourceNotFoundException,\n ExternalServiceException,\n InvalidIdentityPoolConfigurationException,\n MappingRuleMatchType,\n RoleMappingType,\n DeveloperUserAlreadyRegisteredException,\n ConcurrentModificationException,\n GetCredentialsForIdentityInputFilterSensitiveLog,\n CredentialsFilterSensitiveLog,\n GetCredentialsForIdentityResponseFilterSensitiveLog,\n GetIdInputFilterSensitiveLog,\n GetOpenIdTokenInputFilterSensitiveLog,\n GetOpenIdTokenResponseFilterSensitiveLog,\n GetOpenIdTokenForDeveloperIdentityInputFilterSensitiveLog,\n GetOpenIdTokenForDeveloperIdentityResponseFilterSensitiveLog,\n UnlinkIdentityInputFilterSensitiveLog\n});\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getRuntimeConfig = void 0;\nconst tslib_1 = require(\"tslib\");\nconst package_json_1 = tslib_1.__importDefault(require(\"../package.json\"));\nconst core_1 = require(\"@aws-sdk/core\");\nconst credential_provider_node_1 = require(\"@aws-sdk/credential-provider-node\");\nconst util_user_agent_node_1 = require(\"@aws-sdk/util-user-agent-node\");\nconst config_resolver_1 = require(\"@smithy/config-resolver\");\nconst hash_node_1 = require(\"@smithy/hash-node\");\nconst middleware_retry_1 = require(\"@smithy/middleware-retry\");\nconst node_config_provider_1 = require(\"@smithy/node-config-provider\");\nconst node_http_handler_1 = require(\"@smithy/node-http-handler\");\nconst util_body_length_node_1 = require(\"@smithy/util-body-length-node\");\nconst util_retry_1 = require(\"@smithy/util-retry\");\nconst runtimeConfig_shared_1 = require(\"./runtimeConfig.shared\");\nconst smithy_client_1 = require(\"@smithy/smithy-client\");\nconst util_defaults_mode_node_1 = require(\"@smithy/util-defaults-mode-node\");\nconst smithy_client_2 = require(\"@smithy/smithy-client\");\nconst getRuntimeConfig = (config) => {\n (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);\n const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);\n const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);\n const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);\n (0, core_1.emitWarningIfUnsupportedVersion)(process.version);\n const loaderConfig = {\n profile: config?.profile,\n logger: clientSharedValues.logger,\n };\n return {\n ...clientSharedValues,\n ...config,\n runtime: \"node\",\n defaultsMode,\n authSchemePreference: config?.authSchemePreference ?? (0, node_config_provider_1.loadConfig)(core_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),\n bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,\n credentialDefaultProvider: config?.credentialDefaultProvider ?? credential_provider_node_1.defaultProvider,\n defaultUserAgentProvider: config?.defaultUserAgentProvider ??\n (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),\n maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),\n region: config?.region ??\n (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),\n requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),\n retryMode: config?.retryMode ??\n (0, node_config_provider_1.loadConfig)({\n ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,\n default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE,\n }, config),\n sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, \"sha256\"),\n streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,\n useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),\n };\n};\nexports.getRuntimeConfig = getRuntimeConfig;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getRuntimeConfig = void 0;\nconst core_1 = require(\"@aws-sdk/core\");\nconst core_2 = require(\"@smithy/core\");\nconst smithy_client_1 = require(\"@smithy/smithy-client\");\nconst url_parser_1 = require(\"@smithy/url-parser\");\nconst util_base64_1 = require(\"@smithy/util-base64\");\nconst util_utf8_1 = require(\"@smithy/util-utf8\");\nconst httpAuthSchemeProvider_1 = require(\"./auth/httpAuthSchemeProvider\");\nconst endpointResolver_1 = require(\"./endpoint/endpointResolver\");\nconst getRuntimeConfig = (config) => {\n return {\n apiVersion: \"2014-06-30\",\n base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64,\n base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,\n disableHostPrefix: config?.disableHostPrefix ?? false,\n endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,\n extensions: config?.extensions ?? [],\n httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultCognitoIdentityHttpAuthSchemeProvider,\n httpAuthSchemes: config?.httpAuthSchemes ?? [\n {\n schemeId: \"aws.auth#sigv4\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"aws.auth#sigv4\"),\n signer: new core_1.AwsSdkSigV4Signer(),\n },\n {\n schemeId: \"smithy.api#noAuth\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"smithy.api#noAuth\") || (async () => ({})),\n signer: new core_2.NoAuthSigner(),\n },\n ],\n logger: config?.logger ?? new smithy_client_1.NoOpLogger(),\n serviceId: config?.serviceId ?? \"Cognito Identity\",\n urlParser: config?.urlParser ?? url_parser_1.parseUrl,\n utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,\n utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8,\n };\n};\nexports.getRuntimeConfig = getRuntimeConfig;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resolveHttpAuthSchemeConfig = exports.defaultSSOHttpAuthSchemeProvider = exports.defaultSSOHttpAuthSchemeParametersProvider = void 0;\nconst core_1 = require(\"@aws-sdk/core\");\nconst util_middleware_1 = require(\"@smithy/util-middleware\");\nconst defaultSSOHttpAuthSchemeParametersProvider = async (config, context, input) => {\n return {\n operation: (0, util_middleware_1.getSmithyContext)(context).operation,\n region: (await (0, util_middleware_1.normalizeProvider)(config.region)()) ||\n (() => {\n throw new Error(\"expected `region` to be configured for `aws.auth#sigv4`\");\n })(),\n };\n};\nexports.defaultSSOHttpAuthSchemeParametersProvider = defaultSSOHttpAuthSchemeParametersProvider;\nfunction createAwsAuthSigv4HttpAuthOption(authParameters) {\n return {\n schemeId: \"aws.auth#sigv4\",\n signingProperties: {\n name: \"awsssoportal\",\n region: authParameters.region,\n },\n propertiesExtractor: (config, context) => ({\n signingProperties: {\n config,\n context,\n },\n }),\n };\n}\nfunction createSmithyApiNoAuthHttpAuthOption(authParameters) {\n return {\n schemeId: \"smithy.api#noAuth\",\n };\n}\nconst defaultSSOHttpAuthSchemeProvider = (authParameters) => {\n const options = [];\n switch (authParameters.operation) {\n case \"GetRoleCredentials\": {\n options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));\n break;\n }\n case \"ListAccountRoles\": {\n options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));\n break;\n }\n case \"ListAccounts\": {\n options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));\n break;\n }\n case \"Logout\": {\n options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));\n break;\n }\n default: {\n options.push(createAwsAuthSigv4HttpAuthOption(authParameters));\n }\n }\n return options;\n};\nexports.defaultSSOHttpAuthSchemeProvider = defaultSSOHttpAuthSchemeProvider;\nconst resolveHttpAuthSchemeConfig = (config) => {\n const config_0 = (0, core_1.resolveAwsSdkSigV4Config)(config);\n return Object.assign(config_0, {\n authSchemePreference: (0, util_middleware_1.normalizeProvider)(config.authSchemePreference ?? []),\n });\n};\nexports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.defaultEndpointResolver = void 0;\nconst util_endpoints_1 = require(\"@aws-sdk/util-endpoints\");\nconst util_endpoints_2 = require(\"@smithy/util-endpoints\");\nconst ruleset_1 = require(\"./ruleset\");\nconst cache = new util_endpoints_2.EndpointCache({\n size: 50,\n params: [\"Endpoint\", \"Region\", \"UseDualStack\", \"UseFIPS\"],\n});\nconst defaultEndpointResolver = (endpointParams, context = {}) => {\n return cache.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, {\n endpointParams: endpointParams,\n logger: context.logger,\n }));\n};\nexports.defaultEndpointResolver = defaultEndpointResolver;\nutil_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ruleSet = void 0;\nconst u = \"required\", v = \"fn\", w = \"argv\", x = \"ref\";\nconst a = true, b = \"isSet\", c = \"booleanEquals\", d = \"error\", e = \"endpoint\", f = \"tree\", g = \"PartitionResult\", h = \"getAttr\", i = { [u]: false, \"type\": \"String\" }, j = { [u]: true, \"default\": false, \"type\": \"Boolean\" }, k = { [x]: \"Endpoint\" }, l = { [v]: c, [w]: [{ [x]: \"UseFIPS\" }, true] }, m = { [v]: c, [w]: [{ [x]: \"UseDualStack\" }, true] }, n = {}, o = { [v]: h, [w]: [{ [x]: g }, \"supportsFIPS\"] }, p = { [x]: g }, q = { [v]: c, [w]: [true, { [v]: h, [w]: [p, \"supportsDualStack\"] }] }, r = [l], s = [m], t = [{ [x]: \"Region\" }];\nconst _data = { version: \"1.0\", parameters: { Region: i, UseDualStack: j, UseFIPS: j, Endpoint: i }, rules: [{ conditions: [{ [v]: b, [w]: [k] }], rules: [{ conditions: r, error: \"Invalid Configuration: FIPS and custom endpoint are not supported\", type: d }, { conditions: s, error: \"Invalid Configuration: Dualstack and custom endpoint are not supported\", type: d }, { endpoint: { url: k, properties: n, headers: n }, type: e }], type: f }, { conditions: [{ [v]: b, [w]: t }], rules: [{ conditions: [{ [v]: \"aws.partition\", [w]: t, assign: g }], rules: [{ conditions: [l, m], rules: [{ conditions: [{ [v]: c, [w]: [a, o] }, q], rules: [{ endpoint: { url: \"https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}\", properties: n, headers: n }, type: e }], type: f }, { error: \"FIPS and DualStack are enabled, but this partition does not support one or both\", type: d }], type: f }, { conditions: r, rules: [{ conditions: [{ [v]: c, [w]: [o, a] }], rules: [{ conditions: [{ [v]: \"stringEquals\", [w]: [{ [v]: h, [w]: [p, \"name\"] }, \"aws-us-gov\"] }], endpoint: { url: \"https://portal.sso.{Region}.amazonaws.com\", properties: n, headers: n }, type: e }, { endpoint: { url: \"https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}\", properties: n, headers: n }, type: e }], type: f }, { error: \"FIPS is enabled but this partition does not support FIPS\", type: d }], type: f }, { conditions: s, rules: [{ conditions: [q], rules: [{ endpoint: { url: \"https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}\", properties: n, headers: n }, type: e }], type: f }, { error: \"DualStack is enabled but this partition does not support DualStack\", type: d }], type: f }, { endpoint: { url: \"https://portal.sso.{Region}.{PartitionResult#dnsSuffix}\", properties: n, headers: n }, type: e }], type: f }], type: f }, { error: \"Invalid Configuration: Missing Region\", type: d }] };\nexports.ruleSet = _data;\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar index_exports = {};\n__export(index_exports, {\n GetRoleCredentialsCommand: () => GetRoleCredentialsCommand,\n GetRoleCredentialsRequestFilterSensitiveLog: () => GetRoleCredentialsRequestFilterSensitiveLog,\n GetRoleCredentialsResponseFilterSensitiveLog: () => GetRoleCredentialsResponseFilterSensitiveLog,\n InvalidRequestException: () => InvalidRequestException,\n ListAccountRolesCommand: () => ListAccountRolesCommand,\n ListAccountRolesRequestFilterSensitiveLog: () => ListAccountRolesRequestFilterSensitiveLog,\n ListAccountsCommand: () => ListAccountsCommand,\n ListAccountsRequestFilterSensitiveLog: () => ListAccountsRequestFilterSensitiveLog,\n LogoutCommand: () => LogoutCommand,\n LogoutRequestFilterSensitiveLog: () => LogoutRequestFilterSensitiveLog,\n ResourceNotFoundException: () => ResourceNotFoundException,\n RoleCredentialsFilterSensitiveLog: () => RoleCredentialsFilterSensitiveLog,\n SSO: () => SSO,\n SSOClient: () => SSOClient,\n SSOServiceException: () => SSOServiceException,\n TooManyRequestsException: () => TooManyRequestsException,\n UnauthorizedException: () => UnauthorizedException,\n __Client: () => import_smithy_client.Client,\n paginateListAccountRoles: () => paginateListAccountRoles,\n paginateListAccounts: () => paginateListAccounts\n});\nmodule.exports = __toCommonJS(index_exports);\n\n// src/SSOClient.ts\nvar import_middleware_host_header = require(\"@aws-sdk/middleware-host-header\");\nvar import_middleware_logger = require(\"@aws-sdk/middleware-logger\");\nvar import_middleware_recursion_detection = require(\"@aws-sdk/middleware-recursion-detection\");\nvar import_middleware_user_agent = require(\"@aws-sdk/middleware-user-agent\");\nvar import_config_resolver = require(\"@smithy/config-resolver\");\nvar import_core = require(\"@smithy/core\");\nvar import_middleware_content_length = require(\"@smithy/middleware-content-length\");\nvar import_middleware_endpoint = require(\"@smithy/middleware-endpoint\");\nvar import_middleware_retry = require(\"@smithy/middleware-retry\");\n\nvar import_httpAuthSchemeProvider = require(\"./auth/httpAuthSchemeProvider\");\n\n// src/endpoint/EndpointParameters.ts\nvar resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {\n return Object.assign(options, {\n useDualstackEndpoint: options.useDualstackEndpoint ?? false,\n useFipsEndpoint: options.useFipsEndpoint ?? false,\n defaultSigningName: \"awsssoportal\"\n });\n}, \"resolveClientEndpointParameters\");\nvar commonParams = {\n UseFIPS: { type: \"builtInParams\", name: \"useFipsEndpoint\" },\n Endpoint: { type: \"builtInParams\", name: \"endpoint\" },\n Region: { type: \"builtInParams\", name: \"region\" },\n UseDualStack: { type: \"builtInParams\", name: \"useDualstackEndpoint\" }\n};\n\n// src/SSOClient.ts\nvar import_runtimeConfig = require(\"././runtimeConfig\");\n\n// src/runtimeExtensions.ts\nvar import_region_config_resolver = require(\"@aws-sdk/region-config-resolver\");\nvar import_protocol_http = require(\"@smithy/protocol-http\");\nvar import_smithy_client = require(\"@smithy/smithy-client\");\n\n// src/auth/httpAuthExtensionConfiguration.ts\nvar getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {\n const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;\n let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;\n let _credentials = runtimeConfig.credentials;\n return {\n setHttpAuthScheme(httpAuthScheme) {\n const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);\n if (index === -1) {\n _httpAuthSchemes.push(httpAuthScheme);\n } else {\n _httpAuthSchemes.splice(index, 1, httpAuthScheme);\n }\n },\n httpAuthSchemes() {\n return _httpAuthSchemes;\n },\n setHttpAuthSchemeProvider(httpAuthSchemeProvider) {\n _httpAuthSchemeProvider = httpAuthSchemeProvider;\n },\n httpAuthSchemeProvider() {\n return _httpAuthSchemeProvider;\n },\n setCredentials(credentials) {\n _credentials = credentials;\n },\n credentials() {\n return _credentials;\n }\n };\n}, \"getHttpAuthExtensionConfiguration\");\nvar resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => {\n return {\n httpAuthSchemes: config.httpAuthSchemes(),\n httpAuthSchemeProvider: config.httpAuthSchemeProvider(),\n credentials: config.credentials()\n };\n}, \"resolveHttpAuthRuntimeConfig\");\n\n// src/runtimeExtensions.ts\nvar resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {\n const extensionConfiguration = Object.assign(\n (0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig),\n (0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig),\n (0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig),\n getHttpAuthExtensionConfiguration(runtimeConfig)\n );\n extensions.forEach((extension) => extension.configure(extensionConfiguration));\n return Object.assign(\n runtimeConfig,\n (0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),\n (0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),\n (0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),\n resolveHttpAuthRuntimeConfig(extensionConfiguration)\n );\n}, \"resolveRuntimeExtensions\");\n\n// src/SSOClient.ts\nvar SSOClient = class extends import_smithy_client.Client {\n static {\n __name(this, \"SSOClient\");\n }\n /**\n * The resolved configuration of SSOClient class. This is resolved and normalized from the {@link SSOClientConfig | constructor configuration interface}.\n */\n config;\n constructor(...[configuration]) {\n const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});\n super(_config_0);\n this.initConfig = _config_0;\n const _config_1 = resolveClientEndpointParameters(_config_0);\n const _config_2 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_1);\n const _config_3 = (0, import_middleware_retry.resolveRetryConfig)(_config_2);\n const _config_4 = (0, import_config_resolver.resolveRegionConfig)(_config_3);\n const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);\n const _config_6 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_5);\n const _config_7 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_6);\n const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);\n this.config = _config_8;\n this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));\n this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));\n this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));\n this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));\n this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));\n this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));\n this.middlewareStack.use(\n (0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {\n httpAuthSchemeParametersProvider: import_httpAuthSchemeProvider.defaultSSOHttpAuthSchemeParametersProvider,\n identityProviderConfigProvider: /* @__PURE__ */ __name(async (config) => new import_core.DefaultIdentityProviderConfig({\n \"aws.auth#sigv4\": config.credentials\n }), \"identityProviderConfigProvider\")\n })\n );\n this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config));\n }\n /**\n * Destroy underlying resources, like sockets. It's usually not necessary to do this.\n * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.\n * Otherwise, sockets might stay open for quite a long time before the server terminates them.\n */\n destroy() {\n super.destroy();\n }\n};\n\n// src/SSO.ts\n\n\n// src/commands/GetRoleCredentialsCommand.ts\n\nvar import_middleware_serde = require(\"@smithy/middleware-serde\");\n\n\n// src/models/models_0.ts\n\n\n// src/models/SSOServiceException.ts\n\nvar SSOServiceException = class _SSOServiceException extends import_smithy_client.ServiceException {\n static {\n __name(this, \"SSOServiceException\");\n }\n /**\n * @internal\n */\n constructor(options) {\n super(options);\n Object.setPrototypeOf(this, _SSOServiceException.prototype);\n }\n};\n\n// src/models/models_0.ts\nvar InvalidRequestException = class _InvalidRequestException extends SSOServiceException {\n static {\n __name(this, \"InvalidRequestException\");\n }\n name = \"InvalidRequestException\";\n $fault = \"client\";\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"InvalidRequestException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _InvalidRequestException.prototype);\n }\n};\nvar ResourceNotFoundException = class _ResourceNotFoundException extends SSOServiceException {\n static {\n __name(this, \"ResourceNotFoundException\");\n }\n name = \"ResourceNotFoundException\";\n $fault = \"client\";\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"ResourceNotFoundException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _ResourceNotFoundException.prototype);\n }\n};\nvar TooManyRequestsException = class _TooManyRequestsException extends SSOServiceException {\n static {\n __name(this, \"TooManyRequestsException\");\n }\n name = \"TooManyRequestsException\";\n $fault = \"client\";\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"TooManyRequestsException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _TooManyRequestsException.prototype);\n }\n};\nvar UnauthorizedException = class _UnauthorizedException extends SSOServiceException {\n static {\n __name(this, \"UnauthorizedException\");\n }\n name = \"UnauthorizedException\";\n $fault = \"client\";\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"UnauthorizedException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _UnauthorizedException.prototype);\n }\n};\nvar GetRoleCredentialsRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.accessToken && { accessToken: import_smithy_client.SENSITIVE_STRING }\n}), \"GetRoleCredentialsRequestFilterSensitiveLog\");\nvar RoleCredentialsFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.secretAccessKey && { secretAccessKey: import_smithy_client.SENSITIVE_STRING },\n ...obj.sessionToken && { sessionToken: import_smithy_client.SENSITIVE_STRING }\n}), \"RoleCredentialsFilterSensitiveLog\");\nvar GetRoleCredentialsResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.roleCredentials && { roleCredentials: RoleCredentialsFilterSensitiveLog(obj.roleCredentials) }\n}), \"GetRoleCredentialsResponseFilterSensitiveLog\");\nvar ListAccountRolesRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.accessToken && { accessToken: import_smithy_client.SENSITIVE_STRING }\n}), \"ListAccountRolesRequestFilterSensitiveLog\");\nvar ListAccountsRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.accessToken && { accessToken: import_smithy_client.SENSITIVE_STRING }\n}), \"ListAccountsRequestFilterSensitiveLog\");\nvar LogoutRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.accessToken && { accessToken: import_smithy_client.SENSITIVE_STRING }\n}), \"LogoutRequestFilterSensitiveLog\");\n\n// src/protocols/Aws_restJson1.ts\nvar import_core2 = require(\"@aws-sdk/core\");\n\n\nvar se_GetRoleCredentialsCommand = /* @__PURE__ */ __name(async (input, context) => {\n const b = (0, import_core.requestBuilder)(input, context);\n const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {\n [_xasbt]: input[_aT]\n });\n b.bp(\"/federation/credentials\");\n const query = (0, import_smithy_client.map)({\n [_rn]: [, (0, import_smithy_client.expectNonNull)(input[_rN], `roleName`)],\n [_ai]: [, (0, import_smithy_client.expectNonNull)(input[_aI], `accountId`)]\n });\n let body;\n b.m(\"GET\").h(headers).q(query).b(body);\n return b.build();\n}, \"se_GetRoleCredentialsCommand\");\nvar se_ListAccountRolesCommand = /* @__PURE__ */ __name(async (input, context) => {\n const b = (0, import_core.requestBuilder)(input, context);\n const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {\n [_xasbt]: input[_aT]\n });\n b.bp(\"/assignment/roles\");\n const query = (0, import_smithy_client.map)({\n [_nt]: [, input[_nT]],\n [_mr]: [() => input.maxResults !== void 0, () => input[_mR].toString()],\n [_ai]: [, (0, import_smithy_client.expectNonNull)(input[_aI], `accountId`)]\n });\n let body;\n b.m(\"GET\").h(headers).q(query).b(body);\n return b.build();\n}, \"se_ListAccountRolesCommand\");\nvar se_ListAccountsCommand = /* @__PURE__ */ __name(async (input, context) => {\n const b = (0, import_core.requestBuilder)(input, context);\n const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {\n [_xasbt]: input[_aT]\n });\n b.bp(\"/assignment/accounts\");\n const query = (0, import_smithy_client.map)({\n [_nt]: [, input[_nT]],\n [_mr]: [() => input.maxResults !== void 0, () => input[_mR].toString()]\n });\n let body;\n b.m(\"GET\").h(headers).q(query).b(body);\n return b.build();\n}, \"se_ListAccountsCommand\");\nvar se_LogoutCommand = /* @__PURE__ */ __name(async (input, context) => {\n const b = (0, import_core.requestBuilder)(input, context);\n const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {\n [_xasbt]: input[_aT]\n });\n b.bp(\"/logout\");\n let body;\n b.m(\"POST\").h(headers).b(body);\n return b.build();\n}, \"se_LogoutCommand\");\nvar de_GetRoleCredentialsCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const contents = (0, import_smithy_client.map)({\n $metadata: deserializeMetadata(output)\n });\n const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), \"body\");\n const doc = (0, import_smithy_client.take)(data, {\n roleCredentials: import_smithy_client._json\n });\n Object.assign(contents, doc);\n return contents;\n}, \"de_GetRoleCredentialsCommand\");\nvar de_ListAccountRolesCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const contents = (0, import_smithy_client.map)({\n $metadata: deserializeMetadata(output)\n });\n const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), \"body\");\n const doc = (0, import_smithy_client.take)(data, {\n nextToken: import_smithy_client.expectString,\n roleList: import_smithy_client._json\n });\n Object.assign(contents, doc);\n return contents;\n}, \"de_ListAccountRolesCommand\");\nvar de_ListAccountsCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const contents = (0, import_smithy_client.map)({\n $metadata: deserializeMetadata(output)\n });\n const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), \"body\");\n const doc = (0, import_smithy_client.take)(data, {\n accountList: import_smithy_client._json,\n nextToken: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n return contents;\n}, \"de_ListAccountsCommand\");\nvar de_LogoutCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const contents = (0, import_smithy_client.map)({\n $metadata: deserializeMetadata(output)\n });\n await (0, import_smithy_client.collectBody)(output.body, context);\n return contents;\n}, \"de_LogoutCommand\");\nvar de_CommandError = /* @__PURE__ */ __name(async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await (0, import_core2.parseJsonErrorBody)(output.body, context)\n };\n const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);\n switch (errorCode) {\n case \"InvalidRequestException\":\n case \"com.amazonaws.sso#InvalidRequestException\":\n throw await de_InvalidRequestExceptionRes(parsedOutput, context);\n case \"ResourceNotFoundException\":\n case \"com.amazonaws.sso#ResourceNotFoundException\":\n throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);\n case \"TooManyRequestsException\":\n case \"com.amazonaws.sso#TooManyRequestsException\":\n throw await de_TooManyRequestsExceptionRes(parsedOutput, context);\n case \"UnauthorizedException\":\n case \"com.amazonaws.sso#UnauthorizedException\":\n throw await de_UnauthorizedExceptionRes(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n return throwDefaultError({\n output,\n parsedBody,\n errorCode\n });\n }\n}, \"de_CommandError\");\nvar throwDefaultError = (0, import_smithy_client.withBaseException)(SSOServiceException);\nvar de_InvalidRequestExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client.take)(data, {\n message: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n const exception = new InvalidRequestException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_InvalidRequestExceptionRes\");\nvar de_ResourceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client.take)(data, {\n message: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n const exception = new ResourceNotFoundException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_ResourceNotFoundExceptionRes\");\nvar de_TooManyRequestsExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client.take)(data, {\n message: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n const exception = new TooManyRequestsException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_TooManyRequestsExceptionRes\");\nvar de_UnauthorizedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client.take)(data, {\n message: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n const exception = new UnauthorizedException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_UnauthorizedExceptionRes\");\nvar deserializeMetadata = /* @__PURE__ */ __name((output) => ({\n httpStatusCode: output.statusCode,\n requestId: output.headers[\"x-amzn-requestid\"] ?? output.headers[\"x-amzn-request-id\"] ?? output.headers[\"x-amz-request-id\"],\n extendedRequestId: output.headers[\"x-amz-id-2\"],\n cfId: output.headers[\"x-amz-cf-id\"]\n}), \"deserializeMetadata\");\nvar _aI = \"accountId\";\nvar _aT = \"accessToken\";\nvar _ai = \"account_id\";\nvar _mR = \"maxResults\";\nvar _mr = \"max_result\";\nvar _nT = \"nextToken\";\nvar _nt = \"next_token\";\nvar _rN = \"roleName\";\nvar _rn = \"role_name\";\nvar _xasbt = \"x-amz-sso_bearer_token\";\n\n// src/commands/GetRoleCredentialsCommand.ts\nvar GetRoleCredentialsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"SWBPortalService\", \"GetRoleCredentials\", {}).n(\"SSOClient\", \"GetRoleCredentialsCommand\").f(GetRoleCredentialsRequestFilterSensitiveLog, GetRoleCredentialsResponseFilterSensitiveLog).ser(se_GetRoleCredentialsCommand).de(de_GetRoleCredentialsCommand).build() {\n static {\n __name(this, \"GetRoleCredentialsCommand\");\n }\n};\n\n// src/commands/ListAccountRolesCommand.ts\n\n\n\nvar ListAccountRolesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"SWBPortalService\", \"ListAccountRoles\", {}).n(\"SSOClient\", \"ListAccountRolesCommand\").f(ListAccountRolesRequestFilterSensitiveLog, void 0).ser(se_ListAccountRolesCommand).de(de_ListAccountRolesCommand).build() {\n static {\n __name(this, \"ListAccountRolesCommand\");\n }\n};\n\n// src/commands/ListAccountsCommand.ts\n\n\n\nvar ListAccountsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"SWBPortalService\", \"ListAccounts\", {}).n(\"SSOClient\", \"ListAccountsCommand\").f(ListAccountsRequestFilterSensitiveLog, void 0).ser(se_ListAccountsCommand).de(de_ListAccountsCommand).build() {\n static {\n __name(this, \"ListAccountsCommand\");\n }\n};\n\n// src/commands/LogoutCommand.ts\n\n\n\nvar LogoutCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"SWBPortalService\", \"Logout\", {}).n(\"SSOClient\", \"LogoutCommand\").f(LogoutRequestFilterSensitiveLog, void 0).ser(se_LogoutCommand).de(de_LogoutCommand).build() {\n static {\n __name(this, \"LogoutCommand\");\n }\n};\n\n// src/SSO.ts\nvar commands = {\n GetRoleCredentialsCommand,\n ListAccountRolesCommand,\n ListAccountsCommand,\n LogoutCommand\n};\nvar SSO = class extends SSOClient {\n static {\n __name(this, \"SSO\");\n }\n};\n(0, import_smithy_client.createAggregatedClient)(commands, SSO);\n\n// src/pagination/ListAccountRolesPaginator.ts\n\nvar paginateListAccountRoles = (0, import_core.createPaginator)(SSOClient, ListAccountRolesCommand, \"nextToken\", \"nextToken\", \"maxResults\");\n\n// src/pagination/ListAccountsPaginator.ts\n\nvar paginateListAccounts = (0, import_core.createPaginator)(SSOClient, ListAccountsCommand, \"nextToken\", \"nextToken\", \"maxResults\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n SSOServiceException,\n __Client,\n SSOClient,\n SSO,\n $Command,\n GetRoleCredentialsCommand,\n ListAccountRolesCommand,\n ListAccountsCommand,\n LogoutCommand,\n paginateListAccountRoles,\n paginateListAccounts,\n InvalidRequestException,\n ResourceNotFoundException,\n TooManyRequestsException,\n UnauthorizedException,\n GetRoleCredentialsRequestFilterSensitiveLog,\n RoleCredentialsFilterSensitiveLog,\n GetRoleCredentialsResponseFilterSensitiveLog,\n ListAccountRolesRequestFilterSensitiveLog,\n ListAccountsRequestFilterSensitiveLog,\n LogoutRequestFilterSensitiveLog\n});\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getRuntimeConfig = void 0;\nconst tslib_1 = require(\"tslib\");\nconst package_json_1 = tslib_1.__importDefault(require(\"../package.json\"));\nconst core_1 = require(\"@aws-sdk/core\");\nconst util_user_agent_node_1 = require(\"@aws-sdk/util-user-agent-node\");\nconst config_resolver_1 = require(\"@smithy/config-resolver\");\nconst hash_node_1 = require(\"@smithy/hash-node\");\nconst middleware_retry_1 = require(\"@smithy/middleware-retry\");\nconst node_config_provider_1 = require(\"@smithy/node-config-provider\");\nconst node_http_handler_1 = require(\"@smithy/node-http-handler\");\nconst util_body_length_node_1 = require(\"@smithy/util-body-length-node\");\nconst util_retry_1 = require(\"@smithy/util-retry\");\nconst runtimeConfig_shared_1 = require(\"./runtimeConfig.shared\");\nconst smithy_client_1 = require(\"@smithy/smithy-client\");\nconst util_defaults_mode_node_1 = require(\"@smithy/util-defaults-mode-node\");\nconst smithy_client_2 = require(\"@smithy/smithy-client\");\nconst getRuntimeConfig = (config) => {\n (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);\n const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);\n const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);\n const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);\n (0, core_1.emitWarningIfUnsupportedVersion)(process.version);\n const loaderConfig = {\n profile: config?.profile,\n logger: clientSharedValues.logger,\n };\n return {\n ...clientSharedValues,\n ...config,\n runtime: \"node\",\n defaultsMode,\n authSchemePreference: config?.authSchemePreference ?? (0, node_config_provider_1.loadConfig)(core_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),\n bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,\n defaultUserAgentProvider: config?.defaultUserAgentProvider ??\n (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),\n maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),\n region: config?.region ??\n (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),\n requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),\n retryMode: config?.retryMode ??\n (0, node_config_provider_1.loadConfig)({\n ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,\n default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE,\n }, config),\n sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, \"sha256\"),\n streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,\n useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),\n };\n};\nexports.getRuntimeConfig = getRuntimeConfig;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getRuntimeConfig = void 0;\nconst core_1 = require(\"@aws-sdk/core\");\nconst core_2 = require(\"@smithy/core\");\nconst smithy_client_1 = require(\"@smithy/smithy-client\");\nconst url_parser_1 = require(\"@smithy/url-parser\");\nconst util_base64_1 = require(\"@smithy/util-base64\");\nconst util_utf8_1 = require(\"@smithy/util-utf8\");\nconst httpAuthSchemeProvider_1 = require(\"./auth/httpAuthSchemeProvider\");\nconst endpointResolver_1 = require(\"./endpoint/endpointResolver\");\nconst getRuntimeConfig = (config) => {\n return {\n apiVersion: \"2019-06-10\",\n base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64,\n base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,\n disableHostPrefix: config?.disableHostPrefix ?? false,\n endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,\n extensions: config?.extensions ?? [],\n httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSSOHttpAuthSchemeProvider,\n httpAuthSchemes: config?.httpAuthSchemes ?? [\n {\n schemeId: \"aws.auth#sigv4\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"aws.auth#sigv4\"),\n signer: new core_1.AwsSdkSigV4Signer(),\n },\n {\n schemeId: \"smithy.api#noAuth\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"smithy.api#noAuth\") || (async () => ({})),\n signer: new core_2.NoAuthSigner(),\n },\n ],\n logger: config?.logger ?? new smithy_client_1.NoOpLogger(),\n serviceId: config?.serviceId ?? \"SSO\",\n urlParser: config?.urlParser ?? url_parser_1.parseUrl,\n utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,\n utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8,\n };\n};\nexports.getRuntimeConfig = getRuntimeConfig;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.STSClient = exports.__Client = void 0;\nconst middleware_host_header_1 = require(\"@aws-sdk/middleware-host-header\");\nconst middleware_logger_1 = require(\"@aws-sdk/middleware-logger\");\nconst middleware_recursion_detection_1 = require(\"@aws-sdk/middleware-recursion-detection\");\nconst middleware_user_agent_1 = require(\"@aws-sdk/middleware-user-agent\");\nconst config_resolver_1 = require(\"@smithy/config-resolver\");\nconst core_1 = require(\"@smithy/core\");\nconst middleware_content_length_1 = require(\"@smithy/middleware-content-length\");\nconst middleware_endpoint_1 = require(\"@smithy/middleware-endpoint\");\nconst middleware_retry_1 = require(\"@smithy/middleware-retry\");\nconst smithy_client_1 = require(\"@smithy/smithy-client\");\nObject.defineProperty(exports, \"__Client\", { enumerable: true, get: function () { return smithy_client_1.Client; } });\nconst httpAuthSchemeProvider_1 = require(\"./auth/httpAuthSchemeProvider\");\nconst EndpointParameters_1 = require(\"./endpoint/EndpointParameters\");\nconst runtimeConfig_1 = require(\"./runtimeConfig\");\nconst runtimeExtensions_1 = require(\"./runtimeExtensions\");\nclass STSClient extends smithy_client_1.Client {\n config;\n constructor(...[configuration]) {\n const _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration || {});\n super(_config_0);\n this.initConfig = _config_0;\n const _config_1 = (0, EndpointParameters_1.resolveClientEndpointParameters)(_config_0);\n const _config_2 = (0, middleware_user_agent_1.resolveUserAgentConfig)(_config_1);\n const _config_3 = (0, middleware_retry_1.resolveRetryConfig)(_config_2);\n const _config_4 = (0, config_resolver_1.resolveRegionConfig)(_config_3);\n const _config_5 = (0, middleware_host_header_1.resolveHostHeaderConfig)(_config_4);\n const _config_6 = (0, middleware_endpoint_1.resolveEndpointConfig)(_config_5);\n const _config_7 = (0, httpAuthSchemeProvider_1.resolveHttpAuthSchemeConfig)(_config_6);\n const _config_8 = (0, runtimeExtensions_1.resolveRuntimeExtensions)(_config_7, configuration?.extensions || []);\n this.config = _config_8;\n this.middlewareStack.use((0, middleware_user_agent_1.getUserAgentPlugin)(this.config));\n this.middlewareStack.use((0, middleware_retry_1.getRetryPlugin)(this.config));\n this.middlewareStack.use((0, middleware_content_length_1.getContentLengthPlugin)(this.config));\n this.middlewareStack.use((0, middleware_host_header_1.getHostHeaderPlugin)(this.config));\n this.middlewareStack.use((0, middleware_logger_1.getLoggerPlugin)(this.config));\n this.middlewareStack.use((0, middleware_recursion_detection_1.getRecursionDetectionPlugin)(this.config));\n this.middlewareStack.use((0, core_1.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {\n httpAuthSchemeParametersProvider: httpAuthSchemeProvider_1.defaultSTSHttpAuthSchemeParametersProvider,\n identityProviderConfigProvider: async (config) => new core_1.DefaultIdentityProviderConfig({\n \"aws.auth#sigv4\": config.credentials,\n }),\n }));\n this.middlewareStack.use((0, core_1.getHttpSigningPlugin)(this.config));\n }\n destroy() {\n super.destroy();\n }\n}\nexports.STSClient = STSClient;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resolveHttpAuthRuntimeConfig = exports.getHttpAuthExtensionConfiguration = void 0;\nconst getHttpAuthExtensionConfiguration = (runtimeConfig) => {\n const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;\n let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;\n let _credentials = runtimeConfig.credentials;\n return {\n setHttpAuthScheme(httpAuthScheme) {\n const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);\n if (index === -1) {\n _httpAuthSchemes.push(httpAuthScheme);\n }\n else {\n _httpAuthSchemes.splice(index, 1, httpAuthScheme);\n }\n },\n httpAuthSchemes() {\n return _httpAuthSchemes;\n },\n setHttpAuthSchemeProvider(httpAuthSchemeProvider) {\n _httpAuthSchemeProvider = httpAuthSchemeProvider;\n },\n httpAuthSchemeProvider() {\n return _httpAuthSchemeProvider;\n },\n setCredentials(credentials) {\n _credentials = credentials;\n },\n credentials() {\n return _credentials;\n },\n };\n};\nexports.getHttpAuthExtensionConfiguration = getHttpAuthExtensionConfiguration;\nconst resolveHttpAuthRuntimeConfig = (config) => {\n return {\n httpAuthSchemes: config.httpAuthSchemes(),\n httpAuthSchemeProvider: config.httpAuthSchemeProvider(),\n credentials: config.credentials(),\n };\n};\nexports.resolveHttpAuthRuntimeConfig = resolveHttpAuthRuntimeConfig;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resolveHttpAuthSchemeConfig = exports.resolveStsAuthConfig = exports.defaultSTSHttpAuthSchemeProvider = exports.defaultSTSHttpAuthSchemeParametersProvider = void 0;\nconst core_1 = require(\"@aws-sdk/core\");\nconst util_middleware_1 = require(\"@smithy/util-middleware\");\nconst STSClient_1 = require(\"../STSClient\");\nconst defaultSTSHttpAuthSchemeParametersProvider = async (config, context, input) => {\n return {\n operation: (0, util_middleware_1.getSmithyContext)(context).operation,\n region: (await (0, util_middleware_1.normalizeProvider)(config.region)()) ||\n (() => {\n throw new Error(\"expected `region` to be configured for `aws.auth#sigv4`\");\n })(),\n };\n};\nexports.defaultSTSHttpAuthSchemeParametersProvider = defaultSTSHttpAuthSchemeParametersProvider;\nfunction createAwsAuthSigv4HttpAuthOption(authParameters) {\n return {\n schemeId: \"aws.auth#sigv4\",\n signingProperties: {\n name: \"sts\",\n region: authParameters.region,\n },\n propertiesExtractor: (config, context) => ({\n signingProperties: {\n config,\n context,\n },\n }),\n };\n}\nfunction createSmithyApiNoAuthHttpAuthOption(authParameters) {\n return {\n schemeId: \"smithy.api#noAuth\",\n };\n}\nconst defaultSTSHttpAuthSchemeProvider = (authParameters) => {\n const options = [];\n switch (authParameters.operation) {\n case \"AssumeRoleWithSAML\": {\n options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));\n break;\n }\n case \"AssumeRoleWithWebIdentity\": {\n options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));\n break;\n }\n default: {\n options.push(createAwsAuthSigv4HttpAuthOption(authParameters));\n }\n }\n return options;\n};\nexports.defaultSTSHttpAuthSchemeProvider = defaultSTSHttpAuthSchemeProvider;\nconst resolveStsAuthConfig = (input) => Object.assign(input, {\n stsClientCtor: STSClient_1.STSClient,\n});\nexports.resolveStsAuthConfig = resolveStsAuthConfig;\nconst resolveHttpAuthSchemeConfig = (config) => {\n const config_0 = (0, exports.resolveStsAuthConfig)(config);\n const config_1 = (0, core_1.resolveAwsSdkSigV4Config)(config_0);\n return Object.assign(config_1, {\n authSchemePreference: (0, util_middleware_1.normalizeProvider)(config.authSchemePreference ?? []),\n });\n};\nexports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.commonParams = exports.resolveClientEndpointParameters = void 0;\nconst resolveClientEndpointParameters = (options) => {\n return Object.assign(options, {\n useDualstackEndpoint: options.useDualstackEndpoint ?? false,\n useFipsEndpoint: options.useFipsEndpoint ?? false,\n useGlobalEndpoint: options.useGlobalEndpoint ?? false,\n defaultSigningName: \"sts\",\n });\n};\nexports.resolveClientEndpointParameters = resolveClientEndpointParameters;\nexports.commonParams = {\n UseGlobalEndpoint: { type: \"builtInParams\", name: \"useGlobalEndpoint\" },\n UseFIPS: { type: \"builtInParams\", name: \"useFipsEndpoint\" },\n Endpoint: { type: \"builtInParams\", name: \"endpoint\" },\n Region: { type: \"builtInParams\", name: \"region\" },\n UseDualStack: { type: \"builtInParams\", name: \"useDualstackEndpoint\" },\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.defaultEndpointResolver = void 0;\nconst util_endpoints_1 = require(\"@aws-sdk/util-endpoints\");\nconst util_endpoints_2 = require(\"@smithy/util-endpoints\");\nconst ruleset_1 = require(\"./ruleset\");\nconst cache = new util_endpoints_2.EndpointCache({\n size: 50,\n params: [\"Endpoint\", \"Region\", \"UseDualStack\", \"UseFIPS\", \"UseGlobalEndpoint\"],\n});\nconst defaultEndpointResolver = (endpointParams, context = {}) => {\n return cache.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, {\n endpointParams: endpointParams,\n logger: context.logger,\n }));\n};\nexports.defaultEndpointResolver = defaultEndpointResolver;\nutil_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ruleSet = void 0;\nconst F = \"required\", G = \"type\", H = \"fn\", I = \"argv\", J = \"ref\";\nconst a = false, b = true, c = \"booleanEquals\", d = \"stringEquals\", e = \"sigv4\", f = \"sts\", g = \"us-east-1\", h = \"endpoint\", i = \"https://sts.{Region}.{PartitionResult#dnsSuffix}\", j = \"tree\", k = \"error\", l = \"getAttr\", m = { [F]: false, [G]: \"String\" }, n = { [F]: true, \"default\": false, [G]: \"Boolean\" }, o = { [J]: \"Endpoint\" }, p = { [H]: \"isSet\", [I]: [{ [J]: \"Region\" }] }, q = { [J]: \"Region\" }, r = { [H]: \"aws.partition\", [I]: [q], \"assign\": \"PartitionResult\" }, s = { [J]: \"UseFIPS\" }, t = { [J]: \"UseDualStack\" }, u = { \"url\": \"https://sts.amazonaws.com\", \"properties\": { \"authSchemes\": [{ \"name\": e, \"signingName\": f, \"signingRegion\": g }] }, \"headers\": {} }, v = {}, w = { \"conditions\": [{ [H]: d, [I]: [q, \"aws-global\"] }], [h]: u, [G]: h }, x = { [H]: c, [I]: [s, true] }, y = { [H]: c, [I]: [t, true] }, z = { [H]: l, [I]: [{ [J]: \"PartitionResult\" }, \"supportsFIPS\"] }, A = { [J]: \"PartitionResult\" }, B = { [H]: c, [I]: [true, { [H]: l, [I]: [A, \"supportsDualStack\"] }] }, C = [{ [H]: \"isSet\", [I]: [o] }], D = [x], E = [y];\nconst _data = { version: \"1.0\", parameters: { Region: m, UseDualStack: n, UseFIPS: n, Endpoint: m, UseGlobalEndpoint: n }, rules: [{ conditions: [{ [H]: c, [I]: [{ [J]: \"UseGlobalEndpoint\" }, b] }, { [H]: \"not\", [I]: C }, p, r, { [H]: c, [I]: [s, a] }, { [H]: c, [I]: [t, a] }], rules: [{ conditions: [{ [H]: d, [I]: [q, \"ap-northeast-1\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"ap-south-1\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"ap-southeast-1\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"ap-southeast-2\"] }], endpoint: u, [G]: h }, w, { conditions: [{ [H]: d, [I]: [q, \"ca-central-1\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"eu-central-1\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"eu-north-1\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"eu-west-1\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"eu-west-2\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"eu-west-3\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"sa-east-1\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, g] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"us-east-2\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"us-west-1\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"us-west-2\"] }], endpoint: u, [G]: h }, { endpoint: { url: i, properties: { authSchemes: [{ name: e, signingName: f, signingRegion: \"{Region}\" }] }, headers: v }, [G]: h }], [G]: j }, { conditions: C, rules: [{ conditions: D, error: \"Invalid Configuration: FIPS and custom endpoint are not supported\", [G]: k }, { conditions: E, error: \"Invalid Configuration: Dualstack and custom endpoint are not supported\", [G]: k }, { endpoint: { url: o, properties: v, headers: v }, [G]: h }], [G]: j }, { conditions: [p], rules: [{ conditions: [r], rules: [{ conditions: [x, y], rules: [{ conditions: [{ [H]: c, [I]: [b, z] }, B], rules: [{ endpoint: { url: \"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}\", properties: v, headers: v }, [G]: h }], [G]: j }, { error: \"FIPS and DualStack are enabled, but this partition does not support one or both\", [G]: k }], [G]: j }, { conditions: D, rules: [{ conditions: [{ [H]: c, [I]: [z, b] }], rules: [{ conditions: [{ [H]: d, [I]: [{ [H]: l, [I]: [A, \"name\"] }, \"aws-us-gov\"] }], endpoint: { url: \"https://sts.{Region}.amazonaws.com\", properties: v, headers: v }, [G]: h }, { endpoint: { url: \"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}\", properties: v, headers: v }, [G]: h }], [G]: j }, { error: \"FIPS is enabled but this partition does not support FIPS\", [G]: k }], [G]: j }, { conditions: E, rules: [{ conditions: [B], rules: [{ endpoint: { url: \"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}\", properties: v, headers: v }, [G]: h }], [G]: j }, { error: \"DualStack is enabled but this partition does not support DualStack\", [G]: k }], [G]: j }, w, { endpoint: { url: i, properties: v, headers: v }, [G]: h }], [G]: j }], [G]: j }, { error: \"Invalid Configuration: Missing Region\", [G]: k }] };\nexports.ruleSet = _data;\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar index_exports = {};\n__export(index_exports, {\n AssumeRoleCommand: () => AssumeRoleCommand,\n AssumeRoleResponseFilterSensitiveLog: () => AssumeRoleResponseFilterSensitiveLog,\n AssumeRoleWithSAMLCommand: () => AssumeRoleWithSAMLCommand,\n AssumeRoleWithSAMLRequestFilterSensitiveLog: () => AssumeRoleWithSAMLRequestFilterSensitiveLog,\n AssumeRoleWithSAMLResponseFilterSensitiveLog: () => AssumeRoleWithSAMLResponseFilterSensitiveLog,\n AssumeRoleWithWebIdentityCommand: () => AssumeRoleWithWebIdentityCommand,\n AssumeRoleWithWebIdentityRequestFilterSensitiveLog: () => AssumeRoleWithWebIdentityRequestFilterSensitiveLog,\n AssumeRoleWithWebIdentityResponseFilterSensitiveLog: () => AssumeRoleWithWebIdentityResponseFilterSensitiveLog,\n AssumeRootCommand: () => AssumeRootCommand,\n AssumeRootResponseFilterSensitiveLog: () => AssumeRootResponseFilterSensitiveLog,\n ClientInputEndpointParameters: () => import_EndpointParameters10.ClientInputEndpointParameters,\n CredentialsFilterSensitiveLog: () => CredentialsFilterSensitiveLog,\n DecodeAuthorizationMessageCommand: () => DecodeAuthorizationMessageCommand,\n ExpiredTokenException: () => ExpiredTokenException,\n GetAccessKeyInfoCommand: () => GetAccessKeyInfoCommand,\n GetCallerIdentityCommand: () => GetCallerIdentityCommand,\n GetFederationTokenCommand: () => GetFederationTokenCommand,\n GetFederationTokenResponseFilterSensitiveLog: () => GetFederationTokenResponseFilterSensitiveLog,\n GetSessionTokenCommand: () => GetSessionTokenCommand,\n GetSessionTokenResponseFilterSensitiveLog: () => GetSessionTokenResponseFilterSensitiveLog,\n IDPCommunicationErrorException: () => IDPCommunicationErrorException,\n IDPRejectedClaimException: () => IDPRejectedClaimException,\n InvalidAuthorizationMessageException: () => InvalidAuthorizationMessageException,\n InvalidIdentityTokenException: () => InvalidIdentityTokenException,\n MalformedPolicyDocumentException: () => MalformedPolicyDocumentException,\n PackedPolicyTooLargeException: () => PackedPolicyTooLargeException,\n RegionDisabledException: () => RegionDisabledException,\n STS: () => STS,\n STSServiceException: () => STSServiceException,\n decorateDefaultCredentialProvider: () => decorateDefaultCredentialProvider,\n getDefaultRoleAssumer: () => getDefaultRoleAssumer2,\n getDefaultRoleAssumerWithWebIdentity: () => getDefaultRoleAssumerWithWebIdentity2\n});\nmodule.exports = __toCommonJS(index_exports);\n__reExport(index_exports, require(\"././STSClient\"), module.exports);\n\n// src/STS.ts\n\n\n// src/commands/AssumeRoleCommand.ts\nvar import_middleware_endpoint = require(\"@smithy/middleware-endpoint\");\nvar import_middleware_serde = require(\"@smithy/middleware-serde\");\n\nvar import_EndpointParameters = require(\"./endpoint/EndpointParameters\");\n\n// src/models/models_0.ts\n\n\n// src/models/STSServiceException.ts\nvar import_smithy_client = require(\"@smithy/smithy-client\");\nvar STSServiceException = class _STSServiceException extends import_smithy_client.ServiceException {\n static {\n __name(this, \"STSServiceException\");\n }\n /**\n * @internal\n */\n constructor(options) {\n super(options);\n Object.setPrototypeOf(this, _STSServiceException.prototype);\n }\n};\n\n// src/models/models_0.ts\nvar ExpiredTokenException = class _ExpiredTokenException extends STSServiceException {\n static {\n __name(this, \"ExpiredTokenException\");\n }\n name = \"ExpiredTokenException\";\n $fault = \"client\";\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"ExpiredTokenException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _ExpiredTokenException.prototype);\n }\n};\nvar MalformedPolicyDocumentException = class _MalformedPolicyDocumentException extends STSServiceException {\n static {\n __name(this, \"MalformedPolicyDocumentException\");\n }\n name = \"MalformedPolicyDocumentException\";\n $fault = \"client\";\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"MalformedPolicyDocumentException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _MalformedPolicyDocumentException.prototype);\n }\n};\nvar PackedPolicyTooLargeException = class _PackedPolicyTooLargeException extends STSServiceException {\n static {\n __name(this, \"PackedPolicyTooLargeException\");\n }\n name = \"PackedPolicyTooLargeException\";\n $fault = \"client\";\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"PackedPolicyTooLargeException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _PackedPolicyTooLargeException.prototype);\n }\n};\nvar RegionDisabledException = class _RegionDisabledException extends STSServiceException {\n static {\n __name(this, \"RegionDisabledException\");\n }\n name = \"RegionDisabledException\";\n $fault = \"client\";\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"RegionDisabledException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _RegionDisabledException.prototype);\n }\n};\nvar IDPRejectedClaimException = class _IDPRejectedClaimException extends STSServiceException {\n static {\n __name(this, \"IDPRejectedClaimException\");\n }\n name = \"IDPRejectedClaimException\";\n $fault = \"client\";\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"IDPRejectedClaimException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _IDPRejectedClaimException.prototype);\n }\n};\nvar InvalidIdentityTokenException = class _InvalidIdentityTokenException extends STSServiceException {\n static {\n __name(this, \"InvalidIdentityTokenException\");\n }\n name = \"InvalidIdentityTokenException\";\n $fault = \"client\";\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"InvalidIdentityTokenException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _InvalidIdentityTokenException.prototype);\n }\n};\nvar IDPCommunicationErrorException = class _IDPCommunicationErrorException extends STSServiceException {\n static {\n __name(this, \"IDPCommunicationErrorException\");\n }\n name = \"IDPCommunicationErrorException\";\n $fault = \"client\";\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"IDPCommunicationErrorException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _IDPCommunicationErrorException.prototype);\n }\n};\nvar InvalidAuthorizationMessageException = class _InvalidAuthorizationMessageException extends STSServiceException {\n static {\n __name(this, \"InvalidAuthorizationMessageException\");\n }\n name = \"InvalidAuthorizationMessageException\";\n $fault = \"client\";\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"InvalidAuthorizationMessageException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _InvalidAuthorizationMessageException.prototype);\n }\n};\nvar CredentialsFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.SecretAccessKey && { SecretAccessKey: import_smithy_client.SENSITIVE_STRING }\n}), \"CredentialsFilterSensitiveLog\");\nvar AssumeRoleResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) }\n}), \"AssumeRoleResponseFilterSensitiveLog\");\nvar AssumeRoleWithSAMLRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.SAMLAssertion && { SAMLAssertion: import_smithy_client.SENSITIVE_STRING }\n}), \"AssumeRoleWithSAMLRequestFilterSensitiveLog\");\nvar AssumeRoleWithSAMLResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) }\n}), \"AssumeRoleWithSAMLResponseFilterSensitiveLog\");\nvar AssumeRoleWithWebIdentityRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.WebIdentityToken && { WebIdentityToken: import_smithy_client.SENSITIVE_STRING }\n}), \"AssumeRoleWithWebIdentityRequestFilterSensitiveLog\");\nvar AssumeRoleWithWebIdentityResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) }\n}), \"AssumeRoleWithWebIdentityResponseFilterSensitiveLog\");\nvar AssumeRootResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) }\n}), \"AssumeRootResponseFilterSensitiveLog\");\nvar GetFederationTokenResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) }\n}), \"GetFederationTokenResponseFilterSensitiveLog\");\nvar GetSessionTokenResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) }\n}), \"GetSessionTokenResponseFilterSensitiveLog\");\n\n// src/protocols/Aws_query.ts\nvar import_core = require(\"@aws-sdk/core\");\nvar import_protocol_http = require(\"@smithy/protocol-http\");\n\nvar se_AssumeRoleCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_AssumeRoleRequest(input, context),\n [_A]: _AR,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_AssumeRoleCommand\");\nvar se_AssumeRoleWithSAMLCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_AssumeRoleWithSAMLRequest(input, context),\n [_A]: _ARWSAML,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_AssumeRoleWithSAMLCommand\");\nvar se_AssumeRoleWithWebIdentityCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_AssumeRoleWithWebIdentityRequest(input, context),\n [_A]: _ARWWI,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_AssumeRoleWithWebIdentityCommand\");\nvar se_AssumeRootCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_AssumeRootRequest(input, context),\n [_A]: _ARs,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_AssumeRootCommand\");\nvar se_DecodeAuthorizationMessageCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_DecodeAuthorizationMessageRequest(input, context),\n [_A]: _DAM,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DecodeAuthorizationMessageCommand\");\nvar se_GetAccessKeyInfoCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_GetAccessKeyInfoRequest(input, context),\n [_A]: _GAKI,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_GetAccessKeyInfoCommand\");\nvar se_GetCallerIdentityCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_GetCallerIdentityRequest(input, context),\n [_A]: _GCI,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_GetCallerIdentityCommand\");\nvar se_GetFederationTokenCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_GetFederationTokenRequest(input, context),\n [_A]: _GFT,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_GetFederationTokenCommand\");\nvar se_GetSessionTokenCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_GetSessionTokenRequest(input, context),\n [_A]: _GST,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_GetSessionTokenCommand\");\nvar de_AssumeRoleCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_AssumeRoleResponse(data.AssumeRoleResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_AssumeRoleCommand\");\nvar de_AssumeRoleWithSAMLCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_AssumeRoleWithSAMLResponse(data.AssumeRoleWithSAMLResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_AssumeRoleWithSAMLCommand\");\nvar de_AssumeRoleWithWebIdentityCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_AssumeRoleWithWebIdentityResponse(data.AssumeRoleWithWebIdentityResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_AssumeRoleWithWebIdentityCommand\");\nvar de_AssumeRootCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_AssumeRootResponse(data.AssumeRootResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_AssumeRootCommand\");\nvar de_DecodeAuthorizationMessageCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_DecodeAuthorizationMessageResponse(data.DecodeAuthorizationMessageResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_DecodeAuthorizationMessageCommand\");\nvar de_GetAccessKeyInfoCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_GetAccessKeyInfoResponse(data.GetAccessKeyInfoResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_GetAccessKeyInfoCommand\");\nvar de_GetCallerIdentityCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_GetCallerIdentityResponse(data.GetCallerIdentityResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_GetCallerIdentityCommand\");\nvar de_GetFederationTokenCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_GetFederationTokenResponse(data.GetFederationTokenResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_GetFederationTokenCommand\");\nvar de_GetSessionTokenCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_GetSessionTokenResponse(data.GetSessionTokenResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_GetSessionTokenCommand\");\nvar de_CommandError = /* @__PURE__ */ __name(async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await (0, import_core.parseXmlErrorBody)(output.body, context)\n };\n const errorCode = loadQueryErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"ExpiredTokenException\":\n case \"com.amazonaws.sts#ExpiredTokenException\":\n throw await de_ExpiredTokenExceptionRes(parsedOutput, context);\n case \"MalformedPolicyDocument\":\n case \"com.amazonaws.sts#MalformedPolicyDocumentException\":\n throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput, context);\n case \"PackedPolicyTooLarge\":\n case \"com.amazonaws.sts#PackedPolicyTooLargeException\":\n throw await de_PackedPolicyTooLargeExceptionRes(parsedOutput, context);\n case \"RegionDisabledException\":\n case \"com.amazonaws.sts#RegionDisabledException\":\n throw await de_RegionDisabledExceptionRes(parsedOutput, context);\n case \"IDPRejectedClaim\":\n case \"com.amazonaws.sts#IDPRejectedClaimException\":\n throw await de_IDPRejectedClaimExceptionRes(parsedOutput, context);\n case \"InvalidIdentityToken\":\n case \"com.amazonaws.sts#InvalidIdentityTokenException\":\n throw await de_InvalidIdentityTokenExceptionRes(parsedOutput, context);\n case \"IDPCommunicationError\":\n case \"com.amazonaws.sts#IDPCommunicationErrorException\":\n throw await de_IDPCommunicationErrorExceptionRes(parsedOutput, context);\n case \"InvalidAuthorizationMessageException\":\n case \"com.amazonaws.sts#InvalidAuthorizationMessageException\":\n throw await de_InvalidAuthorizationMessageExceptionRes(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n return throwDefaultError({\n output,\n parsedBody: parsedBody.Error,\n errorCode\n });\n }\n}, \"de_CommandError\");\nvar de_ExpiredTokenExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_ExpiredTokenException(body.Error, context);\n const exception = new ExpiredTokenException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_ExpiredTokenExceptionRes\");\nvar de_IDPCommunicationErrorExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_IDPCommunicationErrorException(body.Error, context);\n const exception = new IDPCommunicationErrorException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_IDPCommunicationErrorExceptionRes\");\nvar de_IDPRejectedClaimExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_IDPRejectedClaimException(body.Error, context);\n const exception = new IDPRejectedClaimException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_IDPRejectedClaimExceptionRes\");\nvar de_InvalidAuthorizationMessageExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_InvalidAuthorizationMessageException(body.Error, context);\n const exception = new InvalidAuthorizationMessageException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_InvalidAuthorizationMessageExceptionRes\");\nvar de_InvalidIdentityTokenExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_InvalidIdentityTokenException(body.Error, context);\n const exception = new InvalidIdentityTokenException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_InvalidIdentityTokenExceptionRes\");\nvar de_MalformedPolicyDocumentExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_MalformedPolicyDocumentException(body.Error, context);\n const exception = new MalformedPolicyDocumentException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_MalformedPolicyDocumentExceptionRes\");\nvar de_PackedPolicyTooLargeExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_PackedPolicyTooLargeException(body.Error, context);\n const exception = new PackedPolicyTooLargeException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_PackedPolicyTooLargeExceptionRes\");\nvar de_RegionDisabledExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_RegionDisabledException(body.Error, context);\n const exception = new RegionDisabledException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_RegionDisabledExceptionRes\");\nvar se_AssumeRoleRequest = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_RA] != null) {\n entries[_RA] = input[_RA];\n }\n if (input[_RSN] != null) {\n entries[_RSN] = input[_RSN];\n }\n if (input[_PA] != null) {\n const memberEntries = se_policyDescriptorListType(input[_PA], context);\n if (input[_PA]?.length === 0) {\n entries.PolicyArns = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `PolicyArns.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_P] != null) {\n entries[_P] = input[_P];\n }\n if (input[_DS] != null) {\n entries[_DS] = input[_DS];\n }\n if (input[_T] != null) {\n const memberEntries = se_tagListType(input[_T], context);\n if (input[_T]?.length === 0) {\n entries.Tags = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Tags.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_TTK] != null) {\n const memberEntries = se_tagKeyListType(input[_TTK], context);\n if (input[_TTK]?.length === 0) {\n entries.TransitiveTagKeys = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `TransitiveTagKeys.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_EI] != null) {\n entries[_EI] = input[_EI];\n }\n if (input[_SN] != null) {\n entries[_SN] = input[_SN];\n }\n if (input[_TC] != null) {\n entries[_TC] = input[_TC];\n }\n if (input[_SI] != null) {\n entries[_SI] = input[_SI];\n }\n if (input[_PC] != null) {\n const memberEntries = se_ProvidedContextsListType(input[_PC], context);\n if (input[_PC]?.length === 0) {\n entries.ProvidedContexts = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `ProvidedContexts.${key}`;\n entries[loc] = value;\n });\n }\n return entries;\n}, \"se_AssumeRoleRequest\");\nvar se_AssumeRoleWithSAMLRequest = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_RA] != null) {\n entries[_RA] = input[_RA];\n }\n if (input[_PAr] != null) {\n entries[_PAr] = input[_PAr];\n }\n if (input[_SAMLA] != null) {\n entries[_SAMLA] = input[_SAMLA];\n }\n if (input[_PA] != null) {\n const memberEntries = se_policyDescriptorListType(input[_PA], context);\n if (input[_PA]?.length === 0) {\n entries.PolicyArns = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `PolicyArns.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_P] != null) {\n entries[_P] = input[_P];\n }\n if (input[_DS] != null) {\n entries[_DS] = input[_DS];\n }\n return entries;\n}, \"se_AssumeRoleWithSAMLRequest\");\nvar se_AssumeRoleWithWebIdentityRequest = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_RA] != null) {\n entries[_RA] = input[_RA];\n }\n if (input[_RSN] != null) {\n entries[_RSN] = input[_RSN];\n }\n if (input[_WIT] != null) {\n entries[_WIT] = input[_WIT];\n }\n if (input[_PI] != null) {\n entries[_PI] = input[_PI];\n }\n if (input[_PA] != null) {\n const memberEntries = se_policyDescriptorListType(input[_PA], context);\n if (input[_PA]?.length === 0) {\n entries.PolicyArns = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `PolicyArns.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_P] != null) {\n entries[_P] = input[_P];\n }\n if (input[_DS] != null) {\n entries[_DS] = input[_DS];\n }\n return entries;\n}, \"se_AssumeRoleWithWebIdentityRequest\");\nvar se_AssumeRootRequest = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_TP] != null) {\n entries[_TP] = input[_TP];\n }\n if (input[_TPA] != null) {\n const memberEntries = se_PolicyDescriptorType(input[_TPA], context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `TaskPolicyArn.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_DS] != null) {\n entries[_DS] = input[_DS];\n }\n return entries;\n}, \"se_AssumeRootRequest\");\nvar se_DecodeAuthorizationMessageRequest = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_EM] != null) {\n entries[_EM] = input[_EM];\n }\n return entries;\n}, \"se_DecodeAuthorizationMessageRequest\");\nvar se_GetAccessKeyInfoRequest = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_AKI] != null) {\n entries[_AKI] = input[_AKI];\n }\n return entries;\n}, \"se_GetAccessKeyInfoRequest\");\nvar se_GetCallerIdentityRequest = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n return entries;\n}, \"se_GetCallerIdentityRequest\");\nvar se_GetFederationTokenRequest = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_N] != null) {\n entries[_N] = input[_N];\n }\n if (input[_P] != null) {\n entries[_P] = input[_P];\n }\n if (input[_PA] != null) {\n const memberEntries = se_policyDescriptorListType(input[_PA], context);\n if (input[_PA]?.length === 0) {\n entries.PolicyArns = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `PolicyArns.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_DS] != null) {\n entries[_DS] = input[_DS];\n }\n if (input[_T] != null) {\n const memberEntries = se_tagListType(input[_T], context);\n if (input[_T]?.length === 0) {\n entries.Tags = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Tags.${key}`;\n entries[loc] = value;\n });\n }\n return entries;\n}, \"se_GetFederationTokenRequest\");\nvar se_GetSessionTokenRequest = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_DS] != null) {\n entries[_DS] = input[_DS];\n }\n if (input[_SN] != null) {\n entries[_SN] = input[_SN];\n }\n if (input[_TC] != null) {\n entries[_TC] = input[_TC];\n }\n return entries;\n}, \"se_GetSessionTokenRequest\");\nvar se_policyDescriptorListType = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n const memberEntries = se_PolicyDescriptorType(entry, context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n entries[`member.${counter}.${key}`] = value;\n });\n counter++;\n }\n return entries;\n}, \"se_policyDescriptorListType\");\nvar se_PolicyDescriptorType = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_a] != null) {\n entries[_a] = input[_a];\n }\n return entries;\n}, \"se_PolicyDescriptorType\");\nvar se_ProvidedContext = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_PAro] != null) {\n entries[_PAro] = input[_PAro];\n }\n if (input[_CA] != null) {\n entries[_CA] = input[_CA];\n }\n return entries;\n}, \"se_ProvidedContext\");\nvar se_ProvidedContextsListType = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n const memberEntries = se_ProvidedContext(entry, context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n entries[`member.${counter}.${key}`] = value;\n });\n counter++;\n }\n return entries;\n}, \"se_ProvidedContextsListType\");\nvar se_Tag = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_K] != null) {\n entries[_K] = input[_K];\n }\n if (input[_Va] != null) {\n entries[_Va] = input[_Va];\n }\n return entries;\n}, \"se_Tag\");\nvar se_tagKeyListType = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n entries[`member.${counter}`] = entry;\n counter++;\n }\n return entries;\n}, \"se_tagKeyListType\");\nvar se_tagListType = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n const memberEntries = se_Tag(entry, context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n entries[`member.${counter}.${key}`] = value;\n });\n counter++;\n }\n return entries;\n}, \"se_tagListType\");\nvar de_AssumedRoleUser = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_ARI] != null) {\n contents[_ARI] = (0, import_smithy_client.expectString)(output[_ARI]);\n }\n if (output[_Ar] != null) {\n contents[_Ar] = (0, import_smithy_client.expectString)(output[_Ar]);\n }\n return contents;\n}, \"de_AssumedRoleUser\");\nvar de_AssumeRoleResponse = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_C] != null) {\n contents[_C] = de_Credentials(output[_C], context);\n }\n if (output[_ARU] != null) {\n contents[_ARU] = de_AssumedRoleUser(output[_ARU], context);\n }\n if (output[_PPS] != null) {\n contents[_PPS] = (0, import_smithy_client.strictParseInt32)(output[_PPS]);\n }\n if (output[_SI] != null) {\n contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);\n }\n return contents;\n}, \"de_AssumeRoleResponse\");\nvar de_AssumeRoleWithSAMLResponse = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_C] != null) {\n contents[_C] = de_Credentials(output[_C], context);\n }\n if (output[_ARU] != null) {\n contents[_ARU] = de_AssumedRoleUser(output[_ARU], context);\n }\n if (output[_PPS] != null) {\n contents[_PPS] = (0, import_smithy_client.strictParseInt32)(output[_PPS]);\n }\n if (output[_S] != null) {\n contents[_S] = (0, import_smithy_client.expectString)(output[_S]);\n }\n if (output[_ST] != null) {\n contents[_ST] = (0, import_smithy_client.expectString)(output[_ST]);\n }\n if (output[_I] != null) {\n contents[_I] = (0, import_smithy_client.expectString)(output[_I]);\n }\n if (output[_Au] != null) {\n contents[_Au] = (0, import_smithy_client.expectString)(output[_Au]);\n }\n if (output[_NQ] != null) {\n contents[_NQ] = (0, import_smithy_client.expectString)(output[_NQ]);\n }\n if (output[_SI] != null) {\n contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);\n }\n return contents;\n}, \"de_AssumeRoleWithSAMLResponse\");\nvar de_AssumeRoleWithWebIdentityResponse = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_C] != null) {\n contents[_C] = de_Credentials(output[_C], context);\n }\n if (output[_SFWIT] != null) {\n contents[_SFWIT] = (0, import_smithy_client.expectString)(output[_SFWIT]);\n }\n if (output[_ARU] != null) {\n contents[_ARU] = de_AssumedRoleUser(output[_ARU], context);\n }\n if (output[_PPS] != null) {\n contents[_PPS] = (0, import_smithy_client.strictParseInt32)(output[_PPS]);\n }\n if (output[_Pr] != null) {\n contents[_Pr] = (0, import_smithy_client.expectString)(output[_Pr]);\n }\n if (output[_Au] != null) {\n contents[_Au] = (0, import_smithy_client.expectString)(output[_Au]);\n }\n if (output[_SI] != null) {\n contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);\n }\n return contents;\n}, \"de_AssumeRoleWithWebIdentityResponse\");\nvar de_AssumeRootResponse = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_C] != null) {\n contents[_C] = de_Credentials(output[_C], context);\n }\n if (output[_SI] != null) {\n contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);\n }\n return contents;\n}, \"de_AssumeRootResponse\");\nvar de_Credentials = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_AKI] != null) {\n contents[_AKI] = (0, import_smithy_client.expectString)(output[_AKI]);\n }\n if (output[_SAK] != null) {\n contents[_SAK] = (0, import_smithy_client.expectString)(output[_SAK]);\n }\n if (output[_STe] != null) {\n contents[_STe] = (0, import_smithy_client.expectString)(output[_STe]);\n }\n if (output[_E] != null) {\n contents[_E] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_E]));\n }\n return contents;\n}, \"de_Credentials\");\nvar de_DecodeAuthorizationMessageResponse = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_DM] != null) {\n contents[_DM] = (0, import_smithy_client.expectString)(output[_DM]);\n }\n return contents;\n}, \"de_DecodeAuthorizationMessageResponse\");\nvar de_ExpiredTokenException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_m] != null) {\n contents[_m] = (0, import_smithy_client.expectString)(output[_m]);\n }\n return contents;\n}, \"de_ExpiredTokenException\");\nvar de_FederatedUser = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_FUI] != null) {\n contents[_FUI] = (0, import_smithy_client.expectString)(output[_FUI]);\n }\n if (output[_Ar] != null) {\n contents[_Ar] = (0, import_smithy_client.expectString)(output[_Ar]);\n }\n return contents;\n}, \"de_FederatedUser\");\nvar de_GetAccessKeyInfoResponse = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_Ac] != null) {\n contents[_Ac] = (0, import_smithy_client.expectString)(output[_Ac]);\n }\n return contents;\n}, \"de_GetAccessKeyInfoResponse\");\nvar de_GetCallerIdentityResponse = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_UI] != null) {\n contents[_UI] = (0, import_smithy_client.expectString)(output[_UI]);\n }\n if (output[_Ac] != null) {\n contents[_Ac] = (0, import_smithy_client.expectString)(output[_Ac]);\n }\n if (output[_Ar] != null) {\n contents[_Ar] = (0, import_smithy_client.expectString)(output[_Ar]);\n }\n return contents;\n}, \"de_GetCallerIdentityResponse\");\nvar de_GetFederationTokenResponse = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_C] != null) {\n contents[_C] = de_Credentials(output[_C], context);\n }\n if (output[_FU] != null) {\n contents[_FU] = de_FederatedUser(output[_FU], context);\n }\n if (output[_PPS] != null) {\n contents[_PPS] = (0, import_smithy_client.strictParseInt32)(output[_PPS]);\n }\n return contents;\n}, \"de_GetFederationTokenResponse\");\nvar de_GetSessionTokenResponse = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_C] != null) {\n contents[_C] = de_Credentials(output[_C], context);\n }\n return contents;\n}, \"de_GetSessionTokenResponse\");\nvar de_IDPCommunicationErrorException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_m] != null) {\n contents[_m] = (0, import_smithy_client.expectString)(output[_m]);\n }\n return contents;\n}, \"de_IDPCommunicationErrorException\");\nvar de_IDPRejectedClaimException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_m] != null) {\n contents[_m] = (0, import_smithy_client.expectString)(output[_m]);\n }\n return contents;\n}, \"de_IDPRejectedClaimException\");\nvar de_InvalidAuthorizationMessageException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_m] != null) {\n contents[_m] = (0, import_smithy_client.expectString)(output[_m]);\n }\n return contents;\n}, \"de_InvalidAuthorizationMessageException\");\nvar de_InvalidIdentityTokenException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_m] != null) {\n contents[_m] = (0, import_smithy_client.expectString)(output[_m]);\n }\n return contents;\n}, \"de_InvalidIdentityTokenException\");\nvar de_MalformedPolicyDocumentException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_m] != null) {\n contents[_m] = (0, import_smithy_client.expectString)(output[_m]);\n }\n return contents;\n}, \"de_MalformedPolicyDocumentException\");\nvar de_PackedPolicyTooLargeException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_m] != null) {\n contents[_m] = (0, import_smithy_client.expectString)(output[_m]);\n }\n return contents;\n}, \"de_PackedPolicyTooLargeException\");\nvar de_RegionDisabledException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_m] != null) {\n contents[_m] = (0, import_smithy_client.expectString)(output[_m]);\n }\n return contents;\n}, \"de_RegionDisabledException\");\nvar deserializeMetadata = /* @__PURE__ */ __name((output) => ({\n httpStatusCode: output.statusCode,\n requestId: output.headers[\"x-amzn-requestid\"] ?? output.headers[\"x-amzn-request-id\"] ?? output.headers[\"x-amz-request-id\"],\n extendedRequestId: output.headers[\"x-amz-id-2\"],\n cfId: output.headers[\"x-amz-cf-id\"]\n}), \"deserializeMetadata\");\nvar throwDefaultError = (0, import_smithy_client.withBaseException)(STSServiceException);\nvar buildHttpRpcRequest = /* @__PURE__ */ __name(async (context, headers, path, resolvedHostname, body) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const contents = {\n protocol,\n hostname,\n port,\n method: \"POST\",\n path: basePath.endsWith(\"/\") ? basePath.slice(0, -1) + path : basePath + path,\n headers\n };\n if (resolvedHostname !== void 0) {\n contents.hostname = resolvedHostname;\n }\n if (body !== void 0) {\n contents.body = body;\n }\n return new import_protocol_http.HttpRequest(contents);\n}, \"buildHttpRpcRequest\");\nvar SHARED_HEADERS = {\n \"content-type\": \"application/x-www-form-urlencoded\"\n};\nvar _ = \"2011-06-15\";\nvar _A = \"Action\";\nvar _AKI = \"AccessKeyId\";\nvar _AR = \"AssumeRole\";\nvar _ARI = \"AssumedRoleId\";\nvar _ARU = \"AssumedRoleUser\";\nvar _ARWSAML = \"AssumeRoleWithSAML\";\nvar _ARWWI = \"AssumeRoleWithWebIdentity\";\nvar _ARs = \"AssumeRoot\";\nvar _Ac = \"Account\";\nvar _Ar = \"Arn\";\nvar _Au = \"Audience\";\nvar _C = \"Credentials\";\nvar _CA = \"ContextAssertion\";\nvar _DAM = \"DecodeAuthorizationMessage\";\nvar _DM = \"DecodedMessage\";\nvar _DS = \"DurationSeconds\";\nvar _E = \"Expiration\";\nvar _EI = \"ExternalId\";\nvar _EM = \"EncodedMessage\";\nvar _FU = \"FederatedUser\";\nvar _FUI = \"FederatedUserId\";\nvar _GAKI = \"GetAccessKeyInfo\";\nvar _GCI = \"GetCallerIdentity\";\nvar _GFT = \"GetFederationToken\";\nvar _GST = \"GetSessionToken\";\nvar _I = \"Issuer\";\nvar _K = \"Key\";\nvar _N = \"Name\";\nvar _NQ = \"NameQualifier\";\nvar _P = \"Policy\";\nvar _PA = \"PolicyArns\";\nvar _PAr = \"PrincipalArn\";\nvar _PAro = \"ProviderArn\";\nvar _PC = \"ProvidedContexts\";\nvar _PI = \"ProviderId\";\nvar _PPS = \"PackedPolicySize\";\nvar _Pr = \"Provider\";\nvar _RA = \"RoleArn\";\nvar _RSN = \"RoleSessionName\";\nvar _S = \"Subject\";\nvar _SAK = \"SecretAccessKey\";\nvar _SAMLA = \"SAMLAssertion\";\nvar _SFWIT = \"SubjectFromWebIdentityToken\";\nvar _SI = \"SourceIdentity\";\nvar _SN = \"SerialNumber\";\nvar _ST = \"SubjectType\";\nvar _STe = \"SessionToken\";\nvar _T = \"Tags\";\nvar _TC = \"TokenCode\";\nvar _TP = \"TargetPrincipal\";\nvar _TPA = \"TaskPolicyArn\";\nvar _TTK = \"TransitiveTagKeys\";\nvar _UI = \"UserId\";\nvar _V = \"Version\";\nvar _Va = \"Value\";\nvar _WIT = \"WebIdentityToken\";\nvar _a = \"arn\";\nvar _m = \"message\";\nvar buildFormUrlencodedString = /* @__PURE__ */ __name((formEntries) => Object.entries(formEntries).map(([key, value]) => (0, import_smithy_client.extendedEncodeURIComponent)(key) + \"=\" + (0, import_smithy_client.extendedEncodeURIComponent)(value)).join(\"&\"), \"buildFormUrlencodedString\");\nvar loadQueryErrorCode = /* @__PURE__ */ __name((output, data) => {\n if (data.Error?.Code !== void 0) {\n return data.Error.Code;\n }\n if (output.statusCode == 404) {\n return \"NotFound\";\n }\n}, \"loadQueryErrorCode\");\n\n// src/commands/AssumeRoleCommand.ts\nvar AssumeRoleCommand = class extends import_smithy_client.Command.classBuilder().ep(import_EndpointParameters.commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSSecurityTokenServiceV20110615\", \"AssumeRole\", {}).n(\"STSClient\", \"AssumeRoleCommand\").f(void 0, AssumeRoleResponseFilterSensitiveLog).ser(se_AssumeRoleCommand).de(de_AssumeRoleCommand).build() {\n static {\n __name(this, \"AssumeRoleCommand\");\n }\n};\n\n// src/commands/AssumeRoleWithSAMLCommand.ts\n\n\n\nvar import_EndpointParameters2 = require(\"./endpoint/EndpointParameters\");\nvar AssumeRoleWithSAMLCommand = class extends import_smithy_client.Command.classBuilder().ep(import_EndpointParameters2.commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSSecurityTokenServiceV20110615\", \"AssumeRoleWithSAML\", {}).n(\"STSClient\", \"AssumeRoleWithSAMLCommand\").f(AssumeRoleWithSAMLRequestFilterSensitiveLog, AssumeRoleWithSAMLResponseFilterSensitiveLog).ser(se_AssumeRoleWithSAMLCommand).de(de_AssumeRoleWithSAMLCommand).build() {\n static {\n __name(this, \"AssumeRoleWithSAMLCommand\");\n }\n};\n\n// src/commands/AssumeRoleWithWebIdentityCommand.ts\n\n\n\nvar import_EndpointParameters3 = require(\"./endpoint/EndpointParameters\");\nvar AssumeRoleWithWebIdentityCommand = class extends import_smithy_client.Command.classBuilder().ep(import_EndpointParameters3.commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSSecurityTokenServiceV20110615\", \"AssumeRoleWithWebIdentity\", {}).n(\"STSClient\", \"AssumeRoleWithWebIdentityCommand\").f(AssumeRoleWithWebIdentityRequestFilterSensitiveLog, AssumeRoleWithWebIdentityResponseFilterSensitiveLog).ser(se_AssumeRoleWithWebIdentityCommand).de(de_AssumeRoleWithWebIdentityCommand).build() {\n static {\n __name(this, \"AssumeRoleWithWebIdentityCommand\");\n }\n};\n\n// src/commands/AssumeRootCommand.ts\n\n\n\nvar import_EndpointParameters4 = require(\"./endpoint/EndpointParameters\");\nvar AssumeRootCommand = class extends import_smithy_client.Command.classBuilder().ep(import_EndpointParameters4.commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSSecurityTokenServiceV20110615\", \"AssumeRoot\", {}).n(\"STSClient\", \"AssumeRootCommand\").f(void 0, AssumeRootResponseFilterSensitiveLog).ser(se_AssumeRootCommand).de(de_AssumeRootCommand).build() {\n static {\n __name(this, \"AssumeRootCommand\");\n }\n};\n\n// src/commands/DecodeAuthorizationMessageCommand.ts\n\n\n\nvar import_EndpointParameters5 = require(\"./endpoint/EndpointParameters\");\nvar DecodeAuthorizationMessageCommand = class extends import_smithy_client.Command.classBuilder().ep(import_EndpointParameters5.commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSSecurityTokenServiceV20110615\", \"DecodeAuthorizationMessage\", {}).n(\"STSClient\", \"DecodeAuthorizationMessageCommand\").f(void 0, void 0).ser(se_DecodeAuthorizationMessageCommand).de(de_DecodeAuthorizationMessageCommand).build() {\n static {\n __name(this, \"DecodeAuthorizationMessageCommand\");\n }\n};\n\n// src/commands/GetAccessKeyInfoCommand.ts\n\n\n\nvar import_EndpointParameters6 = require(\"./endpoint/EndpointParameters\");\nvar GetAccessKeyInfoCommand = class extends import_smithy_client.Command.classBuilder().ep(import_EndpointParameters6.commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSSecurityTokenServiceV20110615\", \"GetAccessKeyInfo\", {}).n(\"STSClient\", \"GetAccessKeyInfoCommand\").f(void 0, void 0).ser(se_GetAccessKeyInfoCommand).de(de_GetAccessKeyInfoCommand).build() {\n static {\n __name(this, \"GetAccessKeyInfoCommand\");\n }\n};\n\n// src/commands/GetCallerIdentityCommand.ts\n\n\n\nvar import_EndpointParameters7 = require(\"./endpoint/EndpointParameters\");\nvar GetCallerIdentityCommand = class extends import_smithy_client.Command.classBuilder().ep(import_EndpointParameters7.commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSSecurityTokenServiceV20110615\", \"GetCallerIdentity\", {}).n(\"STSClient\", \"GetCallerIdentityCommand\").f(void 0, void 0).ser(se_GetCallerIdentityCommand).de(de_GetCallerIdentityCommand).build() {\n static {\n __name(this, \"GetCallerIdentityCommand\");\n }\n};\n\n// src/commands/GetFederationTokenCommand.ts\n\n\n\nvar import_EndpointParameters8 = require(\"./endpoint/EndpointParameters\");\nvar GetFederationTokenCommand = class extends import_smithy_client.Command.classBuilder().ep(import_EndpointParameters8.commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSSecurityTokenServiceV20110615\", \"GetFederationToken\", {}).n(\"STSClient\", \"GetFederationTokenCommand\").f(void 0, GetFederationTokenResponseFilterSensitiveLog).ser(se_GetFederationTokenCommand).de(de_GetFederationTokenCommand).build() {\n static {\n __name(this, \"GetFederationTokenCommand\");\n }\n};\n\n// src/commands/GetSessionTokenCommand.ts\n\n\n\nvar import_EndpointParameters9 = require(\"./endpoint/EndpointParameters\");\nvar GetSessionTokenCommand = class extends import_smithy_client.Command.classBuilder().ep(import_EndpointParameters9.commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSSecurityTokenServiceV20110615\", \"GetSessionToken\", {}).n(\"STSClient\", \"GetSessionTokenCommand\").f(void 0, GetSessionTokenResponseFilterSensitiveLog).ser(se_GetSessionTokenCommand).de(de_GetSessionTokenCommand).build() {\n static {\n __name(this, \"GetSessionTokenCommand\");\n }\n};\n\n// src/STS.ts\nvar import_STSClient = require(\"././STSClient\");\nvar commands = {\n AssumeRoleCommand,\n AssumeRoleWithSAMLCommand,\n AssumeRoleWithWebIdentityCommand,\n AssumeRootCommand,\n DecodeAuthorizationMessageCommand,\n GetAccessKeyInfoCommand,\n GetCallerIdentityCommand,\n GetFederationTokenCommand,\n GetSessionTokenCommand\n};\nvar STS = class extends import_STSClient.STSClient {\n static {\n __name(this, \"STS\");\n }\n};\n(0, import_smithy_client.createAggregatedClient)(commands, STS);\n\n// src/index.ts\nvar import_EndpointParameters10 = require(\"./endpoint/EndpointParameters\");\n\n// src/defaultStsRoleAssumers.ts\nvar import_client = require(\"@aws-sdk/core/client\");\nvar ASSUME_ROLE_DEFAULT_REGION = \"us-east-1\";\nvar getAccountIdFromAssumedRoleUser = /* @__PURE__ */ __name((assumedRoleUser) => {\n if (typeof assumedRoleUser?.Arn === \"string\") {\n const arnComponents = assumedRoleUser.Arn.split(\":\");\n if (arnComponents.length > 4 && arnComponents[4] !== \"\") {\n return arnComponents[4];\n }\n }\n return void 0;\n}, \"getAccountIdFromAssumedRoleUser\");\nvar resolveRegion = /* @__PURE__ */ __name(async (_region, _parentRegion, credentialProviderLogger) => {\n const region = typeof _region === \"function\" ? await _region() : _region;\n const parentRegion = typeof _parentRegion === \"function\" ? await _parentRegion() : _parentRegion;\n credentialProviderLogger?.debug?.(\n \"@aws-sdk/client-sts::resolveRegion\",\n \"accepting first of:\",\n `${region} (provider)`,\n `${parentRegion} (parent client)`,\n `${ASSUME_ROLE_DEFAULT_REGION} (STS default)`\n );\n return region ?? parentRegion ?? ASSUME_ROLE_DEFAULT_REGION;\n}, \"resolveRegion\");\nvar getDefaultRoleAssumer = /* @__PURE__ */ __name((stsOptions, STSClient3) => {\n let stsClient;\n let closureSourceCreds;\n return async (sourceCreds, params) => {\n closureSourceCreds = sourceCreds;\n if (!stsClient) {\n const {\n logger = stsOptions?.parentClientConfig?.logger,\n region,\n requestHandler = stsOptions?.parentClientConfig?.requestHandler,\n credentialProviderLogger\n } = stsOptions;\n const resolvedRegion = await resolveRegion(\n region,\n stsOptions?.parentClientConfig?.region,\n credentialProviderLogger\n );\n const isCompatibleRequestHandler = !isH2(requestHandler);\n stsClient = new STSClient3({\n profile: stsOptions?.parentClientConfig?.profile,\n // A hack to make sts client uses the credential in current closure.\n credentialDefaultProvider: /* @__PURE__ */ __name(() => async () => closureSourceCreds, \"credentialDefaultProvider\"),\n region: resolvedRegion,\n requestHandler: isCompatibleRequestHandler ? requestHandler : void 0,\n logger\n });\n }\n const { Credentials: Credentials2, AssumedRoleUser: AssumedRoleUser2 } = await stsClient.send(new AssumeRoleCommand(params));\n if (!Credentials2 || !Credentials2.AccessKeyId || !Credentials2.SecretAccessKey) {\n throw new Error(`Invalid response from STS.assumeRole call with role ${params.RoleArn}`);\n }\n const accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser2);\n const credentials = {\n accessKeyId: Credentials2.AccessKeyId,\n secretAccessKey: Credentials2.SecretAccessKey,\n sessionToken: Credentials2.SessionToken,\n expiration: Credentials2.Expiration,\n // TODO(credentialScope): access normally when shape is updated.\n ...Credentials2.CredentialScope && { credentialScope: Credentials2.CredentialScope },\n ...accountId && { accountId }\n };\n (0, import_client.setCredentialFeature)(credentials, \"CREDENTIALS_STS_ASSUME_ROLE\", \"i\");\n return credentials;\n };\n}, \"getDefaultRoleAssumer\");\nvar getDefaultRoleAssumerWithWebIdentity = /* @__PURE__ */ __name((stsOptions, STSClient3) => {\n let stsClient;\n return async (params) => {\n if (!stsClient) {\n const {\n logger = stsOptions?.parentClientConfig?.logger,\n region,\n requestHandler = stsOptions?.parentClientConfig?.requestHandler,\n credentialProviderLogger\n } = stsOptions;\n const resolvedRegion = await resolveRegion(\n region,\n stsOptions?.parentClientConfig?.region,\n credentialProviderLogger\n );\n const isCompatibleRequestHandler = !isH2(requestHandler);\n stsClient = new STSClient3({\n profile: stsOptions?.parentClientConfig?.profile,\n region: resolvedRegion,\n requestHandler: isCompatibleRequestHandler ? requestHandler : void 0,\n logger\n });\n }\n const { Credentials: Credentials2, AssumedRoleUser: AssumedRoleUser2 } = await stsClient.send(new AssumeRoleWithWebIdentityCommand(params));\n if (!Credentials2 || !Credentials2.AccessKeyId || !Credentials2.SecretAccessKey) {\n throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${params.RoleArn}`);\n }\n const accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser2);\n const credentials = {\n accessKeyId: Credentials2.AccessKeyId,\n secretAccessKey: Credentials2.SecretAccessKey,\n sessionToken: Credentials2.SessionToken,\n expiration: Credentials2.Expiration,\n // TODO(credentialScope): access normally when shape is updated.\n ...Credentials2.CredentialScope && { credentialScope: Credentials2.CredentialScope },\n ...accountId && { accountId }\n };\n if (accountId) {\n (0, import_client.setCredentialFeature)(credentials, \"RESOLVED_ACCOUNT_ID\", \"T\");\n }\n (0, import_client.setCredentialFeature)(credentials, \"CREDENTIALS_STS_ASSUME_ROLE_WEB_ID\", \"k\");\n return credentials;\n };\n}, \"getDefaultRoleAssumerWithWebIdentity\");\nvar isH2 = /* @__PURE__ */ __name((requestHandler) => {\n return requestHandler?.metadata?.handlerProtocol === \"h2\";\n}, \"isH2\");\n\n// src/defaultRoleAssumers.ts\nvar import_STSClient2 = require(\"././STSClient\");\nvar getCustomizableStsClientCtor = /* @__PURE__ */ __name((baseCtor, customizations) => {\n if (!customizations) return baseCtor;\n else\n return class CustomizableSTSClient extends baseCtor {\n static {\n __name(this, \"CustomizableSTSClient\");\n }\n constructor(config) {\n super(config);\n for (const customization of customizations) {\n this.middlewareStack.use(customization);\n }\n }\n };\n}, \"getCustomizableStsClientCtor\");\nvar getDefaultRoleAssumer2 = /* @__PURE__ */ __name((stsOptions = {}, stsPlugins) => getDefaultRoleAssumer(stsOptions, getCustomizableStsClientCtor(import_STSClient2.STSClient, stsPlugins)), \"getDefaultRoleAssumer\");\nvar getDefaultRoleAssumerWithWebIdentity2 = /* @__PURE__ */ __name((stsOptions = {}, stsPlugins) => getDefaultRoleAssumerWithWebIdentity(stsOptions, getCustomizableStsClientCtor(import_STSClient2.STSClient, stsPlugins)), \"getDefaultRoleAssumerWithWebIdentity\");\nvar decorateDefaultCredentialProvider = /* @__PURE__ */ __name((provider) => (input) => provider({\n roleAssumer: getDefaultRoleAssumer2(input),\n roleAssumerWithWebIdentity: getDefaultRoleAssumerWithWebIdentity2(input),\n ...input\n}), \"decorateDefaultCredentialProvider\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n STSServiceException,\n __Client,\n STSClient,\n STS,\n $Command,\n AssumeRoleCommand,\n AssumeRoleWithSAMLCommand,\n AssumeRoleWithWebIdentityCommand,\n AssumeRootCommand,\n DecodeAuthorizationMessageCommand,\n GetAccessKeyInfoCommand,\n GetCallerIdentityCommand,\n GetFederationTokenCommand,\n GetSessionTokenCommand,\n ExpiredTokenException,\n MalformedPolicyDocumentException,\n PackedPolicyTooLargeException,\n RegionDisabledException,\n IDPRejectedClaimException,\n InvalidIdentityTokenException,\n IDPCommunicationErrorException,\n InvalidAuthorizationMessageException,\n CredentialsFilterSensitiveLog,\n AssumeRoleResponseFilterSensitiveLog,\n AssumeRoleWithSAMLRequestFilterSensitiveLog,\n AssumeRoleWithSAMLResponseFilterSensitiveLog,\n AssumeRoleWithWebIdentityRequestFilterSensitiveLog,\n AssumeRoleWithWebIdentityResponseFilterSensitiveLog,\n AssumeRootResponseFilterSensitiveLog,\n GetFederationTokenResponseFilterSensitiveLog,\n GetSessionTokenResponseFilterSensitiveLog,\n getDefaultRoleAssumer,\n getDefaultRoleAssumerWithWebIdentity,\n decorateDefaultCredentialProvider\n});\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getRuntimeConfig = void 0;\nconst tslib_1 = require(\"tslib\");\nconst package_json_1 = tslib_1.__importDefault(require(\"../package.json\"));\nconst core_1 = require(\"@aws-sdk/core\");\nconst credential_provider_node_1 = require(\"@aws-sdk/credential-provider-node\");\nconst util_user_agent_node_1 = require(\"@aws-sdk/util-user-agent-node\");\nconst config_resolver_1 = require(\"@smithy/config-resolver\");\nconst core_2 = require(\"@smithy/core\");\nconst hash_node_1 = require(\"@smithy/hash-node\");\nconst middleware_retry_1 = require(\"@smithy/middleware-retry\");\nconst node_config_provider_1 = require(\"@smithy/node-config-provider\");\nconst node_http_handler_1 = require(\"@smithy/node-http-handler\");\nconst util_body_length_node_1 = require(\"@smithy/util-body-length-node\");\nconst util_retry_1 = require(\"@smithy/util-retry\");\nconst runtimeConfig_shared_1 = require(\"./runtimeConfig.shared\");\nconst smithy_client_1 = require(\"@smithy/smithy-client\");\nconst util_defaults_mode_node_1 = require(\"@smithy/util-defaults-mode-node\");\nconst smithy_client_2 = require(\"@smithy/smithy-client\");\nconst getRuntimeConfig = (config) => {\n (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);\n const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);\n const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);\n const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);\n (0, core_1.emitWarningIfUnsupportedVersion)(process.version);\n const loaderConfig = {\n profile: config?.profile,\n logger: clientSharedValues.logger,\n };\n return {\n ...clientSharedValues,\n ...config,\n runtime: \"node\",\n defaultsMode,\n authSchemePreference: config?.authSchemePreference ?? (0, node_config_provider_1.loadConfig)(core_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),\n bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,\n credentialDefaultProvider: config?.credentialDefaultProvider ?? credential_provider_node_1.defaultProvider,\n defaultUserAgentProvider: config?.defaultUserAgentProvider ??\n (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),\n httpAuthSchemes: config?.httpAuthSchemes ?? [\n {\n schemeId: \"aws.auth#sigv4\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"aws.auth#sigv4\") ||\n (async (idProps) => await (0, credential_provider_node_1.defaultProvider)(idProps?.__config || {})()),\n signer: new core_1.AwsSdkSigV4Signer(),\n },\n {\n schemeId: \"smithy.api#noAuth\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"smithy.api#noAuth\") || (async () => ({})),\n signer: new core_2.NoAuthSigner(),\n },\n ],\n maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),\n region: config?.region ??\n (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),\n requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),\n retryMode: config?.retryMode ??\n (0, node_config_provider_1.loadConfig)({\n ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,\n default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE,\n }, config),\n sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, \"sha256\"),\n streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,\n useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),\n };\n};\nexports.getRuntimeConfig = getRuntimeConfig;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getRuntimeConfig = void 0;\nconst core_1 = require(\"@aws-sdk/core\");\nconst core_2 = require(\"@smithy/core\");\nconst smithy_client_1 = require(\"@smithy/smithy-client\");\nconst url_parser_1 = require(\"@smithy/url-parser\");\nconst util_base64_1 = require(\"@smithy/util-base64\");\nconst util_utf8_1 = require(\"@smithy/util-utf8\");\nconst httpAuthSchemeProvider_1 = require(\"./auth/httpAuthSchemeProvider\");\nconst endpointResolver_1 = require(\"./endpoint/endpointResolver\");\nconst getRuntimeConfig = (config) => {\n return {\n apiVersion: \"2011-06-15\",\n base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64,\n base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,\n disableHostPrefix: config?.disableHostPrefix ?? false,\n endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,\n extensions: config?.extensions ?? [],\n httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSTSHttpAuthSchemeProvider,\n httpAuthSchemes: config?.httpAuthSchemes ?? [\n {\n schemeId: \"aws.auth#sigv4\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"aws.auth#sigv4\"),\n signer: new core_1.AwsSdkSigV4Signer(),\n },\n {\n schemeId: \"smithy.api#noAuth\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"smithy.api#noAuth\") || (async () => ({})),\n signer: new core_2.NoAuthSigner(),\n },\n ],\n logger: config?.logger ?? new smithy_client_1.NoOpLogger(),\n serviceId: config?.serviceId ?? \"STS\",\n urlParser: config?.urlParser ?? url_parser_1.parseUrl,\n utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,\n utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8,\n };\n};\nexports.getRuntimeConfig = getRuntimeConfig;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resolveRuntimeExtensions = void 0;\nconst region_config_resolver_1 = require(\"@aws-sdk/region-config-resolver\");\nconst protocol_http_1 = require(\"@smithy/protocol-http\");\nconst smithy_client_1 = require(\"@smithy/smithy-client\");\nconst httpAuthExtensionConfiguration_1 = require(\"./auth/httpAuthExtensionConfiguration\");\nconst resolveRuntimeExtensions = (runtimeConfig, extensions) => {\n const extensionConfiguration = Object.assign((0, region_config_resolver_1.getAwsRegionExtensionConfiguration)(runtimeConfig), (0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig), (0, protocol_http_1.getHttpHandlerExtensionConfiguration)(runtimeConfig), (0, httpAuthExtensionConfiguration_1.getHttpAuthExtensionConfiguration)(runtimeConfig));\n extensions.forEach((extension) => extension.configure(extensionConfiguration));\n return Object.assign(runtimeConfig, (0, region_config_resolver_1.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), (0, smithy_client_1.resolveDefaultRuntimeConfig)(extensionConfiguration), (0, protocol_http_1.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), (0, httpAuthExtensionConfiguration_1.resolveHttpAuthRuntimeConfig)(extensionConfiguration));\n};\nexports.resolveRuntimeExtensions = resolveRuntimeExtensions;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./submodules/client/index\"), exports);\ntslib_1.__exportStar(require(\"./submodules/httpAuthSchemes/index\"), exports);\ntslib_1.__exportStar(require(\"./submodules/protocols/index\"), exports);\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/submodules/client/index.ts\nvar index_exports = {};\n__export(index_exports, {\n emitWarningIfUnsupportedVersion: () => emitWarningIfUnsupportedVersion,\n setCredentialFeature: () => setCredentialFeature,\n setFeature: () => setFeature,\n state: () => state\n});\nmodule.exports = __toCommonJS(index_exports);\n\n// src/submodules/client/emitWarningIfUnsupportedVersion.ts\nvar state = {\n warningEmitted: false\n};\nvar emitWarningIfUnsupportedVersion = /* @__PURE__ */ __name((version) => {\n if (version && !state.warningEmitted && parseInt(version.substring(1, version.indexOf(\".\"))) < 18) {\n state.warningEmitted = true;\n process.emitWarning(\n `NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will\nno longer support Node.js 16.x on January 6, 2025.\n\nTo continue receiving updates to AWS services, bug fixes, and security\nupdates please upgrade to a supported Node.js LTS version.\n\nMore information can be found at: https://a.co/74kJMmI`\n );\n }\n}, \"emitWarningIfUnsupportedVersion\");\n\n// src/submodules/client/setCredentialFeature.ts\nfunction setCredentialFeature(credentials, feature, value) {\n if (!credentials.$source) {\n credentials.$source = {};\n }\n credentials.$source[feature] = value;\n return credentials;\n}\n__name(setCredentialFeature, \"setCredentialFeature\");\n\n// src/submodules/client/setFeature.ts\nfunction setFeature(context, feature, value) {\n if (!context.__aws_sdk_context) {\n context.__aws_sdk_context = {\n features: {}\n };\n } else if (!context.__aws_sdk_context.features) {\n context.__aws_sdk_context.features = {};\n }\n context.__aws_sdk_context.features[feature] = value;\n}\n__name(setFeature, \"setFeature\");\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n emitWarningIfUnsupportedVersion,\n setCredentialFeature,\n setFeature,\n state\n});\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/submodules/httpAuthSchemes/index.ts\nvar index_exports = {};\n__export(index_exports, {\n AWSSDKSigV4Signer: () => AWSSDKSigV4Signer,\n AwsSdkSigV4ASigner: () => AwsSdkSigV4ASigner,\n AwsSdkSigV4Signer: () => AwsSdkSigV4Signer,\n NODE_AUTH_SCHEME_PREFERENCE_OPTIONS: () => NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,\n NODE_SIGV4A_CONFIG_OPTIONS: () => NODE_SIGV4A_CONFIG_OPTIONS,\n getBearerTokenEnvKey: () => getBearerTokenEnvKey,\n resolveAWSSDKSigV4Config: () => resolveAWSSDKSigV4Config,\n resolveAwsSdkSigV4AConfig: () => resolveAwsSdkSigV4AConfig,\n resolveAwsSdkSigV4Config: () => resolveAwsSdkSigV4Config,\n validateSigningProperties: () => validateSigningProperties\n});\nmodule.exports = __toCommonJS(index_exports);\n\n// src/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.ts\nvar import_protocol_http2 = require(\"@smithy/protocol-http\");\n\n// src/submodules/httpAuthSchemes/utils/getDateHeader.ts\nvar import_protocol_http = require(\"@smithy/protocol-http\");\nvar getDateHeader = /* @__PURE__ */ __name((response) => import_protocol_http.HttpResponse.isInstance(response) ? response.headers?.date ?? response.headers?.Date : void 0, \"getDateHeader\");\n\n// src/submodules/httpAuthSchemes/utils/getSkewCorrectedDate.ts\nvar getSkewCorrectedDate = /* @__PURE__ */ __name((systemClockOffset) => new Date(Date.now() + systemClockOffset), \"getSkewCorrectedDate\");\n\n// src/submodules/httpAuthSchemes/utils/isClockSkewed.ts\nvar isClockSkewed = /* @__PURE__ */ __name((clockTime, systemClockOffset) => Math.abs(getSkewCorrectedDate(systemClockOffset).getTime() - clockTime) >= 3e5, \"isClockSkewed\");\n\n// src/submodules/httpAuthSchemes/utils/getUpdatedSystemClockOffset.ts\nvar getUpdatedSystemClockOffset = /* @__PURE__ */ __name((clockTime, currentSystemClockOffset) => {\n const clockTimeInMs = Date.parse(clockTime);\n if (isClockSkewed(clockTimeInMs, currentSystemClockOffset)) {\n return clockTimeInMs - Date.now();\n }\n return currentSystemClockOffset;\n}, \"getUpdatedSystemClockOffset\");\n\n// src/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.ts\nvar throwSigningPropertyError = /* @__PURE__ */ __name((name, property) => {\n if (!property) {\n throw new Error(`Property \\`${name}\\` is not resolved for AWS SDK SigV4Auth`);\n }\n return property;\n}, \"throwSigningPropertyError\");\nvar validateSigningProperties = /* @__PURE__ */ __name(async (signingProperties) => {\n const context = throwSigningPropertyError(\n \"context\",\n signingProperties.context\n );\n const config = throwSigningPropertyError(\"config\", signingProperties.config);\n const authScheme = context.endpointV2?.properties?.authSchemes?.[0];\n const signerFunction = throwSigningPropertyError(\n \"signer\",\n config.signer\n );\n const signer = await signerFunction(authScheme);\n const signingRegion = signingProperties?.signingRegion;\n const signingRegionSet = signingProperties?.signingRegionSet;\n const signingName = signingProperties?.signingName;\n return {\n config,\n signer,\n signingRegion,\n signingRegionSet,\n signingName\n };\n}, \"validateSigningProperties\");\nvar AwsSdkSigV4Signer = class {\n static {\n __name(this, \"AwsSdkSigV4Signer\");\n }\n async sign(httpRequest, identity, signingProperties) {\n if (!import_protocol_http2.HttpRequest.isInstance(httpRequest)) {\n throw new Error(\"The request is not an instance of `HttpRequest` and cannot be signed\");\n }\n const validatedProps = await validateSigningProperties(signingProperties);\n const { config, signer } = validatedProps;\n let { signingRegion, signingName } = validatedProps;\n const handlerExecutionContext = signingProperties.context;\n if (handlerExecutionContext?.authSchemes?.length ?? 0 > 1) {\n const [first, second] = handlerExecutionContext.authSchemes;\n if (first?.name === \"sigv4a\" && second?.name === \"sigv4\") {\n signingRegion = second?.signingRegion ?? signingRegion;\n signingName = second?.signingName ?? signingName;\n }\n }\n const signedRequest = await signer.sign(httpRequest, {\n signingDate: getSkewCorrectedDate(config.systemClockOffset),\n signingRegion,\n signingService: signingName\n });\n return signedRequest;\n }\n errorHandler(signingProperties) {\n return (error) => {\n const serverTime = error.ServerTime ?? getDateHeader(error.$response);\n if (serverTime) {\n const config = throwSigningPropertyError(\"config\", signingProperties.config);\n const initialSystemClockOffset = config.systemClockOffset;\n config.systemClockOffset = getUpdatedSystemClockOffset(serverTime, config.systemClockOffset);\n const clockSkewCorrected = config.systemClockOffset !== initialSystemClockOffset;\n if (clockSkewCorrected && error.$metadata) {\n error.$metadata.clockSkewCorrected = true;\n }\n }\n throw error;\n };\n }\n successHandler(httpResponse, signingProperties) {\n const dateHeader = getDateHeader(httpResponse);\n if (dateHeader) {\n const config = throwSigningPropertyError(\"config\", signingProperties.config);\n config.systemClockOffset = getUpdatedSystemClockOffset(dateHeader, config.systemClockOffset);\n }\n }\n};\nvar AWSSDKSigV4Signer = AwsSdkSigV4Signer;\n\n// src/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4ASigner.ts\nvar import_protocol_http3 = require(\"@smithy/protocol-http\");\nvar AwsSdkSigV4ASigner = class extends AwsSdkSigV4Signer {\n static {\n __name(this, \"AwsSdkSigV4ASigner\");\n }\n async sign(httpRequest, identity, signingProperties) {\n if (!import_protocol_http3.HttpRequest.isInstance(httpRequest)) {\n throw new Error(\"The request is not an instance of `HttpRequest` and cannot be signed\");\n }\n const { config, signer, signingRegion, signingRegionSet, signingName } = await validateSigningProperties(\n signingProperties\n );\n const configResolvedSigningRegionSet = await config.sigv4aSigningRegionSet?.();\n const multiRegionOverride = (configResolvedSigningRegionSet ?? signingRegionSet ?? [signingRegion]).join(\",\");\n const signedRequest = await signer.sign(httpRequest, {\n signingDate: getSkewCorrectedDate(config.systemClockOffset),\n signingRegion: multiRegionOverride,\n signingService: signingName\n });\n return signedRequest;\n }\n};\n\n// src/submodules/httpAuthSchemes/utils/getArrayForCommaSeparatedString.ts\nvar getArrayForCommaSeparatedString = /* @__PURE__ */ __name((str) => typeof str === \"string\" && str.length > 0 ? str.split(\",\").map((item) => item.trim()) : [], \"getArrayForCommaSeparatedString\");\n\n// src/submodules/httpAuthSchemes/utils/getBearerTokenEnvKey.ts\nvar getBearerTokenEnvKey = /* @__PURE__ */ __name((signingName) => `AWS_BEARER_TOKEN_${signingName.replace(/[\\s-]/g, \"_\").toUpperCase()}`, \"getBearerTokenEnvKey\");\n\n// src/submodules/httpAuthSchemes/aws_sdk/NODE_AUTH_SCHEME_PREFERENCE_OPTIONS.ts\nvar NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY = \"AWS_AUTH_SCHEME_PREFERENCE\";\nvar NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY = \"auth_scheme_preference\";\nvar NODE_AUTH_SCHEME_PREFERENCE_OPTIONS = {\n /**\n * Retrieves auth scheme preference from environment variables\n * @param env - Node process environment object\n * @returns Array of auth scheme strings if preference is set, undefined otherwise\n */\n environmentVariableSelector: /* @__PURE__ */ __name((env, options) => {\n if (options?.signingName) {\n const bearerTokenKey = getBearerTokenEnvKey(options.signingName);\n if (bearerTokenKey in env) return [\"httpBearerAuth\"];\n }\n if (!(NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY in env)) return void 0;\n return getArrayForCommaSeparatedString(env[NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY]);\n }, \"environmentVariableSelector\"),\n /**\n * Retrieves auth scheme preference from config file\n * @param profile - Config profile object\n * @returns Array of auth scheme strings if preference is set, undefined otherwise\n */\n configFileSelector: /* @__PURE__ */ __name((profile) => {\n if (!(NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY in profile)) return void 0;\n return getArrayForCommaSeparatedString(profile[NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY]);\n }, \"configFileSelector\"),\n /**\n * Default auth scheme preference if not specified in environment or config\n */\n default: []\n};\n\n// src/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4AConfig.ts\nvar import_core = require(\"@smithy/core\");\nvar import_property_provider = require(\"@smithy/property-provider\");\nvar resolveAwsSdkSigV4AConfig = /* @__PURE__ */ __name((config) => {\n config.sigv4aSigningRegionSet = (0, import_core.normalizeProvider)(config.sigv4aSigningRegionSet);\n return config;\n}, \"resolveAwsSdkSigV4AConfig\");\nvar NODE_SIGV4A_CONFIG_OPTIONS = {\n environmentVariableSelector(env) {\n if (env.AWS_SIGV4A_SIGNING_REGION_SET) {\n return env.AWS_SIGV4A_SIGNING_REGION_SET.split(\",\").map((_) => _.trim());\n }\n throw new import_property_provider.ProviderError(\"AWS_SIGV4A_SIGNING_REGION_SET not set in env.\", {\n tryNextLink: true\n });\n },\n configFileSelector(profile) {\n if (profile.sigv4a_signing_region_set) {\n return (profile.sigv4a_signing_region_set ?? \"\").split(\",\").map((_) => _.trim());\n }\n throw new import_property_provider.ProviderError(\"sigv4a_signing_region_set not set in profile.\", {\n tryNextLink: true\n });\n },\n default: void 0\n};\n\n// src/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.ts\nvar import_client = require(\"@aws-sdk/core/client\");\nvar import_core2 = require(\"@smithy/core\");\nvar import_signature_v4 = require(\"@smithy/signature-v4\");\nvar resolveAwsSdkSigV4Config = /* @__PURE__ */ __name((config) => {\n let inputCredentials = config.credentials;\n let isUserSupplied = !!config.credentials;\n let resolvedCredentials = void 0;\n Object.defineProperty(config, \"credentials\", {\n set(credentials) {\n if (credentials && credentials !== inputCredentials && credentials !== resolvedCredentials) {\n isUserSupplied = true;\n }\n inputCredentials = credentials;\n const memoizedProvider = normalizeCredentialProvider(config, {\n credentials: inputCredentials,\n credentialDefaultProvider: config.credentialDefaultProvider\n });\n const boundProvider = bindCallerConfig(config, memoizedProvider);\n if (isUserSupplied && !boundProvider.attributed) {\n resolvedCredentials = /* @__PURE__ */ __name(async (options) => boundProvider(options).then(\n (creds) => (0, import_client.setCredentialFeature)(creds, \"CREDENTIALS_CODE\", \"e\")\n ), \"resolvedCredentials\");\n resolvedCredentials.memoized = boundProvider.memoized;\n resolvedCredentials.configBound = boundProvider.configBound;\n resolvedCredentials.attributed = true;\n } else {\n resolvedCredentials = boundProvider;\n }\n },\n get() {\n return resolvedCredentials;\n },\n enumerable: true,\n configurable: true\n });\n config.credentials = inputCredentials;\n const {\n // Default for signingEscapePath\n signingEscapePath = true,\n // Default for systemClockOffset\n systemClockOffset = config.systemClockOffset || 0,\n // No default for sha256 since it is platform dependent\n sha256\n } = config;\n let signer;\n if (config.signer) {\n signer = (0, import_core2.normalizeProvider)(config.signer);\n } else if (config.regionInfoProvider) {\n signer = /* @__PURE__ */ __name(() => (0, import_core2.normalizeProvider)(config.region)().then(\n async (region) => [\n await config.regionInfoProvider(region, {\n useFipsEndpoint: await config.useFipsEndpoint(),\n useDualstackEndpoint: await config.useDualstackEndpoint()\n }) || {},\n region\n ]\n ).then(([regionInfo, region]) => {\n const { signingRegion, signingService } = regionInfo;\n config.signingRegion = config.signingRegion || signingRegion || region;\n config.signingName = config.signingName || signingService || config.serviceId;\n const params = {\n ...config,\n credentials: config.credentials,\n region: config.signingRegion,\n service: config.signingName,\n sha256,\n uriEscapePath: signingEscapePath\n };\n const SignerCtor = config.signerConstructor || import_signature_v4.SignatureV4;\n return new SignerCtor(params);\n }), \"signer\");\n } else {\n signer = /* @__PURE__ */ __name(async (authScheme) => {\n authScheme = Object.assign(\n {},\n {\n name: \"sigv4\",\n signingName: config.signingName || config.defaultSigningName,\n signingRegion: await (0, import_core2.normalizeProvider)(config.region)(),\n properties: {}\n },\n authScheme\n );\n const signingRegion = authScheme.signingRegion;\n const signingService = authScheme.signingName;\n config.signingRegion = config.signingRegion || signingRegion;\n config.signingName = config.signingName || signingService || config.serviceId;\n const params = {\n ...config,\n credentials: config.credentials,\n region: config.signingRegion,\n service: config.signingName,\n sha256,\n uriEscapePath: signingEscapePath\n };\n const SignerCtor = config.signerConstructor || import_signature_v4.SignatureV4;\n return new SignerCtor(params);\n }, \"signer\");\n }\n const resolvedConfig = Object.assign(config, {\n systemClockOffset,\n signingEscapePath,\n signer\n });\n return resolvedConfig;\n}, \"resolveAwsSdkSigV4Config\");\nvar resolveAWSSDKSigV4Config = resolveAwsSdkSigV4Config;\nfunction normalizeCredentialProvider(config, {\n credentials,\n credentialDefaultProvider\n}) {\n let credentialsProvider;\n if (credentials) {\n if (!credentials?.memoized) {\n credentialsProvider = (0, import_core2.memoizeIdentityProvider)(credentials, import_core2.isIdentityExpired, import_core2.doesIdentityRequireRefresh);\n } else {\n credentialsProvider = credentials;\n }\n } else {\n if (credentialDefaultProvider) {\n credentialsProvider = (0, import_core2.normalizeProvider)(\n credentialDefaultProvider(\n Object.assign({}, config, {\n parentClientConfig: config\n })\n )\n );\n } else {\n credentialsProvider = /* @__PURE__ */ __name(async () => {\n throw new Error(\n \"@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.\"\n );\n }, \"credentialsProvider\");\n }\n }\n credentialsProvider.memoized = true;\n return credentialsProvider;\n}\n__name(normalizeCredentialProvider, \"normalizeCredentialProvider\");\nfunction bindCallerConfig(config, credentialsProvider) {\n if (credentialsProvider.configBound) {\n return credentialsProvider;\n }\n const fn = /* @__PURE__ */ __name(async (options) => credentialsProvider({ ...options, callerClientConfig: config }), \"fn\");\n fn.memoized = credentialsProvider.memoized;\n fn.configBound = true;\n return fn;\n}\n__name(bindCallerConfig, \"bindCallerConfig\");\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n AWSSDKSigV4Signer,\n AwsSdkSigV4ASigner,\n AwsSdkSigV4Signer,\n NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,\n NODE_SIGV4A_CONFIG_OPTIONS,\n getBearerTokenEnvKey,\n resolveAWSSDKSigV4Config,\n resolveAwsSdkSigV4AConfig,\n resolveAwsSdkSigV4Config,\n validateSigningProperties\n});\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/submodules/protocols/index.ts\nvar index_exports = {};\n__export(index_exports, {\n _toBool: () => _toBool,\n _toNum: () => _toNum,\n _toStr: () => _toStr,\n awsExpectUnion: () => awsExpectUnion,\n loadRestJsonErrorCode: () => loadRestJsonErrorCode,\n loadRestXmlErrorCode: () => loadRestXmlErrorCode,\n parseJsonBody: () => parseJsonBody,\n parseJsonErrorBody: () => parseJsonErrorBody,\n parseXmlBody: () => parseXmlBody,\n parseXmlErrorBody: () => parseXmlErrorBody\n});\nmodule.exports = __toCommonJS(index_exports);\n\n// src/submodules/protocols/coercing-serializers.ts\nvar _toStr = /* @__PURE__ */ __name((val) => {\n if (val == null) {\n return val;\n }\n if (typeof val === \"number\" || typeof val === \"bigint\") {\n const warning = new Error(`Received number ${val} where a string was expected.`);\n warning.name = \"Warning\";\n console.warn(warning);\n return String(val);\n }\n if (typeof val === \"boolean\") {\n const warning = new Error(`Received boolean ${val} where a string was expected.`);\n warning.name = \"Warning\";\n console.warn(warning);\n return String(val);\n }\n return val;\n}, \"_toStr\");\nvar _toBool = /* @__PURE__ */ __name((val) => {\n if (val == null) {\n return val;\n }\n if (typeof val === \"number\") {\n }\n if (typeof val === \"string\") {\n const lowercase = val.toLowerCase();\n if (val !== \"\" && lowercase !== \"false\" && lowercase !== \"true\") {\n const warning = new Error(`Received string \"${val}\" where a boolean was expected.`);\n warning.name = \"Warning\";\n console.warn(warning);\n }\n return val !== \"\" && lowercase !== \"false\";\n }\n return val;\n}, \"_toBool\");\nvar _toNum = /* @__PURE__ */ __name((val) => {\n if (val == null) {\n return val;\n }\n if (typeof val === \"boolean\") {\n }\n if (typeof val === \"string\") {\n const num = Number(val);\n if (num.toString() !== val) {\n const warning = new Error(`Received string \"${val}\" where a number was expected.`);\n warning.name = \"Warning\";\n console.warn(warning);\n return val;\n }\n return num;\n }\n return val;\n}, \"_toNum\");\n\n// src/submodules/protocols/json/awsExpectUnion.ts\nvar import_smithy_client = require(\"@smithy/smithy-client\");\nvar awsExpectUnion = /* @__PURE__ */ __name((value) => {\n if (value == null) {\n return void 0;\n }\n if (typeof value === \"object\" && \"__type\" in value) {\n delete value.__type;\n }\n return (0, import_smithy_client.expectUnion)(value);\n}, \"awsExpectUnion\");\n\n// src/submodules/protocols/common.ts\nvar import_smithy_client2 = require(\"@smithy/smithy-client\");\nvar collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client2.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), \"collectBodyString\");\n\n// src/submodules/protocols/json/parseJsonBody.ts\nvar parseJsonBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {\n if (encoded.length) {\n try {\n return JSON.parse(encoded);\n } catch (e) {\n if (e?.name === \"SyntaxError\") {\n Object.defineProperty(e, \"$responseBodyText\", {\n value: encoded\n });\n }\n throw e;\n }\n }\n return {};\n}), \"parseJsonBody\");\nvar parseJsonErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {\n const value = await parseJsonBody(errorBody, context);\n value.message = value.message ?? value.Message;\n return value;\n}, \"parseJsonErrorBody\");\nvar loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {\n const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), \"findKey\");\n const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {\n let cleanValue = rawValue;\n if (typeof cleanValue === \"number\") {\n cleanValue = cleanValue.toString();\n }\n if (cleanValue.indexOf(\",\") >= 0) {\n cleanValue = cleanValue.split(\",\")[0];\n }\n if (cleanValue.indexOf(\":\") >= 0) {\n cleanValue = cleanValue.split(\":\")[0];\n }\n if (cleanValue.indexOf(\"#\") >= 0) {\n cleanValue = cleanValue.split(\"#\")[1];\n }\n return cleanValue;\n }, \"sanitizeErrorCode\");\n const headerKey = findKey(output.headers, \"x-amzn-errortype\");\n if (headerKey !== void 0) {\n return sanitizeErrorCode(output.headers[headerKey]);\n }\n if (data && typeof data === \"object\") {\n const codeKey = findKey(data, \"code\");\n if (codeKey && data[codeKey] !== void 0) {\n return sanitizeErrorCode(data[codeKey]);\n }\n if (data[\"__type\"] !== void 0) {\n return sanitizeErrorCode(data[\"__type\"]);\n }\n }\n}, \"loadRestJsonErrorCode\");\n\n// src/submodules/protocols/xml/parseXmlBody.ts\nvar import_smithy_client3 = require(\"@smithy/smithy-client\");\nvar import_fast_xml_parser = require(\"fast-xml-parser\");\nvar parseXmlBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {\n if (encoded.length) {\n const parser = new import_fast_xml_parser.XMLParser({\n attributeNamePrefix: \"\",\n htmlEntities: true,\n ignoreAttributes: false,\n ignoreDeclaration: true,\n parseTagValue: false,\n trimValues: false,\n tagValueProcessor: /* @__PURE__ */ __name((_, val) => val.trim() === \"\" && val.includes(\"\\n\") ? \"\" : void 0, \"tagValueProcessor\")\n });\n parser.addEntity(\"#xD\", \"\\r\");\n parser.addEntity(\"#10\", \"\\n\");\n let parsedObj;\n try {\n parsedObj = parser.parse(encoded, true);\n } catch (e) {\n if (e && typeof e === \"object\") {\n Object.defineProperty(e, \"$responseBodyText\", {\n value: encoded\n });\n }\n throw e;\n }\n const textNodeName = \"#text\";\n const key = Object.keys(parsedObj)[0];\n const parsedObjToReturn = parsedObj[key];\n if (parsedObjToReturn[textNodeName]) {\n parsedObjToReturn[key] = parsedObjToReturn[textNodeName];\n delete parsedObjToReturn[textNodeName];\n }\n return (0, import_smithy_client3.getValueFromTextNode)(parsedObjToReturn);\n }\n return {};\n}), \"parseXmlBody\");\nvar parseXmlErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {\n const value = await parseXmlBody(errorBody, context);\n if (value.Error) {\n value.Error.message = value.Error.message ?? value.Error.Message;\n }\n return value;\n}, \"parseXmlErrorBody\");\nvar loadRestXmlErrorCode = /* @__PURE__ */ __name((output, data) => {\n if (data?.Error?.Code !== void 0) {\n return data.Error.Code;\n }\n if (data?.Code !== void 0) {\n return data.Code;\n }\n if (output.statusCode == 404) {\n return \"NotFound\";\n }\n}, \"loadRestXmlErrorCode\");\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n _toBool,\n _toNum,\n _toStr,\n awsExpectUnion,\n loadRestJsonErrorCode,\n loadRestXmlErrorCode,\n parseJsonBody,\n parseJsonErrorBody,\n parseXmlBody,\n parseXmlErrorBody\n});\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __esm = (fn, res) => function __init() {\n return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;\n};\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/loadCognitoIdentity.ts\nvar loadCognitoIdentity_exports = {};\n__export(loadCognitoIdentity_exports, {\n CognitoIdentityClient: () => import_client_cognito_identity.CognitoIdentityClient,\n GetCredentialsForIdentityCommand: () => import_client_cognito_identity.GetCredentialsForIdentityCommand,\n GetIdCommand: () => import_client_cognito_identity.GetIdCommand\n});\nvar import_client_cognito_identity;\nvar init_loadCognitoIdentity = __esm({\n \"src/loadCognitoIdentity.ts\"() {\n \"use strict\";\n import_client_cognito_identity = require(\"@aws-sdk/client-cognito-identity\");\n }\n});\n\n// src/index.ts\nvar index_exports = {};\n__export(index_exports, {\n fromCognitoIdentity: () => fromCognitoIdentity,\n fromCognitoIdentityPool: () => fromCognitoIdentityPool\n});\nmodule.exports = __toCommonJS(index_exports);\n\n// src/fromCognitoIdentity.ts\nvar import_property_provider = require(\"@smithy/property-provider\");\n\n// src/resolveLogins.ts\nfunction resolveLogins(logins) {\n return Promise.all(\n Object.keys(logins).reduce((arr, name) => {\n const tokenOrProvider = logins[name];\n if (typeof tokenOrProvider === \"string\") {\n arr.push([name, tokenOrProvider]);\n } else {\n arr.push(tokenOrProvider().then((token) => [name, token]));\n }\n return arr;\n }, [])\n ).then(\n (resolvedPairs) => resolvedPairs.reduce((logins2, [key, value]) => {\n logins2[key] = value;\n return logins2;\n }, {})\n );\n}\n__name(resolveLogins, \"resolveLogins\");\n\n// src/fromCognitoIdentity.ts\nfunction fromCognitoIdentity(parameters) {\n return async (awsIdentityProperties) => {\n parameters.logger?.debug(\"@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity\");\n const { GetCredentialsForIdentityCommand: GetCredentialsForIdentityCommand2, CognitoIdentityClient: CognitoIdentityClient2 } = await Promise.resolve().then(() => (init_loadCognitoIdentity(), loadCognitoIdentity_exports));\n const fromConfigs = /* @__PURE__ */ __name((property) => parameters.clientConfig?.[property] ?? parameters.parentClientConfig?.[property] ?? awsIdentityProperties?.callerClientConfig?.[property], \"fromConfigs\");\n const {\n Credentials: {\n AccessKeyId = throwOnMissingAccessKeyId(parameters.logger),\n Expiration,\n SecretKey = throwOnMissingSecretKey(parameters.logger),\n SessionToken\n } = throwOnMissingCredentials(parameters.logger)\n } = await (parameters.client ?? new CognitoIdentityClient2(\n Object.assign({}, parameters.clientConfig ?? {}, {\n region: fromConfigs(\"region\"),\n profile: fromConfigs(\"profile\")\n })\n )).send(\n new GetCredentialsForIdentityCommand2({\n CustomRoleArn: parameters.customRoleArn,\n IdentityId: parameters.identityId,\n Logins: parameters.logins ? await resolveLogins(parameters.logins) : void 0\n })\n );\n return {\n identityId: parameters.identityId,\n accessKeyId: AccessKeyId,\n secretAccessKey: SecretKey,\n sessionToken: SessionToken,\n expiration: Expiration\n };\n };\n}\n__name(fromCognitoIdentity, \"fromCognitoIdentity\");\nfunction throwOnMissingAccessKeyId(logger) {\n throw new import_property_provider.CredentialsProviderError(\"Response from Amazon Cognito contained no access key ID\", { logger });\n}\n__name(throwOnMissingAccessKeyId, \"throwOnMissingAccessKeyId\");\nfunction throwOnMissingCredentials(logger) {\n throw new import_property_provider.CredentialsProviderError(\"Response from Amazon Cognito contained no credentials\", { logger });\n}\n__name(throwOnMissingCredentials, \"throwOnMissingCredentials\");\nfunction throwOnMissingSecretKey(logger) {\n throw new import_property_provider.CredentialsProviderError(\"Response from Amazon Cognito contained no secret key\", { logger });\n}\n__name(throwOnMissingSecretKey, \"throwOnMissingSecretKey\");\n\n// src/fromCognitoIdentityPool.ts\n\n\n// src/IndexedDbStorage.ts\nvar STORE_NAME = \"IdentityIds\";\nvar IndexedDbStorage = class {\n constructor(dbName = \"aws:cognito-identity-ids\") {\n this.dbName = dbName;\n }\n static {\n __name(this, \"IndexedDbStorage\");\n }\n getItem(key) {\n return this.withObjectStore(\"readonly\", (store) => {\n const req = store.get(key);\n return new Promise((resolve) => {\n req.onerror = () => resolve(null);\n req.onsuccess = () => resolve(req.result ? req.result.value : null);\n });\n }).catch(() => null);\n }\n removeItem(key) {\n return this.withObjectStore(\"readwrite\", (store) => {\n const req = store.delete(key);\n return new Promise((resolve, reject) => {\n req.onerror = () => reject(req.error);\n req.onsuccess = () => resolve();\n });\n });\n }\n setItem(id, value) {\n return this.withObjectStore(\"readwrite\", (store) => {\n const req = store.put({ id, value });\n return new Promise((resolve, reject) => {\n req.onerror = () => reject(req.error);\n req.onsuccess = () => resolve();\n });\n });\n }\n getDb() {\n const openDbRequest = self.indexedDB.open(this.dbName, 1);\n return new Promise((resolve, reject) => {\n openDbRequest.onsuccess = () => {\n resolve(openDbRequest.result);\n };\n openDbRequest.onerror = () => {\n reject(openDbRequest.error);\n };\n openDbRequest.onblocked = () => {\n reject(new Error(\"Unable to access DB\"));\n };\n openDbRequest.onupgradeneeded = () => {\n const db = openDbRequest.result;\n db.onerror = () => {\n reject(new Error(\"Failed to create object store\"));\n };\n db.createObjectStore(STORE_NAME, { keyPath: \"id\" });\n };\n });\n }\n withObjectStore(mode, action) {\n return this.getDb().then((db) => {\n const tx = db.transaction(STORE_NAME, mode);\n tx.oncomplete = () => db.close();\n return new Promise((resolve, reject) => {\n tx.onerror = () => reject(tx.error);\n resolve(action(tx.objectStore(STORE_NAME)));\n }).catch((err) => {\n db.close();\n throw err;\n });\n });\n }\n};\n\n// src/InMemoryStorage.ts\nvar InMemoryStorage = class {\n constructor(store = {}) {\n this.store = store;\n }\n static {\n __name(this, \"InMemoryStorage\");\n }\n getItem(key) {\n if (key in this.store) {\n return this.store[key];\n }\n return null;\n }\n removeItem(key) {\n delete this.store[key];\n }\n setItem(key, value) {\n this.store[key] = value;\n }\n};\n\n// src/localStorage.ts\nvar inMemoryStorage = new InMemoryStorage();\nfunction localStorage() {\n if (typeof self === \"object\" && self.indexedDB) {\n return new IndexedDbStorage();\n }\n if (typeof window === \"object\" && window.localStorage) {\n return window.localStorage;\n }\n return inMemoryStorage;\n}\n__name(localStorage, \"localStorage\");\n\n// src/fromCognitoIdentityPool.ts\nfunction fromCognitoIdentityPool({\n accountId,\n cache = localStorage(),\n client,\n clientConfig,\n customRoleArn,\n identityPoolId,\n logins,\n userIdentifier = !logins || Object.keys(logins).length === 0 ? \"ANONYMOUS\" : void 0,\n logger,\n parentClientConfig\n}) {\n logger?.debug(\"@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity\");\n const cacheKey = userIdentifier ? `aws:cognito-identity-credentials:${identityPoolId}:${userIdentifier}` : void 0;\n let provider = /* @__PURE__ */ __name(async (awsIdentityProperties) => {\n const { GetIdCommand: GetIdCommand2, CognitoIdentityClient: CognitoIdentityClient2 } = await Promise.resolve().then(() => (init_loadCognitoIdentity(), loadCognitoIdentity_exports));\n const fromConfigs = /* @__PURE__ */ __name((property) => clientConfig?.[property] ?? parentClientConfig?.[property] ?? awsIdentityProperties?.callerClientConfig?.[property], \"fromConfigs\");\n const _client = client ?? new CognitoIdentityClient2(\n Object.assign({}, clientConfig ?? {}, {\n region: fromConfigs(\"region\"),\n profile: fromConfigs(\"profile\")\n })\n );\n let identityId = cacheKey && await cache.getItem(cacheKey);\n if (!identityId) {\n const { IdentityId = throwOnMissingId(logger) } = await _client.send(\n new GetIdCommand2({\n AccountId: accountId,\n IdentityPoolId: identityPoolId,\n Logins: logins ? await resolveLogins(logins) : void 0\n })\n );\n identityId = IdentityId;\n if (cacheKey) {\n Promise.resolve(cache.setItem(cacheKey, identityId)).catch(() => {\n });\n }\n }\n provider = fromCognitoIdentity({\n client: _client,\n customRoleArn,\n logins,\n identityId\n });\n return provider(awsIdentityProperties);\n }, \"provider\");\n return (awsIdentityProperties) => provider(awsIdentityProperties).catch(async (err) => {\n if (cacheKey) {\n Promise.resolve(cache.removeItem(cacheKey)).catch(() => {\n });\n }\n throw err;\n });\n}\n__name(fromCognitoIdentityPool, \"fromCognitoIdentityPool\");\nfunction throwOnMissingId(logger) {\n throw new import_property_provider.CredentialsProviderError(\"Response from Amazon Cognito contained no identity ID\", { logger });\n}\n__name(throwOnMissingId, \"throwOnMissingId\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n fromCognitoIdentity,\n fromCognitoIdentityPool\n});\n\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar index_exports = {};\n__export(index_exports, {\n ENV_ACCOUNT_ID: () => ENV_ACCOUNT_ID,\n ENV_CREDENTIAL_SCOPE: () => ENV_CREDENTIAL_SCOPE,\n ENV_EXPIRATION: () => ENV_EXPIRATION,\n ENV_KEY: () => ENV_KEY,\n ENV_SECRET: () => ENV_SECRET,\n ENV_SESSION: () => ENV_SESSION,\n fromEnv: () => fromEnv\n});\nmodule.exports = __toCommonJS(index_exports);\n\n// src/fromEnv.ts\nvar import_client = require(\"@aws-sdk/core/client\");\nvar import_property_provider = require(\"@smithy/property-provider\");\nvar ENV_KEY = \"AWS_ACCESS_KEY_ID\";\nvar ENV_SECRET = \"AWS_SECRET_ACCESS_KEY\";\nvar ENV_SESSION = \"AWS_SESSION_TOKEN\";\nvar ENV_EXPIRATION = \"AWS_CREDENTIAL_EXPIRATION\";\nvar ENV_CREDENTIAL_SCOPE = \"AWS_CREDENTIAL_SCOPE\";\nvar ENV_ACCOUNT_ID = \"AWS_ACCOUNT_ID\";\nvar fromEnv = /* @__PURE__ */ __name((init) => async () => {\n init?.logger?.debug(\"@aws-sdk/credential-provider-env - fromEnv\");\n const accessKeyId = process.env[ENV_KEY];\n const secretAccessKey = process.env[ENV_SECRET];\n const sessionToken = process.env[ENV_SESSION];\n const expiry = process.env[ENV_EXPIRATION];\n const credentialScope = process.env[ENV_CREDENTIAL_SCOPE];\n const accountId = process.env[ENV_ACCOUNT_ID];\n if (accessKeyId && secretAccessKey) {\n const credentials = {\n accessKeyId,\n secretAccessKey,\n ...sessionToken && { sessionToken },\n ...expiry && { expiration: new Date(expiry) },\n ...credentialScope && { credentialScope },\n ...accountId && { accountId }\n };\n (0, import_client.setCredentialFeature)(credentials, \"CREDENTIALS_ENV_VARS\", \"g\");\n return credentials;\n }\n throw new import_property_provider.CredentialsProviderError(\"Unable to find environment variable credentials.\", { logger: init?.logger });\n}, \"fromEnv\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n ENV_KEY,\n ENV_SECRET,\n ENV_SESSION,\n ENV_EXPIRATION,\n ENV_CREDENTIAL_SCOPE,\n ENV_ACCOUNT_ID,\n fromEnv\n});\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.checkUrl = void 0;\nconst property_provider_1 = require(\"@smithy/property-provider\");\nconst LOOPBACK_CIDR_IPv4 = \"127.0.0.0/8\";\nconst LOOPBACK_CIDR_IPv6 = \"::1/128\";\nconst ECS_CONTAINER_HOST = \"169.254.170.2\";\nconst EKS_CONTAINER_HOST_IPv4 = \"169.254.170.23\";\nconst EKS_CONTAINER_HOST_IPv6 = \"[fd00:ec2::23]\";\nconst checkUrl = (url, logger) => {\n if (url.protocol === \"https:\") {\n return;\n }\n if (url.hostname === ECS_CONTAINER_HOST ||\n url.hostname === EKS_CONTAINER_HOST_IPv4 ||\n url.hostname === EKS_CONTAINER_HOST_IPv6) {\n return;\n }\n if (url.hostname.includes(\"[\")) {\n if (url.hostname === \"[::1]\" || url.hostname === \"[0000:0000:0000:0000:0000:0000:0000:0001]\") {\n return;\n }\n }\n else {\n if (url.hostname === \"localhost\") {\n return;\n }\n const ipComponents = url.hostname.split(\".\");\n const inRange = (component) => {\n const num = parseInt(component, 10);\n return 0 <= num && num <= 255;\n };\n if (ipComponents[0] === \"127\" &&\n inRange(ipComponents[1]) &&\n inRange(ipComponents[2]) &&\n inRange(ipComponents[3]) &&\n ipComponents.length === 4) {\n return;\n }\n }\n throw new property_provider_1.CredentialsProviderError(`URL not accepted. It must either be HTTPS or match one of the following:\n - loopback CIDR 127.0.0.0/8 or [::1/128]\n - ECS container host 169.254.170.2\n - EKS container host 169.254.170.23 or [fd00:ec2::23]`, { logger });\n};\nexports.checkUrl = checkUrl;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromHttp = void 0;\nconst tslib_1 = require(\"tslib\");\nconst client_1 = require(\"@aws-sdk/core/client\");\nconst node_http_handler_1 = require(\"@smithy/node-http-handler\");\nconst property_provider_1 = require(\"@smithy/property-provider\");\nconst promises_1 = tslib_1.__importDefault(require(\"fs/promises\"));\nconst checkUrl_1 = require(\"./checkUrl\");\nconst requestHelpers_1 = require(\"./requestHelpers\");\nconst retry_wrapper_1 = require(\"./retry-wrapper\");\nconst AWS_CONTAINER_CREDENTIALS_RELATIVE_URI = \"AWS_CONTAINER_CREDENTIALS_RELATIVE_URI\";\nconst DEFAULT_LINK_LOCAL_HOST = \"http://169.254.170.2\";\nconst AWS_CONTAINER_CREDENTIALS_FULL_URI = \"AWS_CONTAINER_CREDENTIALS_FULL_URI\";\nconst AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE = \"AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE\";\nconst AWS_CONTAINER_AUTHORIZATION_TOKEN = \"AWS_CONTAINER_AUTHORIZATION_TOKEN\";\nconst fromHttp = (options = {}) => {\n options.logger?.debug(\"@aws-sdk/credential-provider-http - fromHttp\");\n let host;\n const relative = options.awsContainerCredentialsRelativeUri ?? process.env[AWS_CONTAINER_CREDENTIALS_RELATIVE_URI];\n const full = options.awsContainerCredentialsFullUri ?? process.env[AWS_CONTAINER_CREDENTIALS_FULL_URI];\n const token = options.awsContainerAuthorizationToken ?? process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN];\n const tokenFile = options.awsContainerAuthorizationTokenFile ?? process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE];\n const warn = options.logger?.constructor?.name === \"NoOpLogger\" || !options.logger ? console.warn : options.logger.warn;\n if (relative && full) {\n warn(\"@aws-sdk/credential-provider-http: \" +\n \"you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri.\");\n warn(\"awsContainerCredentialsFullUri will take precedence.\");\n }\n if (token && tokenFile) {\n warn(\"@aws-sdk/credential-provider-http: \" +\n \"you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile.\");\n warn(\"awsContainerAuthorizationToken will take precedence.\");\n }\n if (full) {\n host = full;\n }\n else if (relative) {\n host = `${DEFAULT_LINK_LOCAL_HOST}${relative}`;\n }\n else {\n throw new property_provider_1.CredentialsProviderError(`No HTTP credential provider host provided.\nSet AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`, { logger: options.logger });\n }\n const url = new URL(host);\n (0, checkUrl_1.checkUrl)(url, options.logger);\n const requestHandler = new node_http_handler_1.NodeHttpHandler({\n requestTimeout: options.timeout ?? 1000,\n connectionTimeout: options.timeout ?? 1000,\n });\n return (0, retry_wrapper_1.retryWrapper)(async () => {\n const request = (0, requestHelpers_1.createGetRequest)(url);\n if (token) {\n request.headers.Authorization = token;\n }\n else if (tokenFile) {\n request.headers.Authorization = (await promises_1.default.readFile(tokenFile)).toString();\n }\n try {\n const result = await requestHandler.handle(request);\n return (0, requestHelpers_1.getCredentials)(result.response).then((creds) => (0, client_1.setCredentialFeature)(creds, \"CREDENTIALS_HTTP\", \"z\"));\n }\n catch (e) {\n throw new property_provider_1.CredentialsProviderError(String(e), { logger: options.logger });\n }\n }, options.maxRetries ?? 3, options.timeout ?? 1000);\n};\nexports.fromHttp = fromHttp;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createGetRequest = createGetRequest;\nexports.getCredentials = getCredentials;\nconst property_provider_1 = require(\"@smithy/property-provider\");\nconst protocol_http_1 = require(\"@smithy/protocol-http\");\nconst smithy_client_1 = require(\"@smithy/smithy-client\");\nconst util_stream_1 = require(\"@smithy/util-stream\");\nfunction createGetRequest(url) {\n return new protocol_http_1.HttpRequest({\n protocol: url.protocol,\n hostname: url.hostname,\n port: Number(url.port),\n path: url.pathname,\n query: Array.from(url.searchParams.entries()).reduce((acc, [k, v]) => {\n acc[k] = v;\n return acc;\n }, {}),\n fragment: url.hash,\n });\n}\nasync function getCredentials(response, logger) {\n const stream = (0, util_stream_1.sdkStreamMixin)(response.body);\n const str = await stream.transformToString();\n if (response.statusCode === 200) {\n const parsed = JSON.parse(str);\n if (typeof parsed.AccessKeyId !== \"string\" ||\n typeof parsed.SecretAccessKey !== \"string\" ||\n typeof parsed.Token !== \"string\" ||\n typeof parsed.Expiration !== \"string\") {\n throw new property_provider_1.CredentialsProviderError(\"HTTP credential provider response not of the required format, an object matching: \" +\n \"{ AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }\", { logger });\n }\n return {\n accessKeyId: parsed.AccessKeyId,\n secretAccessKey: parsed.SecretAccessKey,\n sessionToken: parsed.Token,\n expiration: (0, smithy_client_1.parseRfc3339DateTime)(parsed.Expiration),\n };\n }\n if (response.statusCode >= 400 && response.statusCode < 500) {\n let parsedBody = {};\n try {\n parsedBody = JSON.parse(str);\n }\n catch (e) { }\n throw Object.assign(new property_provider_1.CredentialsProviderError(`Server responded with status: ${response.statusCode}`, { logger }), {\n Code: parsedBody.Code,\n Message: parsedBody.Message,\n });\n }\n throw new property_provider_1.CredentialsProviderError(`Server responded with status: ${response.statusCode}`, { logger });\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.retryWrapper = void 0;\nconst retryWrapper = (toRetry, maxRetries, delayMs) => {\n return async () => {\n for (let i = 0; i < maxRetries; ++i) {\n try {\n return await toRetry();\n }\n catch (e) {\n await new Promise((resolve) => setTimeout(resolve, delayMs));\n }\n }\n return await toRetry();\n };\n};\nexports.retryWrapper = retryWrapper;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromHttp = void 0;\nvar fromHttp_1 = require(\"./fromHttp/fromHttp\");\nObject.defineProperty(exports, \"fromHttp\", { enumerable: true, get: function () { return fromHttp_1.fromHttp; } });\n","\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar index_exports = {};\n__export(index_exports, {\n fromIni: () => fromIni\n});\nmodule.exports = __toCommonJS(index_exports);\n\n// src/fromIni.ts\n\n\n// src/resolveProfileData.ts\n\n\n// src/resolveAssumeRoleCredentials.ts\n\n\nvar import_shared_ini_file_loader = require(\"@smithy/shared-ini-file-loader\");\n\n// src/resolveCredentialSource.ts\nvar import_client = require(\"@aws-sdk/core/client\");\nvar import_property_provider = require(\"@smithy/property-provider\");\nvar resolveCredentialSource = /* @__PURE__ */ __name((credentialSource, profileName, logger) => {\n const sourceProvidersMap = {\n EcsContainer: /* @__PURE__ */ __name(async (options) => {\n const { fromHttp } = await Promise.resolve().then(() => __toESM(require(\"@aws-sdk/credential-provider-http\")));\n const { fromContainerMetadata } = await Promise.resolve().then(() => __toESM(require(\"@smithy/credential-provider-imds\")));\n logger?.debug(\"@aws-sdk/credential-provider-ini - credential_source is EcsContainer\");\n return async () => (0, import_property_provider.chain)(fromHttp(options ?? {}), fromContainerMetadata(options))().then(setNamedProvider);\n }, \"EcsContainer\"),\n Ec2InstanceMetadata: /* @__PURE__ */ __name(async (options) => {\n logger?.debug(\"@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata\");\n const { fromInstanceMetadata } = await Promise.resolve().then(() => __toESM(require(\"@smithy/credential-provider-imds\")));\n return async () => fromInstanceMetadata(options)().then(setNamedProvider);\n }, \"Ec2InstanceMetadata\"),\n Environment: /* @__PURE__ */ __name(async (options) => {\n logger?.debug(\"@aws-sdk/credential-provider-ini - credential_source is Environment\");\n const { fromEnv } = await Promise.resolve().then(() => __toESM(require(\"@aws-sdk/credential-provider-env\")));\n return async () => fromEnv(options)().then(setNamedProvider);\n }, \"Environment\")\n };\n if (credentialSource in sourceProvidersMap) {\n return sourceProvidersMap[credentialSource];\n } else {\n throw new import_property_provider.CredentialsProviderError(\n `Unsupported credential source in profile ${profileName}. Got ${credentialSource}, expected EcsContainer or Ec2InstanceMetadata or Environment.`,\n { logger }\n );\n }\n}, \"resolveCredentialSource\");\nvar setNamedProvider = /* @__PURE__ */ __name((creds) => (0, import_client.setCredentialFeature)(creds, \"CREDENTIALS_PROFILE_NAMED_PROVIDER\", \"p\"), \"setNamedProvider\");\n\n// src/resolveAssumeRoleCredentials.ts\nvar isAssumeRoleProfile = /* @__PURE__ */ __name((arg, { profile = \"default\", logger } = {}) => {\n return Boolean(arg) && typeof arg === \"object\" && typeof arg.role_arn === \"string\" && [\"undefined\", \"string\"].indexOf(typeof arg.role_session_name) > -1 && [\"undefined\", \"string\"].indexOf(typeof arg.external_id) > -1 && [\"undefined\", \"string\"].indexOf(typeof arg.mfa_serial) > -1 && (isAssumeRoleWithSourceProfile(arg, { profile, logger }) || isCredentialSourceProfile(arg, { profile, logger }));\n}, \"isAssumeRoleProfile\");\nvar isAssumeRoleWithSourceProfile = /* @__PURE__ */ __name((arg, { profile, logger }) => {\n const withSourceProfile = typeof arg.source_profile === \"string\" && typeof arg.credential_source === \"undefined\";\n if (withSourceProfile) {\n logger?.debug?.(` ${profile} isAssumeRoleWithSourceProfile source_profile=${arg.source_profile}`);\n }\n return withSourceProfile;\n}, \"isAssumeRoleWithSourceProfile\");\nvar isCredentialSourceProfile = /* @__PURE__ */ __name((arg, { profile, logger }) => {\n const withProviderProfile = typeof arg.credential_source === \"string\" && typeof arg.source_profile === \"undefined\";\n if (withProviderProfile) {\n logger?.debug?.(` ${profile} isCredentialSourceProfile credential_source=${arg.credential_source}`);\n }\n return withProviderProfile;\n}, \"isCredentialSourceProfile\");\nvar resolveAssumeRoleCredentials = /* @__PURE__ */ __name(async (profileName, profiles, options, visitedProfiles = {}) => {\n options.logger?.debug(\"@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)\");\n const profileData = profiles[profileName];\n const { source_profile, region } = profileData;\n if (!options.roleAssumer) {\n const { getDefaultRoleAssumer } = await Promise.resolve().then(() => __toESM(require(\"@aws-sdk/nested-clients/sts\")));\n options.roleAssumer = getDefaultRoleAssumer(\n {\n ...options.clientConfig,\n credentialProviderLogger: options.logger,\n parentClientConfig: {\n ...options?.parentClientConfig,\n region: region ?? options?.parentClientConfig?.region\n }\n },\n options.clientPlugins\n );\n }\n if (source_profile && source_profile in visitedProfiles) {\n throw new import_property_provider.CredentialsProviderError(\n `Detected a cycle attempting to resolve credentials for profile ${(0, import_shared_ini_file_loader.getProfileName)(options)}. Profiles visited: ` + Object.keys(visitedProfiles).join(\", \"),\n { logger: options.logger }\n );\n }\n options.logger?.debug(\n `@aws-sdk/credential-provider-ini - finding credential resolver using ${source_profile ? `source_profile=[${source_profile}]` : `profile=[${profileName}]`}`\n );\n const sourceCredsProvider = source_profile ? resolveProfileData(\n source_profile,\n profiles,\n options,\n {\n ...visitedProfiles,\n [source_profile]: true\n },\n isCredentialSourceWithoutRoleArn(profiles[source_profile] ?? {})\n ) : (await resolveCredentialSource(profileData.credential_source, profileName, options.logger)(options))();\n if (isCredentialSourceWithoutRoleArn(profileData)) {\n return sourceCredsProvider.then((creds) => (0, import_client.setCredentialFeature)(creds, \"CREDENTIALS_PROFILE_SOURCE_PROFILE\", \"o\"));\n } else {\n const params = {\n RoleArn: profileData.role_arn,\n RoleSessionName: profileData.role_session_name || `aws-sdk-js-${Date.now()}`,\n ExternalId: profileData.external_id,\n DurationSeconds: parseInt(profileData.duration_seconds || \"3600\", 10)\n };\n const { mfa_serial } = profileData;\n if (mfa_serial) {\n if (!options.mfaCodeProvider) {\n throw new import_property_provider.CredentialsProviderError(\n `Profile ${profileName} requires multi-factor authentication, but no MFA code callback was provided.`,\n { logger: options.logger, tryNextLink: false }\n );\n }\n params.SerialNumber = mfa_serial;\n params.TokenCode = await options.mfaCodeProvider(mfa_serial);\n }\n const sourceCreds = await sourceCredsProvider;\n return options.roleAssumer(sourceCreds, params).then(\n (creds) => (0, import_client.setCredentialFeature)(creds, \"CREDENTIALS_PROFILE_SOURCE_PROFILE\", \"o\")\n );\n }\n}, \"resolveAssumeRoleCredentials\");\nvar isCredentialSourceWithoutRoleArn = /* @__PURE__ */ __name((section) => {\n return !section.role_arn && !!section.credential_source;\n}, \"isCredentialSourceWithoutRoleArn\");\n\n// src/resolveProcessCredentials.ts\n\nvar isProcessProfile = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === \"object\" && typeof arg.credential_process === \"string\", \"isProcessProfile\");\nvar resolveProcessCredentials = /* @__PURE__ */ __name(async (options, profile) => Promise.resolve().then(() => __toESM(require(\"@aws-sdk/credential-provider-process\"))).then(\n ({ fromProcess }) => fromProcess({\n ...options,\n profile\n })().then((creds) => (0, import_client.setCredentialFeature)(creds, \"CREDENTIALS_PROFILE_PROCESS\", \"v\"))\n), \"resolveProcessCredentials\");\n\n// src/resolveSsoCredentials.ts\n\nvar resolveSsoCredentials = /* @__PURE__ */ __name(async (profile, profileData, options = {}) => {\n const { fromSSO } = await Promise.resolve().then(() => __toESM(require(\"@aws-sdk/credential-provider-sso\")));\n return fromSSO({\n profile,\n logger: options.logger,\n parentClientConfig: options.parentClientConfig,\n clientConfig: options.clientConfig\n })().then((creds) => {\n if (profileData.sso_session) {\n return (0, import_client.setCredentialFeature)(creds, \"CREDENTIALS_PROFILE_SSO\", \"r\");\n } else {\n return (0, import_client.setCredentialFeature)(creds, \"CREDENTIALS_PROFILE_SSO_LEGACY\", \"t\");\n }\n });\n}, \"resolveSsoCredentials\");\nvar isSsoProfile = /* @__PURE__ */ __name((arg) => arg && (typeof arg.sso_start_url === \"string\" || typeof arg.sso_account_id === \"string\" || typeof arg.sso_session === \"string\" || typeof arg.sso_region === \"string\" || typeof arg.sso_role_name === \"string\"), \"isSsoProfile\");\n\n// src/resolveStaticCredentials.ts\n\nvar isStaticCredsProfile = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === \"object\" && typeof arg.aws_access_key_id === \"string\" && typeof arg.aws_secret_access_key === \"string\" && [\"undefined\", \"string\"].indexOf(typeof arg.aws_session_token) > -1 && [\"undefined\", \"string\"].indexOf(typeof arg.aws_account_id) > -1, \"isStaticCredsProfile\");\nvar resolveStaticCredentials = /* @__PURE__ */ __name(async (profile, options) => {\n options?.logger?.debug(\"@aws-sdk/credential-provider-ini - resolveStaticCredentials\");\n const credentials = {\n accessKeyId: profile.aws_access_key_id,\n secretAccessKey: profile.aws_secret_access_key,\n sessionToken: profile.aws_session_token,\n ...profile.aws_credential_scope && { credentialScope: profile.aws_credential_scope },\n ...profile.aws_account_id && { accountId: profile.aws_account_id }\n };\n return (0, import_client.setCredentialFeature)(credentials, \"CREDENTIALS_PROFILE\", \"n\");\n}, \"resolveStaticCredentials\");\n\n// src/resolveWebIdentityCredentials.ts\n\nvar isWebIdentityProfile = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === \"object\" && typeof arg.web_identity_token_file === \"string\" && typeof arg.role_arn === \"string\" && [\"undefined\", \"string\"].indexOf(typeof arg.role_session_name) > -1, \"isWebIdentityProfile\");\nvar resolveWebIdentityCredentials = /* @__PURE__ */ __name(async (profile, options) => Promise.resolve().then(() => __toESM(require(\"@aws-sdk/credential-provider-web-identity\"))).then(\n ({ fromTokenFile }) => fromTokenFile({\n webIdentityTokenFile: profile.web_identity_token_file,\n roleArn: profile.role_arn,\n roleSessionName: profile.role_session_name,\n roleAssumerWithWebIdentity: options.roleAssumerWithWebIdentity,\n logger: options.logger,\n parentClientConfig: options.parentClientConfig\n })().then((creds) => (0, import_client.setCredentialFeature)(creds, \"CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN\", \"q\"))\n), \"resolveWebIdentityCredentials\");\n\n// src/resolveProfileData.ts\nvar resolveProfileData = /* @__PURE__ */ __name(async (profileName, profiles, options, visitedProfiles = {}, isAssumeRoleRecursiveCall = false) => {\n const data = profiles[profileName];\n if (Object.keys(visitedProfiles).length > 0 && isStaticCredsProfile(data)) {\n return resolveStaticCredentials(data, options);\n }\n if (isAssumeRoleRecursiveCall || isAssumeRoleProfile(data, { profile: profileName, logger: options.logger })) {\n return resolveAssumeRoleCredentials(profileName, profiles, options, visitedProfiles);\n }\n if (isStaticCredsProfile(data)) {\n return resolveStaticCredentials(data, options);\n }\n if (isWebIdentityProfile(data)) {\n return resolveWebIdentityCredentials(data, options);\n }\n if (isProcessProfile(data)) {\n return resolveProcessCredentials(options, profileName);\n }\n if (isSsoProfile(data)) {\n return await resolveSsoCredentials(profileName, data, options);\n }\n throw new import_property_provider.CredentialsProviderError(\n `Could not resolve credentials using profile: [${profileName}] in configuration/credentials file(s).`,\n { logger: options.logger }\n );\n}, \"resolveProfileData\");\n\n// src/fromIni.ts\nvar fromIni = /* @__PURE__ */ __name((_init = {}) => async ({ callerClientConfig } = {}) => {\n const init = {\n ..._init,\n parentClientConfig: {\n ...callerClientConfig,\n ..._init.parentClientConfig\n }\n };\n init.logger?.debug(\"@aws-sdk/credential-provider-ini - fromIni\");\n const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init);\n return resolveProfileData(\n (0, import_shared_ini_file_loader.getProfileName)({\n profile: _init.profile ?? callerClientConfig?.profile\n }),\n profiles,\n init\n );\n}, \"fromIni\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n fromIni\n});\n\n","\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar index_exports = {};\n__export(index_exports, {\n credentialsTreatedAsExpired: () => credentialsTreatedAsExpired,\n credentialsWillNeedRefresh: () => credentialsWillNeedRefresh,\n defaultProvider: () => defaultProvider\n});\nmodule.exports = __toCommonJS(index_exports);\n\n// src/defaultProvider.ts\nvar import_credential_provider_env = require(\"@aws-sdk/credential-provider-env\");\n\nvar import_shared_ini_file_loader = require(\"@smithy/shared-ini-file-loader\");\n\n// src/remoteProvider.ts\nvar import_property_provider = require(\"@smithy/property-provider\");\nvar ENV_IMDS_DISABLED = \"AWS_EC2_METADATA_DISABLED\";\nvar remoteProvider = /* @__PURE__ */ __name(async (init) => {\n const { ENV_CMDS_FULL_URI, ENV_CMDS_RELATIVE_URI, fromContainerMetadata, fromInstanceMetadata } = await Promise.resolve().then(() => __toESM(require(\"@smithy/credential-provider-imds\")));\n if (process.env[ENV_CMDS_RELATIVE_URI] || process.env[ENV_CMDS_FULL_URI]) {\n init.logger?.debug(\"@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata\");\n const { fromHttp } = await Promise.resolve().then(() => __toESM(require(\"@aws-sdk/credential-provider-http\")));\n return (0, import_property_provider.chain)(fromHttp(init), fromContainerMetadata(init));\n }\n if (process.env[ENV_IMDS_DISABLED] && process.env[ENV_IMDS_DISABLED] !== \"false\") {\n return async () => {\n throw new import_property_provider.CredentialsProviderError(\"EC2 Instance Metadata Service access disabled\", { logger: init.logger });\n };\n }\n init.logger?.debug(\"@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata\");\n return fromInstanceMetadata(init);\n}, \"remoteProvider\");\n\n// src/defaultProvider.ts\nvar multipleCredentialSourceWarningEmitted = false;\nvar defaultProvider = /* @__PURE__ */ __name((init = {}) => (0, import_property_provider.memoize)(\n (0, import_property_provider.chain)(\n async () => {\n const profile = init.profile ?? process.env[import_shared_ini_file_loader.ENV_PROFILE];\n if (profile) {\n const envStaticCredentialsAreSet = process.env[import_credential_provider_env.ENV_KEY] && process.env[import_credential_provider_env.ENV_SECRET];\n if (envStaticCredentialsAreSet) {\n if (!multipleCredentialSourceWarningEmitted) {\n const warnFn = init.logger?.warn && init.logger?.constructor?.name !== \"NoOpLogger\" ? init.logger.warn : console.warn;\n warnFn(\n `@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING:\n Multiple credential sources detected: \n Both AWS_PROFILE and the pair AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY static credentials are set.\n This SDK will proceed with the AWS_PROFILE value.\n \n However, a future version may change this behavior to prefer the ENV static credentials.\n Please ensure that your environment only sets either the AWS_PROFILE or the\n AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY pair.\n`\n );\n multipleCredentialSourceWarningEmitted = true;\n }\n }\n throw new import_property_provider.CredentialsProviderError(\"AWS_PROFILE is set, skipping fromEnv provider.\", {\n logger: init.logger,\n tryNextLink: true\n });\n }\n init.logger?.debug(\"@aws-sdk/credential-provider-node - defaultProvider::fromEnv\");\n return (0, import_credential_provider_env.fromEnv)(init)();\n },\n async () => {\n init.logger?.debug(\"@aws-sdk/credential-provider-node - defaultProvider::fromSSO\");\n const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init;\n if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) {\n throw new import_property_provider.CredentialsProviderError(\n \"Skipping SSO provider in default chain (inputs do not include SSO fields).\",\n { logger: init.logger }\n );\n }\n const { fromSSO } = await Promise.resolve().then(() => __toESM(require(\"@aws-sdk/credential-provider-sso\")));\n return fromSSO(init)();\n },\n async () => {\n init.logger?.debug(\"@aws-sdk/credential-provider-node - defaultProvider::fromIni\");\n const { fromIni } = await Promise.resolve().then(() => __toESM(require(\"@aws-sdk/credential-provider-ini\")));\n return fromIni(init)();\n },\n async () => {\n init.logger?.debug(\"@aws-sdk/credential-provider-node - defaultProvider::fromProcess\");\n const { fromProcess } = await Promise.resolve().then(() => __toESM(require(\"@aws-sdk/credential-provider-process\")));\n return fromProcess(init)();\n },\n async () => {\n init.logger?.debug(\"@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile\");\n const { fromTokenFile } = await Promise.resolve().then(() => __toESM(require(\"@aws-sdk/credential-provider-web-identity\")));\n return fromTokenFile(init)();\n },\n async () => {\n init.logger?.debug(\"@aws-sdk/credential-provider-node - defaultProvider::remoteProvider\");\n return (await remoteProvider(init))();\n },\n async () => {\n throw new import_property_provider.CredentialsProviderError(\"Could not load credentials from any providers\", {\n tryNextLink: false,\n logger: init.logger\n });\n }\n ),\n credentialsTreatedAsExpired,\n credentialsWillNeedRefresh\n), \"defaultProvider\");\nvar credentialsWillNeedRefresh = /* @__PURE__ */ __name((credentials) => credentials?.expiration !== void 0, \"credentialsWillNeedRefresh\");\nvar credentialsTreatedAsExpired = /* @__PURE__ */ __name((credentials) => credentials?.expiration !== void 0 && credentials.expiration.getTime() - Date.now() < 3e5, \"credentialsTreatedAsExpired\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n defaultProvider,\n credentialsWillNeedRefresh,\n credentialsTreatedAsExpired\n});\n\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar index_exports = {};\n__export(index_exports, {\n fromProcess: () => fromProcess\n});\nmodule.exports = __toCommonJS(index_exports);\n\n// src/fromProcess.ts\nvar import_shared_ini_file_loader = require(\"@smithy/shared-ini-file-loader\");\n\n// src/resolveProcessCredentials.ts\nvar import_property_provider = require(\"@smithy/property-provider\");\nvar import_child_process = require(\"child_process\");\nvar import_util = require(\"util\");\n\n// src/getValidatedProcessCredentials.ts\nvar import_client = require(\"@aws-sdk/core/client\");\nvar getValidatedProcessCredentials = /* @__PURE__ */ __name((profileName, data, profiles) => {\n if (data.Version !== 1) {\n throw Error(`Profile ${profileName} credential_process did not return Version 1.`);\n }\n if (data.AccessKeyId === void 0 || data.SecretAccessKey === void 0) {\n throw Error(`Profile ${profileName} credential_process returned invalid credentials.`);\n }\n if (data.Expiration) {\n const currentTime = /* @__PURE__ */ new Date();\n const expireTime = new Date(data.Expiration);\n if (expireTime < currentTime) {\n throw Error(`Profile ${profileName} credential_process returned expired credentials.`);\n }\n }\n let accountId = data.AccountId;\n if (!accountId && profiles?.[profileName]?.aws_account_id) {\n accountId = profiles[profileName].aws_account_id;\n }\n const credentials = {\n accessKeyId: data.AccessKeyId,\n secretAccessKey: data.SecretAccessKey,\n ...data.SessionToken && { sessionToken: data.SessionToken },\n ...data.Expiration && { expiration: new Date(data.Expiration) },\n ...data.CredentialScope && { credentialScope: data.CredentialScope },\n ...accountId && { accountId }\n };\n (0, import_client.setCredentialFeature)(credentials, \"CREDENTIALS_PROCESS\", \"w\");\n return credentials;\n}, \"getValidatedProcessCredentials\");\n\n// src/resolveProcessCredentials.ts\nvar resolveProcessCredentials = /* @__PURE__ */ __name(async (profileName, profiles, logger) => {\n const profile = profiles[profileName];\n if (profiles[profileName]) {\n const credentialProcess = profile[\"credential_process\"];\n if (credentialProcess !== void 0) {\n const execPromise = (0, import_util.promisify)(import_child_process.exec);\n try {\n const { stdout } = await execPromise(credentialProcess);\n let data;\n try {\n data = JSON.parse(stdout.trim());\n } catch {\n throw Error(`Profile ${profileName} credential_process returned invalid JSON.`);\n }\n return getValidatedProcessCredentials(profileName, data, profiles);\n } catch (error) {\n throw new import_property_provider.CredentialsProviderError(error.message, { logger });\n }\n } else {\n throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} did not contain credential_process.`, { logger });\n }\n } else {\n throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} could not be found in shared credentials file.`, {\n logger\n });\n }\n}, \"resolveProcessCredentials\");\n\n// src/fromProcess.ts\nvar fromProcess = /* @__PURE__ */ __name((init = {}) => async ({ callerClientConfig } = {}) => {\n init.logger?.debug(\"@aws-sdk/credential-provider-process - fromProcess\");\n const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init);\n return resolveProcessCredentials(\n (0, import_shared_ini_file_loader.getProfileName)({\n profile: init.profile ?? callerClientConfig?.profile\n }),\n profiles,\n init.logger\n );\n}, \"fromProcess\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n fromProcess\n});\n\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __esm = (fn, res) => function __init() {\n return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;\n};\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/loadSso.ts\nvar loadSso_exports = {};\n__export(loadSso_exports, {\n GetRoleCredentialsCommand: () => import_client_sso.GetRoleCredentialsCommand,\n SSOClient: () => import_client_sso.SSOClient\n});\nvar import_client_sso;\nvar init_loadSso = __esm({\n \"src/loadSso.ts\"() {\n \"use strict\";\n import_client_sso = require(\"@aws-sdk/client-sso\");\n }\n});\n\n// src/index.ts\nvar index_exports = {};\n__export(index_exports, {\n fromSSO: () => fromSSO,\n isSsoProfile: () => isSsoProfile,\n validateSsoProfile: () => validateSsoProfile\n});\nmodule.exports = __toCommonJS(index_exports);\n\n// src/fromSSO.ts\n\n\n\n// src/isSsoProfile.ts\nvar isSsoProfile = /* @__PURE__ */ __name((arg) => arg && (typeof arg.sso_start_url === \"string\" || typeof arg.sso_account_id === \"string\" || typeof arg.sso_session === \"string\" || typeof arg.sso_region === \"string\" || typeof arg.sso_role_name === \"string\"), \"isSsoProfile\");\n\n// src/resolveSSOCredentials.ts\nvar import_client = require(\"@aws-sdk/core/client\");\nvar import_token_providers = require(\"@aws-sdk/token-providers\");\nvar import_property_provider = require(\"@smithy/property-provider\");\nvar import_shared_ini_file_loader = require(\"@smithy/shared-ini-file-loader\");\nvar SHOULD_FAIL_CREDENTIAL_CHAIN = false;\nvar resolveSSOCredentials = /* @__PURE__ */ __name(async ({\n ssoStartUrl,\n ssoSession,\n ssoAccountId,\n ssoRegion,\n ssoRoleName,\n ssoClient,\n clientConfig,\n parentClientConfig,\n profile,\n logger\n}) => {\n let token;\n const refreshMessage = `To refresh this SSO session run aws sso login with the corresponding profile.`;\n if (ssoSession) {\n try {\n const _token = await (0, import_token_providers.fromSso)({ profile })();\n token = {\n accessToken: _token.token,\n expiresAt: new Date(_token.expiration).toISOString()\n };\n } catch (e) {\n throw new import_property_provider.CredentialsProviderError(e.message, {\n tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,\n logger\n });\n }\n } else {\n try {\n token = await (0, import_shared_ini_file_loader.getSSOTokenFromFile)(ssoStartUrl);\n } catch (e) {\n throw new import_property_provider.CredentialsProviderError(`The SSO session associated with this profile is invalid. ${refreshMessage}`, {\n tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,\n logger\n });\n }\n }\n if (new Date(token.expiresAt).getTime() - Date.now() <= 0) {\n throw new import_property_provider.CredentialsProviderError(`The SSO session associated with this profile has expired. ${refreshMessage}`, {\n tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,\n logger\n });\n }\n const { accessToken } = token;\n const { SSOClient: SSOClient2, GetRoleCredentialsCommand: GetRoleCredentialsCommand2 } = await Promise.resolve().then(() => (init_loadSso(), loadSso_exports));\n const sso = ssoClient || new SSOClient2(\n Object.assign({}, clientConfig ?? {}, {\n logger: clientConfig?.logger ?? parentClientConfig?.logger,\n region: clientConfig?.region ?? ssoRegion\n })\n );\n let ssoResp;\n try {\n ssoResp = await sso.send(\n new GetRoleCredentialsCommand2({\n accountId: ssoAccountId,\n roleName: ssoRoleName,\n accessToken\n })\n );\n } catch (e) {\n throw new import_property_provider.CredentialsProviderError(e, {\n tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,\n logger\n });\n }\n const {\n roleCredentials: { accessKeyId, secretAccessKey, sessionToken, expiration, credentialScope, accountId } = {}\n } = ssoResp;\n if (!accessKeyId || !secretAccessKey || !sessionToken || !expiration) {\n throw new import_property_provider.CredentialsProviderError(\"SSO returns an invalid temporary credential.\", {\n tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,\n logger\n });\n }\n const credentials = {\n accessKeyId,\n secretAccessKey,\n sessionToken,\n expiration: new Date(expiration),\n ...credentialScope && { credentialScope },\n ...accountId && { accountId }\n };\n if (ssoSession) {\n (0, import_client.setCredentialFeature)(credentials, \"CREDENTIALS_SSO\", \"s\");\n } else {\n (0, import_client.setCredentialFeature)(credentials, \"CREDENTIALS_SSO_LEGACY\", \"u\");\n }\n return credentials;\n}, \"resolveSSOCredentials\");\n\n// src/validateSsoProfile.ts\n\nvar validateSsoProfile = /* @__PURE__ */ __name((profile, logger) => {\n const { sso_start_url, sso_account_id, sso_region, sso_role_name } = profile;\n if (!sso_start_url || !sso_account_id || !sso_region || !sso_role_name) {\n throw new import_property_provider.CredentialsProviderError(\n `Profile is configured with invalid SSO credentials. Required parameters \"sso_account_id\", \"sso_region\", \"sso_role_name\", \"sso_start_url\". Got ${Object.keys(profile).join(\n \", \"\n )}\nReference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`,\n { tryNextLink: false, logger }\n );\n }\n return profile;\n}, \"validateSsoProfile\");\n\n// src/fromSSO.ts\nvar fromSSO = /* @__PURE__ */ __name((init = {}) => async ({ callerClientConfig } = {}) => {\n init.logger?.debug(\"@aws-sdk/credential-provider-sso - fromSSO\");\n const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init;\n const { ssoClient } = init;\n const profileName = (0, import_shared_ini_file_loader.getProfileName)({\n profile: init.profile ?? callerClientConfig?.profile\n });\n if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) {\n const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init);\n const profile = profiles[profileName];\n if (!profile) {\n throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} was not found.`, { logger: init.logger });\n }\n if (!isSsoProfile(profile)) {\n throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} is not configured with SSO credentials.`, {\n logger: init.logger\n });\n }\n if (profile?.sso_session) {\n const ssoSessions = await (0, import_shared_ini_file_loader.loadSsoSessionData)(init);\n const session = ssoSessions[profile.sso_session];\n const conflictMsg = ` configurations in profile ${profileName} and sso-session ${profile.sso_session}`;\n if (ssoRegion && ssoRegion !== session.sso_region) {\n throw new import_property_provider.CredentialsProviderError(`Conflicting SSO region` + conflictMsg, {\n tryNextLink: false,\n logger: init.logger\n });\n }\n if (ssoStartUrl && ssoStartUrl !== session.sso_start_url) {\n throw new import_property_provider.CredentialsProviderError(`Conflicting SSO start_url` + conflictMsg, {\n tryNextLink: false,\n logger: init.logger\n });\n }\n profile.sso_region = session.sso_region;\n profile.sso_start_url = session.sso_start_url;\n }\n const { sso_start_url, sso_account_id, sso_region, sso_role_name, sso_session } = validateSsoProfile(\n profile,\n init.logger\n );\n return resolveSSOCredentials({\n ssoStartUrl: sso_start_url,\n ssoSession: sso_session,\n ssoAccountId: sso_account_id,\n ssoRegion: sso_region,\n ssoRoleName: sso_role_name,\n ssoClient,\n clientConfig: init.clientConfig,\n parentClientConfig: init.parentClientConfig,\n profile: profileName\n });\n } else if (!ssoStartUrl || !ssoAccountId || !ssoRegion || !ssoRoleName) {\n throw new import_property_provider.CredentialsProviderError(\n 'Incomplete configuration. The fromSSO() argument hash must include \"ssoStartUrl\", \"ssoAccountId\", \"ssoRegion\", \"ssoRoleName\"',\n { tryNextLink: false, logger: init.logger }\n );\n } else {\n return resolveSSOCredentials({\n ssoStartUrl,\n ssoSession,\n ssoAccountId,\n ssoRegion,\n ssoRoleName,\n ssoClient,\n clientConfig: init.clientConfig,\n parentClientConfig: init.parentClientConfig,\n profile: profileName\n });\n }\n}, \"fromSSO\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n fromSSO,\n isSsoProfile,\n validateSsoProfile\n});\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromTokenFile = void 0;\nconst client_1 = require(\"@aws-sdk/core/client\");\nconst property_provider_1 = require(\"@smithy/property-provider\");\nconst fs_1 = require(\"fs\");\nconst fromWebToken_1 = require(\"./fromWebToken\");\nconst ENV_TOKEN_FILE = \"AWS_WEB_IDENTITY_TOKEN_FILE\";\nconst ENV_ROLE_ARN = \"AWS_ROLE_ARN\";\nconst ENV_ROLE_SESSION_NAME = \"AWS_ROLE_SESSION_NAME\";\nconst fromTokenFile = (init = {}) => async () => {\n init.logger?.debug(\"@aws-sdk/credential-provider-web-identity - fromTokenFile\");\n const webIdentityTokenFile = init?.webIdentityTokenFile ?? process.env[ENV_TOKEN_FILE];\n const roleArn = init?.roleArn ?? process.env[ENV_ROLE_ARN];\n const roleSessionName = init?.roleSessionName ?? process.env[ENV_ROLE_SESSION_NAME];\n if (!webIdentityTokenFile || !roleArn) {\n throw new property_provider_1.CredentialsProviderError(\"Web identity configuration not specified\", {\n logger: init.logger,\n });\n }\n const credentials = await (0, fromWebToken_1.fromWebToken)({\n ...init,\n webIdentityToken: (0, fs_1.readFileSync)(webIdentityTokenFile, { encoding: \"ascii\" }),\n roleArn,\n roleSessionName,\n })();\n if (webIdentityTokenFile === process.env[ENV_TOKEN_FILE]) {\n (0, client_1.setCredentialFeature)(credentials, \"CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN\", \"h\");\n }\n return credentials;\n};\nexports.fromTokenFile = fromTokenFile;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || (function () {\n var ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n };\n return function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromWebToken = void 0;\nconst fromWebToken = (init) => async (awsIdentityProperties) => {\n init.logger?.debug(\"@aws-sdk/credential-provider-web-identity - fromWebToken\");\n const { roleArn, roleSessionName, webIdentityToken, providerId, policyArns, policy, durationSeconds } = init;\n let { roleAssumerWithWebIdentity } = init;\n if (!roleAssumerWithWebIdentity) {\n const { getDefaultRoleAssumerWithWebIdentity } = await Promise.resolve().then(() => __importStar(require(\"@aws-sdk/nested-clients/sts\")));\n roleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity({\n ...init.clientConfig,\n credentialProviderLogger: init.logger,\n parentClientConfig: {\n ...awsIdentityProperties?.callerClientConfig,\n ...init.parentClientConfig,\n },\n }, init.clientPlugins);\n }\n return roleAssumerWithWebIdentity({\n RoleArn: roleArn,\n RoleSessionName: roleSessionName ?? `aws-sdk-js-session-${Date.now()}`,\n WebIdentityToken: webIdentityToken,\n ProviderId: providerId,\n PolicyArns: policyArns,\n Policy: policy,\n DurationSeconds: durationSeconds,\n });\n};\nexports.fromWebToken = fromWebToken;\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar index_exports = {};\nmodule.exports = __toCommonJS(index_exports);\n__reExport(index_exports, require(\"././fromTokenFile\"), module.exports);\n__reExport(index_exports, require(\"././fromWebToken\"), module.exports);\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n fromTokenFile,\n fromWebToken\n});\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.propertyProviderChain = exports.createCredentialChain = void 0;\nconst property_provider_1 = require(\"@smithy/property-provider\");\nconst createCredentialChain = (...credentialProviders) => {\n let expireAfter = -1;\n const baseFunction = async (awsIdentityProperties) => {\n const credentials = await (0, exports.propertyProviderChain)(...credentialProviders)(awsIdentityProperties);\n if (!credentials.expiration && expireAfter !== -1) {\n credentials.expiration = new Date(Date.now() + expireAfter);\n }\n return credentials;\n };\n const withOptions = Object.assign(baseFunction, {\n expireAfter(milliseconds) {\n if (milliseconds < 5 * 60_000) {\n throw new Error(\"@aws-sdk/credential-providers - createCredentialChain(...).expireAfter(ms) may not be called with a duration lower than five minutes.\");\n }\n expireAfter = milliseconds;\n return withOptions;\n },\n });\n return withOptions;\n};\nexports.createCredentialChain = createCredentialChain;\nconst propertyProviderChain = (...providers) => async (awsIdentityProperties) => {\n if (providers.length === 0) {\n throw new property_provider_1.ProviderError(\"No providers in chain\");\n }\n let lastProviderError;\n for (const provider of providers) {\n try {\n const credentials = await provider(awsIdentityProperties);\n return credentials;\n }\n catch (err) {\n lastProviderError = err;\n if (err?.tryNextLink) {\n continue;\n }\n throw err;\n }\n }\n throw lastProviderError;\n};\nexports.propertyProviderChain = propertyProviderChain;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromCognitoIdentity = void 0;\nconst credential_provider_cognito_identity_1 = require(\"@aws-sdk/credential-provider-cognito-identity\");\nconst fromCognitoIdentity = (options) => (0, credential_provider_cognito_identity_1.fromCognitoIdentity)({\n ...options,\n});\nexports.fromCognitoIdentity = fromCognitoIdentity;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromCognitoIdentityPool = void 0;\nconst credential_provider_cognito_identity_1 = require(\"@aws-sdk/credential-provider-cognito-identity\");\nconst fromCognitoIdentityPool = (options) => (0, credential_provider_cognito_identity_1.fromCognitoIdentityPool)({\n ...options,\n});\nexports.fromCognitoIdentityPool = fromCognitoIdentityPool;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromContainerMetadata = void 0;\nconst credential_provider_imds_1 = require(\"@smithy/credential-provider-imds\");\nconst fromContainerMetadata = (init) => {\n init?.logger?.debug(\"@smithy/credential-provider-imds\", \"fromContainerMetadata\");\n return (0, credential_provider_imds_1.fromContainerMetadata)(init);\n};\nexports.fromContainerMetadata = fromContainerMetadata;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromEnv = void 0;\nconst credential_provider_env_1 = require(\"@aws-sdk/credential-provider-env\");\nconst fromEnv = (init) => (0, credential_provider_env_1.fromEnv)(init);\nexports.fromEnv = fromEnv;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromIni = void 0;\nconst credential_provider_ini_1 = require(\"@aws-sdk/credential-provider-ini\");\nconst fromIni = (init = {}) => (0, credential_provider_ini_1.fromIni)({\n ...init,\n});\nexports.fromIni = fromIni;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromInstanceMetadata = void 0;\nconst client_1 = require(\"@aws-sdk/core/client\");\nconst credential_provider_imds_1 = require(\"@smithy/credential-provider-imds\");\nconst fromInstanceMetadata = (init) => {\n init?.logger?.debug(\"@smithy/credential-provider-imds\", \"fromInstanceMetadata\");\n return async () => (0, credential_provider_imds_1.fromInstanceMetadata)(init)().then((creds) => (0, client_1.setCredentialFeature)(creds, \"CREDENTIALS_IMDS\", \"0\"));\n};\nexports.fromInstanceMetadata = fromInstanceMetadata;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromNodeProviderChain = void 0;\nconst credential_provider_node_1 = require(\"@aws-sdk/credential-provider-node\");\nconst fromNodeProviderChain = (init = {}) => (0, credential_provider_node_1.defaultProvider)({\n ...init,\n});\nexports.fromNodeProviderChain = fromNodeProviderChain;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromProcess = void 0;\nconst credential_provider_process_1 = require(\"@aws-sdk/credential-provider-process\");\nconst fromProcess = (init) => (0, credential_provider_process_1.fromProcess)(init);\nexports.fromProcess = fromProcess;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromSSO = void 0;\nconst credential_provider_sso_1 = require(\"@aws-sdk/credential-provider-sso\");\nconst fromSSO = (init = {}) => {\n return (0, credential_provider_sso_1.fromSSO)({ ...init });\n};\nexports.fromSSO = fromSSO;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || (function () {\n var ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n };\n return function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromTemporaryCredentials = void 0;\nconst core_1 = require(\"@smithy/core\");\nconst property_provider_1 = require(\"@smithy/property-provider\");\nconst ASSUME_ROLE_DEFAULT_REGION = \"us-east-1\";\nconst fromTemporaryCredentials = (options, credentialDefaultProvider, regionProvider) => {\n let stsClient;\n return async (awsIdentityProperties = {}) => {\n const { callerClientConfig } = awsIdentityProperties;\n const profile = options.clientConfig?.profile ?? callerClientConfig?.profile;\n const logger = options.logger ?? callerClientConfig?.logger;\n logger?.debug(\"@aws-sdk/credential-providers - fromTemporaryCredentials (STS)\");\n const params = { ...options.params, RoleSessionName: options.params.RoleSessionName ?? \"aws-sdk-js-\" + Date.now() };\n if (params?.SerialNumber) {\n if (!options.mfaCodeProvider) {\n throw new property_provider_1.CredentialsProviderError(`Temporary credential requires multi-factor authentication, but no MFA code callback was provided.`, {\n tryNextLink: false,\n logger,\n });\n }\n params.TokenCode = await options.mfaCodeProvider(params?.SerialNumber);\n }\n const { AssumeRoleCommand, STSClient } = await Promise.resolve().then(() => __importStar(require(\"./loadSts\")));\n if (!stsClient) {\n const defaultCredentialsOrError = typeof credentialDefaultProvider === \"function\" ? credentialDefaultProvider() : undefined;\n const credentialSources = [\n options.masterCredentials,\n options.clientConfig?.credentials,\n void callerClientConfig?.credentials,\n callerClientConfig?.credentialDefaultProvider?.(),\n defaultCredentialsOrError,\n ];\n let credentialSource = \"STS client default credentials\";\n if (credentialSources[0]) {\n credentialSource = \"options.masterCredentials\";\n }\n else if (credentialSources[1]) {\n credentialSource = \"options.clientConfig.credentials\";\n }\n else if (credentialSources[2]) {\n credentialSource = \"caller client's credentials\";\n throw new Error(\"fromTemporaryCredentials recursion in callerClientConfig.credentials\");\n }\n else if (credentialSources[3]) {\n credentialSource = \"caller client's credentialDefaultProvider\";\n }\n else if (credentialSources[4]) {\n credentialSource = \"AWS SDK default credentials\";\n }\n const regionSources = [\n options.clientConfig?.region,\n callerClientConfig?.region,\n await regionProvider?.({\n profile,\n }),\n ASSUME_ROLE_DEFAULT_REGION,\n ];\n let regionSource = \"default partition's default region\";\n if (regionSources[0]) {\n regionSource = \"options.clientConfig.region\";\n }\n else if (regionSources[1]) {\n regionSource = \"caller client's region\";\n }\n else if (regionSources[2]) {\n regionSource = \"file or env region\";\n }\n const requestHandlerSources = [\n filterRequestHandler(options.clientConfig?.requestHandler),\n filterRequestHandler(callerClientConfig?.requestHandler),\n ];\n let requestHandlerSource = \"STS default requestHandler\";\n if (requestHandlerSources[0]) {\n requestHandlerSource = \"options.clientConfig.requestHandler\";\n }\n else if (requestHandlerSources[1]) {\n requestHandlerSource = \"caller client's requestHandler\";\n }\n logger?.debug?.(`@aws-sdk/credential-providers - fromTemporaryCredentials STS client init with ` +\n `${regionSource}=${await (0, core_1.normalizeProvider)(coalesce(regionSources))()}, ${credentialSource}, ${requestHandlerSource}.`);\n stsClient = new STSClient({\n ...options.clientConfig,\n credentials: coalesce(credentialSources),\n logger,\n profile,\n region: coalesce(regionSources),\n requestHandler: coalesce(requestHandlerSources),\n });\n }\n if (options.clientPlugins) {\n for (const plugin of options.clientPlugins) {\n stsClient.middlewareStack.use(plugin);\n }\n }\n const { Credentials } = await stsClient.send(new AssumeRoleCommand(params));\n if (!Credentials || !Credentials.AccessKeyId || !Credentials.SecretAccessKey) {\n throw new property_provider_1.CredentialsProviderError(`Invalid response from STS.assumeRole call with role ${params.RoleArn}`, {\n logger,\n });\n }\n return {\n accessKeyId: Credentials.AccessKeyId,\n secretAccessKey: Credentials.SecretAccessKey,\n sessionToken: Credentials.SessionToken,\n expiration: Credentials.Expiration,\n credentialScope: Credentials.CredentialScope,\n };\n };\n};\nexports.fromTemporaryCredentials = fromTemporaryCredentials;\nconst filterRequestHandler = (requestHandler) => {\n return requestHandler?.metadata?.handlerProtocol === \"h2\" ? undefined : requestHandler;\n};\nconst coalesce = (args) => {\n for (const item of args) {\n if (item !== undefined) {\n return item;\n }\n }\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromTemporaryCredentials = void 0;\nconst config_resolver_1 = require(\"@smithy/config-resolver\");\nconst node_config_provider_1 = require(\"@smithy/node-config-provider\");\nconst fromNodeProviderChain_1 = require(\"./fromNodeProviderChain\");\nconst fromTemporaryCredentials_base_1 = require(\"./fromTemporaryCredentials.base\");\nconst fromTemporaryCredentials = (options) => {\n return (0, fromTemporaryCredentials_base_1.fromTemporaryCredentials)(options, fromNodeProviderChain_1.fromNodeProviderChain, async ({ profile = process.env.AWS_PROFILE }) => (0, node_config_provider_1.loadConfig)({\n environmentVariableSelector: (env) => env.AWS_REGION,\n configFileSelector: (profileData) => {\n return profileData.region;\n },\n default: () => undefined,\n }, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, profile })());\n};\nexports.fromTemporaryCredentials = fromTemporaryCredentials;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromTokenFile = void 0;\nconst credential_provider_web_identity_1 = require(\"@aws-sdk/credential-provider-web-identity\");\nconst fromTokenFile = (init = {}) => (0, credential_provider_web_identity_1.fromTokenFile)({\n ...init,\n});\nexports.fromTokenFile = fromTokenFile;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromWebToken = void 0;\nconst credential_provider_web_identity_1 = require(\"@aws-sdk/credential-provider-web-identity\");\nconst fromWebToken = (init) => (0, credential_provider_web_identity_1.fromWebToken)({\n ...init,\n});\nexports.fromWebToken = fromWebToken;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromHttp = void 0;\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./createCredentialChain\"), exports);\ntslib_1.__exportStar(require(\"./fromCognitoIdentity\"), exports);\ntslib_1.__exportStar(require(\"./fromCognitoIdentityPool\"), exports);\ntslib_1.__exportStar(require(\"./fromContainerMetadata\"), exports);\nvar credential_provider_http_1 = require(\"@aws-sdk/credential-provider-http\");\nObject.defineProperty(exports, \"fromHttp\", { enumerable: true, get: function () { return credential_provider_http_1.fromHttp; } });\ntslib_1.__exportStar(require(\"./fromEnv\"), exports);\ntslib_1.__exportStar(require(\"./fromIni\"), exports);\ntslib_1.__exportStar(require(\"./fromInstanceMetadata\"), exports);\ntslib_1.__exportStar(require(\"./fromNodeProviderChain\"), exports);\ntslib_1.__exportStar(require(\"./fromProcess\"), exports);\ntslib_1.__exportStar(require(\"./fromSSO\"), exports);\ntslib_1.__exportStar(require(\"./fromTemporaryCredentials\"), exports);\ntslib_1.__exportStar(require(\"./fromTokenFile\"), exports);\ntslib_1.__exportStar(require(\"./fromWebToken\"), exports);\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.STSClient = exports.AssumeRoleCommand = void 0;\nconst sts_1 = require(\"@aws-sdk/nested-clients/sts\");\nObject.defineProperty(exports, \"AssumeRoleCommand\", { enumerable: true, get: function () { return sts_1.AssumeRoleCommand; } });\nObject.defineProperty(exports, \"STSClient\", { enumerable: true, get: function () { return sts_1.STSClient; } });\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar index_exports = {};\n__export(index_exports, {\n getHostHeaderPlugin: () => getHostHeaderPlugin,\n hostHeaderMiddleware: () => hostHeaderMiddleware,\n hostHeaderMiddlewareOptions: () => hostHeaderMiddlewareOptions,\n resolveHostHeaderConfig: () => resolveHostHeaderConfig\n});\nmodule.exports = __toCommonJS(index_exports);\nvar import_protocol_http = require(\"@smithy/protocol-http\");\nfunction resolveHostHeaderConfig(input) {\n return input;\n}\n__name(resolveHostHeaderConfig, \"resolveHostHeaderConfig\");\nvar hostHeaderMiddleware = /* @__PURE__ */ __name((options) => (next) => async (args) => {\n if (!import_protocol_http.HttpRequest.isInstance(args.request)) return next(args);\n const { request } = args;\n const { handlerProtocol = \"\" } = options.requestHandler.metadata || {};\n if (handlerProtocol.indexOf(\"h2\") >= 0 && !request.headers[\":authority\"]) {\n delete request.headers[\"host\"];\n request.headers[\":authority\"] = request.hostname + (request.port ? \":\" + request.port : \"\");\n } else if (!request.headers[\"host\"]) {\n let host = request.hostname;\n if (request.port != null) host += `:${request.port}`;\n request.headers[\"host\"] = host;\n }\n return next(args);\n}, \"hostHeaderMiddleware\");\nvar hostHeaderMiddlewareOptions = {\n name: \"hostHeaderMiddleware\",\n step: \"build\",\n priority: \"low\",\n tags: [\"HOST\"],\n override: true\n};\nvar getHostHeaderPlugin = /* @__PURE__ */ __name((options) => ({\n applyToStack: /* @__PURE__ */ __name((clientStack) => {\n clientStack.add(hostHeaderMiddleware(options), hostHeaderMiddlewareOptions);\n }, \"applyToStack\")\n}), \"getHostHeaderPlugin\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n hostHeaderMiddleware,\n hostHeaderMiddlewareOptions,\n getHostHeaderPlugin,\n resolveHostHeaderConfig\n});\n\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar index_exports = {};\n__export(index_exports, {\n getLoggerPlugin: () => getLoggerPlugin,\n loggerMiddleware: () => loggerMiddleware,\n loggerMiddlewareOptions: () => loggerMiddlewareOptions\n});\nmodule.exports = __toCommonJS(index_exports);\n\n// src/loggerMiddleware.ts\nvar loggerMiddleware = /* @__PURE__ */ __name(() => (next, context) => async (args) => {\n try {\n const response = await next(args);\n const { clientName, commandName, logger, dynamoDbDocumentClientOptions = {} } = context;\n const { overrideInputFilterSensitiveLog, overrideOutputFilterSensitiveLog } = dynamoDbDocumentClientOptions;\n const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog;\n const outputFilterSensitiveLog = overrideOutputFilterSensitiveLog ?? context.outputFilterSensitiveLog;\n const { $metadata, ...outputWithoutMetadata } = response.output;\n logger?.info?.({\n clientName,\n commandName,\n input: inputFilterSensitiveLog(args.input),\n output: outputFilterSensitiveLog(outputWithoutMetadata),\n metadata: $metadata\n });\n return response;\n } catch (error) {\n const { clientName, commandName, logger, dynamoDbDocumentClientOptions = {} } = context;\n const { overrideInputFilterSensitiveLog } = dynamoDbDocumentClientOptions;\n const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog;\n logger?.error?.({\n clientName,\n commandName,\n input: inputFilterSensitiveLog(args.input),\n error,\n metadata: error.$metadata\n });\n throw error;\n }\n}, \"loggerMiddleware\");\nvar loggerMiddlewareOptions = {\n name: \"loggerMiddleware\",\n tags: [\"LOGGER\"],\n step: \"initialize\",\n override: true\n};\nvar getLoggerPlugin = /* @__PURE__ */ __name((options) => ({\n applyToStack: /* @__PURE__ */ __name((clientStack) => {\n clientStack.add(loggerMiddleware(), loggerMiddlewareOptions);\n }, \"applyToStack\")\n}), \"getLoggerPlugin\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n loggerMiddleware,\n loggerMiddlewareOptions,\n getLoggerPlugin\n});\n\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar index_exports = {};\n__export(index_exports, {\n addRecursionDetectionMiddlewareOptions: () => addRecursionDetectionMiddlewareOptions,\n getRecursionDetectionPlugin: () => getRecursionDetectionPlugin,\n recursionDetectionMiddleware: () => recursionDetectionMiddleware\n});\nmodule.exports = __toCommonJS(index_exports);\nvar import_protocol_http = require(\"@smithy/protocol-http\");\nvar TRACE_ID_HEADER_NAME = \"X-Amzn-Trace-Id\";\nvar ENV_LAMBDA_FUNCTION_NAME = \"AWS_LAMBDA_FUNCTION_NAME\";\nvar ENV_TRACE_ID = \"_X_AMZN_TRACE_ID\";\nvar recursionDetectionMiddleware = /* @__PURE__ */ __name((options) => (next) => async (args) => {\n const { request } = args;\n if (!import_protocol_http.HttpRequest.isInstance(request) || options.runtime !== \"node\") {\n return next(args);\n }\n const traceIdHeader = Object.keys(request.headers ?? {}).find((h) => h.toLowerCase() === TRACE_ID_HEADER_NAME.toLowerCase()) ?? TRACE_ID_HEADER_NAME;\n if (request.headers.hasOwnProperty(traceIdHeader)) {\n return next(args);\n }\n const functionName = process.env[ENV_LAMBDA_FUNCTION_NAME];\n const traceId = process.env[ENV_TRACE_ID];\n const nonEmptyString = /* @__PURE__ */ __name((str) => typeof str === \"string\" && str.length > 0, \"nonEmptyString\");\n if (nonEmptyString(functionName) && nonEmptyString(traceId)) {\n request.headers[TRACE_ID_HEADER_NAME] = traceId;\n }\n return next({\n ...args,\n request\n });\n}, \"recursionDetectionMiddleware\");\nvar addRecursionDetectionMiddlewareOptions = {\n step: \"build\",\n tags: [\"RECURSION_DETECTION\"],\n name: \"recursionDetectionMiddleware\",\n override: true,\n priority: \"low\"\n};\nvar getRecursionDetectionPlugin = /* @__PURE__ */ __name((options) => ({\n applyToStack: /* @__PURE__ */ __name((clientStack) => {\n clientStack.add(recursionDetectionMiddleware(options), addRecursionDetectionMiddlewareOptions);\n }, \"applyToStack\")\n}), \"getRecursionDetectionPlugin\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n recursionDetectionMiddleware,\n addRecursionDetectionMiddlewareOptions,\n getRecursionDetectionPlugin\n});\n\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar index_exports = {};\n__export(index_exports, {\n DEFAULT_UA_APP_ID: () => DEFAULT_UA_APP_ID,\n getUserAgentMiddlewareOptions: () => getUserAgentMiddlewareOptions,\n getUserAgentPlugin: () => getUserAgentPlugin,\n resolveUserAgentConfig: () => resolveUserAgentConfig,\n userAgentMiddleware: () => userAgentMiddleware\n});\nmodule.exports = __toCommonJS(index_exports);\n\n// src/configurations.ts\nvar import_core = require(\"@smithy/core\");\nvar DEFAULT_UA_APP_ID = void 0;\nfunction isValidUserAgentAppId(appId) {\n if (appId === void 0) {\n return true;\n }\n return typeof appId === \"string\" && appId.length <= 50;\n}\n__name(isValidUserAgentAppId, \"isValidUserAgentAppId\");\nfunction resolveUserAgentConfig(input) {\n const normalizedAppIdProvider = (0, import_core.normalizeProvider)(input.userAgentAppId ?? DEFAULT_UA_APP_ID);\n const { customUserAgent } = input;\n return Object.assign(input, {\n customUserAgent: typeof customUserAgent === \"string\" ? [[customUserAgent]] : customUserAgent,\n userAgentAppId: /* @__PURE__ */ __name(async () => {\n const appId = await normalizedAppIdProvider();\n if (!isValidUserAgentAppId(appId)) {\n const logger = input.logger?.constructor?.name === \"NoOpLogger\" || !input.logger ? console : input.logger;\n if (typeof appId !== \"string\") {\n logger?.warn(\"userAgentAppId must be a string or undefined.\");\n } else if (appId.length > 50) {\n logger?.warn(\"The provided userAgentAppId exceeds the maximum length of 50 characters.\");\n }\n }\n return appId;\n }, \"userAgentAppId\")\n });\n}\n__name(resolveUserAgentConfig, \"resolveUserAgentConfig\");\n\n// src/user-agent-middleware.ts\nvar import_util_endpoints = require(\"@aws-sdk/util-endpoints\");\nvar import_protocol_http = require(\"@smithy/protocol-http\");\n\n// src/check-features.ts\nvar import_core2 = require(\"@aws-sdk/core\");\nvar ACCOUNT_ID_ENDPOINT_REGEX = /\\d{12}\\.ddb/;\nasync function checkFeatures(context, config, args) {\n const request = args.request;\n if (request?.headers?.[\"smithy-protocol\"] === \"rpc-v2-cbor\") {\n (0, import_core2.setFeature)(context, \"PROTOCOL_RPC_V2_CBOR\", \"M\");\n }\n if (typeof config.retryStrategy === \"function\") {\n const retryStrategy = await config.retryStrategy();\n if (typeof retryStrategy.acquireInitialRetryToken === \"function\") {\n if (retryStrategy.constructor?.name?.includes(\"Adaptive\")) {\n (0, import_core2.setFeature)(context, \"RETRY_MODE_ADAPTIVE\", \"F\");\n } else {\n (0, import_core2.setFeature)(context, \"RETRY_MODE_STANDARD\", \"E\");\n }\n } else {\n (0, import_core2.setFeature)(context, \"RETRY_MODE_LEGACY\", \"D\");\n }\n }\n if (typeof config.accountIdEndpointMode === \"function\") {\n const endpointV2 = context.endpointV2;\n if (String(endpointV2?.url?.hostname).match(ACCOUNT_ID_ENDPOINT_REGEX)) {\n (0, import_core2.setFeature)(context, \"ACCOUNT_ID_ENDPOINT\", \"O\");\n }\n switch (await config.accountIdEndpointMode?.()) {\n case \"disabled\":\n (0, import_core2.setFeature)(context, \"ACCOUNT_ID_MODE_DISABLED\", \"Q\");\n break;\n case \"preferred\":\n (0, import_core2.setFeature)(context, \"ACCOUNT_ID_MODE_PREFERRED\", \"P\");\n break;\n case \"required\":\n (0, import_core2.setFeature)(context, \"ACCOUNT_ID_MODE_REQUIRED\", \"R\");\n break;\n }\n }\n const identity = context.__smithy_context?.selectedHttpAuthScheme?.identity;\n if (identity?.$source) {\n const credentials = identity;\n if (credentials.accountId) {\n (0, import_core2.setFeature)(context, \"RESOLVED_ACCOUNT_ID\", \"T\");\n }\n for (const [key, value] of Object.entries(credentials.$source ?? {})) {\n (0, import_core2.setFeature)(context, key, value);\n }\n }\n}\n__name(checkFeatures, \"checkFeatures\");\n\n// src/constants.ts\nvar USER_AGENT = \"user-agent\";\nvar X_AMZ_USER_AGENT = \"x-amz-user-agent\";\nvar SPACE = \" \";\nvar UA_NAME_SEPARATOR = \"/\";\nvar UA_NAME_ESCAPE_REGEX = /[^\\!\\$\\%\\&\\'\\*\\+\\-\\.\\^\\_\\`\\|\\~\\d\\w]/g;\nvar UA_VALUE_ESCAPE_REGEX = /[^\\!\\$\\%\\&\\'\\*\\+\\-\\.\\^\\_\\`\\|\\~\\d\\w\\#]/g;\nvar UA_ESCAPE_CHAR = \"-\";\n\n// src/encode-features.ts\nvar BYTE_LIMIT = 1024;\nfunction encodeFeatures(features) {\n let buffer = \"\";\n for (const key in features) {\n const val = features[key];\n if (buffer.length + val.length + 1 <= BYTE_LIMIT) {\n if (buffer.length) {\n buffer += \",\" + val;\n } else {\n buffer += val;\n }\n continue;\n }\n break;\n }\n return buffer;\n}\n__name(encodeFeatures, \"encodeFeatures\");\n\n// src/user-agent-middleware.ts\nvar userAgentMiddleware = /* @__PURE__ */ __name((options) => (next, context) => async (args) => {\n const { request } = args;\n if (!import_protocol_http.HttpRequest.isInstance(request)) {\n return next(args);\n }\n const { headers } = request;\n const userAgent = context?.userAgent?.map(escapeUserAgent) || [];\n const defaultUserAgent = (await options.defaultUserAgentProvider()).map(escapeUserAgent);\n await checkFeatures(context, options, args);\n const awsContext = context;\n defaultUserAgent.push(\n `m/${encodeFeatures(\n Object.assign({}, context.__smithy_context?.features, awsContext.__aws_sdk_context?.features)\n )}`\n );\n const customUserAgent = options?.customUserAgent?.map(escapeUserAgent) || [];\n const appId = await options.userAgentAppId();\n if (appId) {\n defaultUserAgent.push(escapeUserAgent([`app/${appId}`]));\n }\n const prefix = (0, import_util_endpoints.getUserAgentPrefix)();\n const sdkUserAgentValue = (prefix ? [prefix] : []).concat([...defaultUserAgent, ...userAgent, ...customUserAgent]).join(SPACE);\n const normalUAValue = [\n ...defaultUserAgent.filter((section) => section.startsWith(\"aws-sdk-\")),\n ...customUserAgent\n ].join(SPACE);\n if (options.runtime !== \"browser\") {\n if (normalUAValue) {\n headers[X_AMZ_USER_AGENT] = headers[X_AMZ_USER_AGENT] ? `${headers[USER_AGENT]} ${normalUAValue}` : normalUAValue;\n }\n headers[USER_AGENT] = sdkUserAgentValue;\n } else {\n headers[X_AMZ_USER_AGENT] = sdkUserAgentValue;\n }\n return next({\n ...args,\n request\n });\n}, \"userAgentMiddleware\");\nvar escapeUserAgent = /* @__PURE__ */ __name((userAgentPair) => {\n const name = userAgentPair[0].split(UA_NAME_SEPARATOR).map((part) => part.replace(UA_NAME_ESCAPE_REGEX, UA_ESCAPE_CHAR)).join(UA_NAME_SEPARATOR);\n const version = userAgentPair[1]?.replace(UA_VALUE_ESCAPE_REGEX, UA_ESCAPE_CHAR);\n const prefixSeparatorIndex = name.indexOf(UA_NAME_SEPARATOR);\n const prefix = name.substring(0, prefixSeparatorIndex);\n let uaName = name.substring(prefixSeparatorIndex + 1);\n if (prefix === \"api\") {\n uaName = uaName.toLowerCase();\n }\n return [prefix, uaName, version].filter((item) => item && item.length > 0).reduce((acc, item, index) => {\n switch (index) {\n case 0:\n return item;\n case 1:\n return `${acc}/${item}`;\n default:\n return `${acc}#${item}`;\n }\n }, \"\");\n}, \"escapeUserAgent\");\nvar getUserAgentMiddlewareOptions = {\n name: \"getUserAgentMiddleware\",\n step: \"build\",\n priority: \"low\",\n tags: [\"SET_USER_AGENT\", \"USER_AGENT\"],\n override: true\n};\nvar getUserAgentPlugin = /* @__PURE__ */ __name((config) => ({\n applyToStack: /* @__PURE__ */ __name((clientStack) => {\n clientStack.add(userAgentMiddleware(config), getUserAgentMiddlewareOptions);\n }, \"applyToStack\")\n}), \"getUserAgentPlugin\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n DEFAULT_UA_APP_ID,\n resolveUserAgentConfig,\n userAgentMiddleware,\n getUserAgentMiddlewareOptions,\n getUserAgentPlugin\n});\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resolveHttpAuthSchemeConfig = exports.defaultSSOOIDCHttpAuthSchemeProvider = exports.defaultSSOOIDCHttpAuthSchemeParametersProvider = void 0;\nconst core_1 = require(\"@aws-sdk/core\");\nconst util_middleware_1 = require(\"@smithy/util-middleware\");\nconst defaultSSOOIDCHttpAuthSchemeParametersProvider = async (config, context, input) => {\n return {\n operation: (0, util_middleware_1.getSmithyContext)(context).operation,\n region: (await (0, util_middleware_1.normalizeProvider)(config.region)()) ||\n (() => {\n throw new Error(\"expected `region` to be configured for `aws.auth#sigv4`\");\n })(),\n };\n};\nexports.defaultSSOOIDCHttpAuthSchemeParametersProvider = defaultSSOOIDCHttpAuthSchemeParametersProvider;\nfunction createAwsAuthSigv4HttpAuthOption(authParameters) {\n return {\n schemeId: \"aws.auth#sigv4\",\n signingProperties: {\n name: \"sso-oauth\",\n region: authParameters.region,\n },\n propertiesExtractor: (config, context) => ({\n signingProperties: {\n config,\n context,\n },\n }),\n };\n}\nfunction createSmithyApiNoAuthHttpAuthOption(authParameters) {\n return {\n schemeId: \"smithy.api#noAuth\",\n };\n}\nconst defaultSSOOIDCHttpAuthSchemeProvider = (authParameters) => {\n const options = [];\n switch (authParameters.operation) {\n case \"CreateToken\": {\n options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));\n break;\n }\n default: {\n options.push(createAwsAuthSigv4HttpAuthOption(authParameters));\n }\n }\n return options;\n};\nexports.defaultSSOOIDCHttpAuthSchemeProvider = defaultSSOOIDCHttpAuthSchemeProvider;\nconst resolveHttpAuthSchemeConfig = (config) => {\n const config_0 = (0, core_1.resolveAwsSdkSigV4Config)(config);\n return Object.assign(config_0, {\n authSchemePreference: (0, util_middleware_1.normalizeProvider)(config.authSchemePreference ?? []),\n });\n};\nexports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.defaultEndpointResolver = void 0;\nconst util_endpoints_1 = require(\"@aws-sdk/util-endpoints\");\nconst util_endpoints_2 = require(\"@smithy/util-endpoints\");\nconst ruleset_1 = require(\"./ruleset\");\nconst cache = new util_endpoints_2.EndpointCache({\n size: 50,\n params: [\"Endpoint\", \"Region\", \"UseDualStack\", \"UseFIPS\"],\n});\nconst defaultEndpointResolver = (endpointParams, context = {}) => {\n return cache.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, {\n endpointParams: endpointParams,\n logger: context.logger,\n }));\n};\nexports.defaultEndpointResolver = defaultEndpointResolver;\nutil_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ruleSet = void 0;\nconst u = \"required\", v = \"fn\", w = \"argv\", x = \"ref\";\nconst a = true, b = \"isSet\", c = \"booleanEquals\", d = \"error\", e = \"endpoint\", f = \"tree\", g = \"PartitionResult\", h = \"getAttr\", i = { [u]: false, \"type\": \"String\" }, j = { [u]: true, \"default\": false, \"type\": \"Boolean\" }, k = { [x]: \"Endpoint\" }, l = { [v]: c, [w]: [{ [x]: \"UseFIPS\" }, true] }, m = { [v]: c, [w]: [{ [x]: \"UseDualStack\" }, true] }, n = {}, o = { [v]: h, [w]: [{ [x]: g }, \"supportsFIPS\"] }, p = { [x]: g }, q = { [v]: c, [w]: [true, { [v]: h, [w]: [p, \"supportsDualStack\"] }] }, r = [l], s = [m], t = [{ [x]: \"Region\" }];\nconst _data = { version: \"1.0\", parameters: { Region: i, UseDualStack: j, UseFIPS: j, Endpoint: i }, rules: [{ conditions: [{ [v]: b, [w]: [k] }], rules: [{ conditions: r, error: \"Invalid Configuration: FIPS and custom endpoint are not supported\", type: d }, { conditions: s, error: \"Invalid Configuration: Dualstack and custom endpoint are not supported\", type: d }, { endpoint: { url: k, properties: n, headers: n }, type: e }], type: f }, { conditions: [{ [v]: b, [w]: t }], rules: [{ conditions: [{ [v]: \"aws.partition\", [w]: t, assign: g }], rules: [{ conditions: [l, m], rules: [{ conditions: [{ [v]: c, [w]: [a, o] }, q], rules: [{ endpoint: { url: \"https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}\", properties: n, headers: n }, type: e }], type: f }, { error: \"FIPS and DualStack are enabled, but this partition does not support one or both\", type: d }], type: f }, { conditions: r, rules: [{ conditions: [{ [v]: c, [w]: [o, a] }], rules: [{ conditions: [{ [v]: \"stringEquals\", [w]: [{ [v]: h, [w]: [p, \"name\"] }, \"aws-us-gov\"] }], endpoint: { url: \"https://oidc.{Region}.amazonaws.com\", properties: n, headers: n }, type: e }, { endpoint: { url: \"https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}\", properties: n, headers: n }, type: e }], type: f }, { error: \"FIPS is enabled but this partition does not support FIPS\", type: d }], type: f }, { conditions: s, rules: [{ conditions: [q], rules: [{ endpoint: { url: \"https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}\", properties: n, headers: n }, type: e }], type: f }, { error: \"DualStack is enabled but this partition does not support DualStack\", type: d }], type: f }, { endpoint: { url: \"https://oidc.{Region}.{PartitionResult#dnsSuffix}\", properties: n, headers: n }, type: e }], type: f }], type: f }, { error: \"Invalid Configuration: Missing Region\", type: d }] };\nexports.ruleSet = _data;\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/submodules/sso-oidc/index.ts\nvar index_exports = {};\n__export(index_exports, {\n $Command: () => import_smithy_client6.Command,\n AccessDeniedException: () => AccessDeniedException,\n AuthorizationPendingException: () => AuthorizationPendingException,\n CreateTokenCommand: () => CreateTokenCommand,\n CreateTokenRequestFilterSensitiveLog: () => CreateTokenRequestFilterSensitiveLog,\n CreateTokenResponseFilterSensitiveLog: () => CreateTokenResponseFilterSensitiveLog,\n ExpiredTokenException: () => ExpiredTokenException,\n InternalServerException: () => InternalServerException,\n InvalidClientException: () => InvalidClientException,\n InvalidGrantException: () => InvalidGrantException,\n InvalidRequestException: () => InvalidRequestException,\n InvalidScopeException: () => InvalidScopeException,\n SSOOIDC: () => SSOOIDC,\n SSOOIDCClient: () => SSOOIDCClient,\n SSOOIDCServiceException: () => SSOOIDCServiceException,\n SlowDownException: () => SlowDownException,\n UnauthorizedClientException: () => UnauthorizedClientException,\n UnsupportedGrantTypeException: () => UnsupportedGrantTypeException,\n __Client: () => import_smithy_client2.Client\n});\nmodule.exports = __toCommonJS(index_exports);\n\n// src/submodules/sso-oidc/SSOOIDCClient.ts\nvar import_middleware_host_header = require(\"@aws-sdk/middleware-host-header\");\nvar import_middleware_logger = require(\"@aws-sdk/middleware-logger\");\nvar import_middleware_recursion_detection = require(\"@aws-sdk/middleware-recursion-detection\");\nvar import_middleware_user_agent = require(\"@aws-sdk/middleware-user-agent\");\nvar import_config_resolver = require(\"@smithy/config-resolver\");\nvar import_core = require(\"@smithy/core\");\nvar import_middleware_content_length = require(\"@smithy/middleware-content-length\");\nvar import_middleware_endpoint = require(\"@smithy/middleware-endpoint\");\nvar import_middleware_retry = require(\"@smithy/middleware-retry\");\nvar import_smithy_client2 = require(\"@smithy/smithy-client\");\nvar import_httpAuthSchemeProvider = require(\"./auth/httpAuthSchemeProvider\");\n\n// src/submodules/sso-oidc/endpoint/EndpointParameters.ts\nvar resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {\n return Object.assign(options, {\n useDualstackEndpoint: options.useDualstackEndpoint ?? false,\n useFipsEndpoint: options.useFipsEndpoint ?? false,\n defaultSigningName: \"sso-oauth\"\n });\n}, \"resolveClientEndpointParameters\");\nvar commonParams = {\n UseFIPS: { type: \"builtInParams\", name: \"useFipsEndpoint\" },\n Endpoint: { type: \"builtInParams\", name: \"endpoint\" },\n Region: { type: \"builtInParams\", name: \"region\" },\n UseDualStack: { type: \"builtInParams\", name: \"useDualstackEndpoint\" }\n};\n\n// src/submodules/sso-oidc/SSOOIDCClient.ts\nvar import_runtimeConfig = require(\"./runtimeConfig\");\n\n// src/submodules/sso-oidc/runtimeExtensions.ts\nvar import_region_config_resolver = require(\"@aws-sdk/region-config-resolver\");\nvar import_protocol_http = require(\"@smithy/protocol-http\");\nvar import_smithy_client = require(\"@smithy/smithy-client\");\n\n// src/submodules/sso-oidc/auth/httpAuthExtensionConfiguration.ts\nvar getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {\n const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;\n let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;\n let _credentials = runtimeConfig.credentials;\n return {\n setHttpAuthScheme(httpAuthScheme) {\n const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);\n if (index === -1) {\n _httpAuthSchemes.push(httpAuthScheme);\n } else {\n _httpAuthSchemes.splice(index, 1, httpAuthScheme);\n }\n },\n httpAuthSchemes() {\n return _httpAuthSchemes;\n },\n setHttpAuthSchemeProvider(httpAuthSchemeProvider) {\n _httpAuthSchemeProvider = httpAuthSchemeProvider;\n },\n httpAuthSchemeProvider() {\n return _httpAuthSchemeProvider;\n },\n setCredentials(credentials) {\n _credentials = credentials;\n },\n credentials() {\n return _credentials;\n }\n };\n}, \"getHttpAuthExtensionConfiguration\");\nvar resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => {\n return {\n httpAuthSchemes: config.httpAuthSchemes(),\n httpAuthSchemeProvider: config.httpAuthSchemeProvider(),\n credentials: config.credentials()\n };\n}, \"resolveHttpAuthRuntimeConfig\");\n\n// src/submodules/sso-oidc/runtimeExtensions.ts\nvar resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {\n const extensionConfiguration = Object.assign(\n (0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig),\n (0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig),\n (0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig),\n getHttpAuthExtensionConfiguration(runtimeConfig)\n );\n extensions.forEach((extension) => extension.configure(extensionConfiguration));\n return Object.assign(\n runtimeConfig,\n (0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),\n (0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),\n (0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),\n resolveHttpAuthRuntimeConfig(extensionConfiguration)\n );\n}, \"resolveRuntimeExtensions\");\n\n// src/submodules/sso-oidc/SSOOIDCClient.ts\nvar SSOOIDCClient = class extends import_smithy_client2.Client {\n static {\n __name(this, \"SSOOIDCClient\");\n }\n /**\n * The resolved configuration of SSOOIDCClient class. This is resolved and normalized from the {@link SSOOIDCClientConfig | constructor configuration interface}.\n */\n config;\n constructor(...[configuration]) {\n const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});\n super(_config_0);\n this.initConfig = _config_0;\n const _config_1 = resolveClientEndpointParameters(_config_0);\n const _config_2 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_1);\n const _config_3 = (0, import_middleware_retry.resolveRetryConfig)(_config_2);\n const _config_4 = (0, import_config_resolver.resolveRegionConfig)(_config_3);\n const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);\n const _config_6 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_5);\n const _config_7 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_6);\n const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);\n this.config = _config_8;\n this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));\n this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));\n this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));\n this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));\n this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));\n this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));\n this.middlewareStack.use(\n (0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {\n httpAuthSchemeParametersProvider: import_httpAuthSchemeProvider.defaultSSOOIDCHttpAuthSchemeParametersProvider,\n identityProviderConfigProvider: /* @__PURE__ */ __name(async (config) => new import_core.DefaultIdentityProviderConfig({\n \"aws.auth#sigv4\": config.credentials\n }), \"identityProviderConfigProvider\")\n })\n );\n this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config));\n }\n /**\n * Destroy underlying resources, like sockets. It's usually not necessary to do this.\n * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.\n * Otherwise, sockets might stay open for quite a long time before the server terminates them.\n */\n destroy() {\n super.destroy();\n }\n};\n\n// src/submodules/sso-oidc/SSOOIDC.ts\nvar import_smithy_client7 = require(\"@smithy/smithy-client\");\n\n// src/submodules/sso-oidc/commands/CreateTokenCommand.ts\nvar import_middleware_endpoint2 = require(\"@smithy/middleware-endpoint\");\nvar import_middleware_serde = require(\"@smithy/middleware-serde\");\nvar import_smithy_client6 = require(\"@smithy/smithy-client\");\n\n// src/submodules/sso-oidc/models/models_0.ts\nvar import_smithy_client4 = require(\"@smithy/smithy-client\");\n\n// src/submodules/sso-oidc/models/SSOOIDCServiceException.ts\nvar import_smithy_client3 = require(\"@smithy/smithy-client\");\nvar SSOOIDCServiceException = class _SSOOIDCServiceException extends import_smithy_client3.ServiceException {\n static {\n __name(this, \"SSOOIDCServiceException\");\n }\n /**\n * @internal\n */\n constructor(options) {\n super(options);\n Object.setPrototypeOf(this, _SSOOIDCServiceException.prototype);\n }\n};\n\n// src/submodules/sso-oidc/models/models_0.ts\nvar AccessDeniedException = class _AccessDeniedException extends SSOOIDCServiceException {\n static {\n __name(this, \"AccessDeniedException\");\n }\n name = \"AccessDeniedException\";\n $fault = \"client\";\n /**\n *Single error code. For this exception the value will be access_denied.
Human-readable text providing additional information, used to assist the client developer\n * in understanding the error that occurred.
\n * @public\n */\n error_description;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"AccessDeniedException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _AccessDeniedException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n};\nvar AuthorizationPendingException = class _AuthorizationPendingException extends SSOOIDCServiceException {\n static {\n __name(this, \"AuthorizationPendingException\");\n }\n name = \"AuthorizationPendingException\";\n $fault = \"client\";\n /**\n *Single error code. For this exception the value will be\n * authorization_pending.
Human-readable text providing additional information, used to assist the client developer\n * in understanding the error that occurred.
\n * @public\n */\n error_description;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"AuthorizationPendingException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _AuthorizationPendingException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n};\nvar CreateTokenRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.clientSecret && { clientSecret: import_smithy_client4.SENSITIVE_STRING },\n ...obj.refreshToken && { refreshToken: import_smithy_client4.SENSITIVE_STRING },\n ...obj.codeVerifier && { codeVerifier: import_smithy_client4.SENSITIVE_STRING }\n}), \"CreateTokenRequestFilterSensitiveLog\");\nvar CreateTokenResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.accessToken && { accessToken: import_smithy_client4.SENSITIVE_STRING },\n ...obj.refreshToken && { refreshToken: import_smithy_client4.SENSITIVE_STRING },\n ...obj.idToken && { idToken: import_smithy_client4.SENSITIVE_STRING }\n}), \"CreateTokenResponseFilterSensitiveLog\");\nvar ExpiredTokenException = class _ExpiredTokenException extends SSOOIDCServiceException {\n static {\n __name(this, \"ExpiredTokenException\");\n }\n name = \"ExpiredTokenException\";\n $fault = \"client\";\n /**\n *Single error code. For this exception the value will be expired_token.
Human-readable text providing additional information, used to assist the client developer\n * in understanding the error that occurred.
\n * @public\n */\n error_description;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"ExpiredTokenException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _ExpiredTokenException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n};\nvar InternalServerException = class _InternalServerException extends SSOOIDCServiceException {\n static {\n __name(this, \"InternalServerException\");\n }\n name = \"InternalServerException\";\n $fault = \"server\";\n /**\n *Single error code. For this exception the value will be server_error.
Human-readable text providing additional information, used to assist the client developer\n * in understanding the error that occurred.
\n * @public\n */\n error_description;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"InternalServerException\",\n $fault: \"server\",\n ...opts\n });\n Object.setPrototypeOf(this, _InternalServerException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n};\nvar InvalidClientException = class _InvalidClientException extends SSOOIDCServiceException {\n static {\n __name(this, \"InvalidClientException\");\n }\n name = \"InvalidClientException\";\n $fault = \"client\";\n /**\n *Single error code. For this exception the value will be\n * invalid_client.
Human-readable text providing additional information, used to assist the client developer\n * in understanding the error that occurred.
\n * @public\n */\n error_description;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"InvalidClientException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _InvalidClientException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n};\nvar InvalidGrantException = class _InvalidGrantException extends SSOOIDCServiceException {\n static {\n __name(this, \"InvalidGrantException\");\n }\n name = \"InvalidGrantException\";\n $fault = \"client\";\n /**\n *Single error code. For this exception the value will be invalid_grant.
Human-readable text providing additional information, used to assist the client developer\n * in understanding the error that occurred.
\n * @public\n */\n error_description;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"InvalidGrantException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _InvalidGrantException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n};\nvar InvalidRequestException = class _InvalidRequestException extends SSOOIDCServiceException {\n static {\n __name(this, \"InvalidRequestException\");\n }\n name = \"InvalidRequestException\";\n $fault = \"client\";\n /**\n *Single error code. For this exception the value will be\n * invalid_request.
Human-readable text providing additional information, used to assist the client developer\n * in understanding the error that occurred.
\n * @public\n */\n error_description;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"InvalidRequestException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _InvalidRequestException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n};\nvar InvalidScopeException = class _InvalidScopeException extends SSOOIDCServiceException {\n static {\n __name(this, \"InvalidScopeException\");\n }\n name = \"InvalidScopeException\";\n $fault = \"client\";\n /**\n *Single error code. For this exception the value will be invalid_scope.
Human-readable text providing additional information, used to assist the client developer\n * in understanding the error that occurred.
\n * @public\n */\n error_description;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"InvalidScopeException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _InvalidScopeException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n};\nvar SlowDownException = class _SlowDownException extends SSOOIDCServiceException {\n static {\n __name(this, \"SlowDownException\");\n }\n name = \"SlowDownException\";\n $fault = \"client\";\n /**\n *Single error code. For this exception the value will be slow_down.
Human-readable text providing additional information, used to assist the client developer\n * in understanding the error that occurred.
\n * @public\n */\n error_description;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"SlowDownException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _SlowDownException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n};\nvar UnauthorizedClientException = class _UnauthorizedClientException extends SSOOIDCServiceException {\n static {\n __name(this, \"UnauthorizedClientException\");\n }\n name = \"UnauthorizedClientException\";\n $fault = \"client\";\n /**\n *Single error code. For this exception the value will be\n * unauthorized_client.
Human-readable text providing additional information, used to assist the client developer\n * in understanding the error that occurred.
\n * @public\n */\n error_description;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"UnauthorizedClientException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _UnauthorizedClientException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n};\nvar UnsupportedGrantTypeException = class _UnsupportedGrantTypeException extends SSOOIDCServiceException {\n static {\n __name(this, \"UnsupportedGrantTypeException\");\n }\n name = \"UnsupportedGrantTypeException\";\n $fault = \"client\";\n /**\n *Single error code. For this exception the value will be\n * unsupported_grant_type.
Human-readable text providing additional information, used to assist the client developer\n * in understanding the error that occurred.
\n * @public\n */\n error_description;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"UnsupportedGrantTypeException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _UnsupportedGrantTypeException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n};\n\n// src/submodules/sso-oidc/protocols/Aws_restJson1.ts\nvar import_core2 = require(\"@aws-sdk/core\");\nvar import_core3 = require(\"@smithy/core\");\nvar import_smithy_client5 = require(\"@smithy/smithy-client\");\nvar se_CreateTokenCommand = /* @__PURE__ */ __name(async (input, context) => {\n const b = (0, import_core3.requestBuilder)(input, context);\n const headers = {\n \"content-type\": \"application/json\"\n };\n b.bp(\"/token\");\n let body;\n body = JSON.stringify(\n (0, import_smithy_client5.take)(input, {\n clientId: [],\n clientSecret: [],\n code: [],\n codeVerifier: [],\n deviceCode: [],\n grantType: [],\n redirectUri: [],\n refreshToken: [],\n scope: /* @__PURE__ */ __name((_) => (0, import_smithy_client5._json)(_), \"scope\")\n })\n );\n b.m(\"POST\").h(headers).b(body);\n return b.build();\n}, \"se_CreateTokenCommand\");\nvar de_CreateTokenCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const contents = (0, import_smithy_client5.map)({\n $metadata: deserializeMetadata(output)\n });\n const data = (0, import_smithy_client5.expectNonNull)((0, import_smithy_client5.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), \"body\");\n const doc = (0, import_smithy_client5.take)(data, {\n accessToken: import_smithy_client5.expectString,\n expiresIn: import_smithy_client5.expectInt32,\n idToken: import_smithy_client5.expectString,\n refreshToken: import_smithy_client5.expectString,\n tokenType: import_smithy_client5.expectString\n });\n Object.assign(contents, doc);\n return contents;\n}, \"de_CreateTokenCommand\");\nvar de_CommandError = /* @__PURE__ */ __name(async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await (0, import_core2.parseJsonErrorBody)(output.body, context)\n };\n const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.ssooidc#AccessDeniedException\":\n throw await de_AccessDeniedExceptionRes(parsedOutput, context);\n case \"AuthorizationPendingException\":\n case \"com.amazonaws.ssooidc#AuthorizationPendingException\":\n throw await de_AuthorizationPendingExceptionRes(parsedOutput, context);\n case \"ExpiredTokenException\":\n case \"com.amazonaws.ssooidc#ExpiredTokenException\":\n throw await de_ExpiredTokenExceptionRes(parsedOutput, context);\n case \"InternalServerException\":\n case \"com.amazonaws.ssooidc#InternalServerException\":\n throw await de_InternalServerExceptionRes(parsedOutput, context);\n case \"InvalidClientException\":\n case \"com.amazonaws.ssooidc#InvalidClientException\":\n throw await de_InvalidClientExceptionRes(parsedOutput, context);\n case \"InvalidGrantException\":\n case \"com.amazonaws.ssooidc#InvalidGrantException\":\n throw await de_InvalidGrantExceptionRes(parsedOutput, context);\n case \"InvalidRequestException\":\n case \"com.amazonaws.ssooidc#InvalidRequestException\":\n throw await de_InvalidRequestExceptionRes(parsedOutput, context);\n case \"InvalidScopeException\":\n case \"com.amazonaws.ssooidc#InvalidScopeException\":\n throw await de_InvalidScopeExceptionRes(parsedOutput, context);\n case \"SlowDownException\":\n case \"com.amazonaws.ssooidc#SlowDownException\":\n throw await de_SlowDownExceptionRes(parsedOutput, context);\n case \"UnauthorizedClientException\":\n case \"com.amazonaws.ssooidc#UnauthorizedClientException\":\n throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);\n case \"UnsupportedGrantTypeException\":\n case \"com.amazonaws.ssooidc#UnsupportedGrantTypeException\":\n throw await de_UnsupportedGrantTypeExceptionRes(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n return throwDefaultError({\n output,\n parsedBody,\n errorCode\n });\n }\n}, \"de_CommandError\");\nvar throwDefaultError = (0, import_smithy_client5.withBaseException)(SSOOIDCServiceException);\nvar de_AccessDeniedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client5.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client5.take)(data, {\n error: import_smithy_client5.expectString,\n error_description: import_smithy_client5.expectString\n });\n Object.assign(contents, doc);\n const exception = new AccessDeniedException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_AccessDeniedExceptionRes\");\nvar de_AuthorizationPendingExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client5.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client5.take)(data, {\n error: import_smithy_client5.expectString,\n error_description: import_smithy_client5.expectString\n });\n Object.assign(contents, doc);\n const exception = new AuthorizationPendingException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_AuthorizationPendingExceptionRes\");\nvar de_ExpiredTokenExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client5.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client5.take)(data, {\n error: import_smithy_client5.expectString,\n error_description: import_smithy_client5.expectString\n });\n Object.assign(contents, doc);\n const exception = new ExpiredTokenException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_ExpiredTokenExceptionRes\");\nvar de_InternalServerExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client5.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client5.take)(data, {\n error: import_smithy_client5.expectString,\n error_description: import_smithy_client5.expectString\n });\n Object.assign(contents, doc);\n const exception = new InternalServerException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_InternalServerExceptionRes\");\nvar de_InvalidClientExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client5.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client5.take)(data, {\n error: import_smithy_client5.expectString,\n error_description: import_smithy_client5.expectString\n });\n Object.assign(contents, doc);\n const exception = new InvalidClientException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_InvalidClientExceptionRes\");\nvar de_InvalidGrantExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client5.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client5.take)(data, {\n error: import_smithy_client5.expectString,\n error_description: import_smithy_client5.expectString\n });\n Object.assign(contents, doc);\n const exception = new InvalidGrantException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_InvalidGrantExceptionRes\");\nvar de_InvalidRequestExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client5.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client5.take)(data, {\n error: import_smithy_client5.expectString,\n error_description: import_smithy_client5.expectString\n });\n Object.assign(contents, doc);\n const exception = new InvalidRequestException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_InvalidRequestExceptionRes\");\nvar de_InvalidScopeExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client5.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client5.take)(data, {\n error: import_smithy_client5.expectString,\n error_description: import_smithy_client5.expectString\n });\n Object.assign(contents, doc);\n const exception = new InvalidScopeException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_InvalidScopeExceptionRes\");\nvar de_SlowDownExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client5.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client5.take)(data, {\n error: import_smithy_client5.expectString,\n error_description: import_smithy_client5.expectString\n });\n Object.assign(contents, doc);\n const exception = new SlowDownException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_SlowDownExceptionRes\");\nvar de_UnauthorizedClientExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client5.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client5.take)(data, {\n error: import_smithy_client5.expectString,\n error_description: import_smithy_client5.expectString\n });\n Object.assign(contents, doc);\n const exception = new UnauthorizedClientException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_UnauthorizedClientExceptionRes\");\nvar de_UnsupportedGrantTypeExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client5.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client5.take)(data, {\n error: import_smithy_client5.expectString,\n error_description: import_smithy_client5.expectString\n });\n Object.assign(contents, doc);\n const exception = new UnsupportedGrantTypeException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_UnsupportedGrantTypeExceptionRes\");\nvar deserializeMetadata = /* @__PURE__ */ __name((output) => ({\n httpStatusCode: output.statusCode,\n requestId: output.headers[\"x-amzn-requestid\"] ?? output.headers[\"x-amzn-request-id\"] ?? output.headers[\"x-amz-request-id\"],\n extendedRequestId: output.headers[\"x-amz-id-2\"],\n cfId: output.headers[\"x-amz-cf-id\"]\n}), \"deserializeMetadata\");\n\n// src/submodules/sso-oidc/commands/CreateTokenCommand.ts\nvar CreateTokenCommand = class extends import_smithy_client6.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSSSOOIDCService\", \"CreateToken\", {}).n(\"SSOOIDCClient\", \"CreateTokenCommand\").f(CreateTokenRequestFilterSensitiveLog, CreateTokenResponseFilterSensitiveLog).ser(se_CreateTokenCommand).de(de_CreateTokenCommand).build() {\n static {\n __name(this, \"CreateTokenCommand\");\n }\n};\n\n// src/submodules/sso-oidc/SSOOIDC.ts\nvar commands = {\n CreateTokenCommand\n};\nvar SSOOIDC = class extends SSOOIDCClient {\n static {\n __name(this, \"SSOOIDC\");\n }\n};\n(0, import_smithy_client7.createAggregatedClient)(commands, SSOOIDC);\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n $Command,\n AccessDeniedException,\n AuthorizationPendingException,\n CreateTokenCommand,\n CreateTokenRequestFilterSensitiveLog,\n CreateTokenResponseFilterSensitiveLog,\n ExpiredTokenException,\n InternalServerException,\n InvalidClientException,\n InvalidGrantException,\n InvalidRequestException,\n InvalidScopeException,\n SSOOIDC,\n SSOOIDCClient,\n SSOOIDCServiceException,\n SlowDownException,\n UnauthorizedClientException,\n UnsupportedGrantTypeException,\n __Client\n});\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getRuntimeConfig = void 0;\nconst tslib_1 = require(\"tslib\");\nconst package_json_1 = tslib_1.__importDefault(require(\"../../../package.json\"));\nconst core_1 = require(\"@aws-sdk/core\");\nconst util_user_agent_node_1 = require(\"@aws-sdk/util-user-agent-node\");\nconst config_resolver_1 = require(\"@smithy/config-resolver\");\nconst hash_node_1 = require(\"@smithy/hash-node\");\nconst middleware_retry_1 = require(\"@smithy/middleware-retry\");\nconst node_config_provider_1 = require(\"@smithy/node-config-provider\");\nconst node_http_handler_1 = require(\"@smithy/node-http-handler\");\nconst util_body_length_node_1 = require(\"@smithy/util-body-length-node\");\nconst util_retry_1 = require(\"@smithy/util-retry\");\nconst runtimeConfig_shared_1 = require(\"./runtimeConfig.shared\");\nconst smithy_client_1 = require(\"@smithy/smithy-client\");\nconst util_defaults_mode_node_1 = require(\"@smithy/util-defaults-mode-node\");\nconst smithy_client_2 = require(\"@smithy/smithy-client\");\nconst getRuntimeConfig = (config) => {\n (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);\n const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);\n const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);\n const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);\n (0, core_1.emitWarningIfUnsupportedVersion)(process.version);\n const loaderConfig = {\n profile: config?.profile,\n logger: clientSharedValues.logger,\n };\n return {\n ...clientSharedValues,\n ...config,\n runtime: \"node\",\n defaultsMode,\n authSchemePreference: config?.authSchemePreference ?? (0, node_config_provider_1.loadConfig)(core_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),\n bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,\n defaultUserAgentProvider: config?.defaultUserAgentProvider ??\n (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),\n maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),\n region: config?.region ??\n (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),\n requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),\n retryMode: config?.retryMode ??\n (0, node_config_provider_1.loadConfig)({\n ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,\n default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE,\n }, config),\n sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, \"sha256\"),\n streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,\n useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),\n };\n};\nexports.getRuntimeConfig = getRuntimeConfig;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getRuntimeConfig = void 0;\nconst core_1 = require(\"@aws-sdk/core\");\nconst core_2 = require(\"@smithy/core\");\nconst smithy_client_1 = require(\"@smithy/smithy-client\");\nconst url_parser_1 = require(\"@smithy/url-parser\");\nconst util_base64_1 = require(\"@smithy/util-base64\");\nconst util_utf8_1 = require(\"@smithy/util-utf8\");\nconst httpAuthSchemeProvider_1 = require(\"./auth/httpAuthSchemeProvider\");\nconst endpointResolver_1 = require(\"./endpoint/endpointResolver\");\nconst getRuntimeConfig = (config) => {\n return {\n apiVersion: \"2019-06-10\",\n base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64,\n base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,\n disableHostPrefix: config?.disableHostPrefix ?? false,\n endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,\n extensions: config?.extensions ?? [],\n httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSSOOIDCHttpAuthSchemeProvider,\n httpAuthSchemes: config?.httpAuthSchemes ?? [\n {\n schemeId: \"aws.auth#sigv4\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"aws.auth#sigv4\"),\n signer: new core_1.AwsSdkSigV4Signer(),\n },\n {\n schemeId: \"smithy.api#noAuth\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"smithy.api#noAuth\") || (async () => ({})),\n signer: new core_2.NoAuthSigner(),\n },\n ],\n logger: config?.logger ?? new smithy_client_1.NoOpLogger(),\n serviceId: config?.serviceId ?? \"SSO OIDC\",\n urlParser: config?.urlParser ?? url_parser_1.parseUrl,\n utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,\n utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8,\n };\n};\nexports.getRuntimeConfig = getRuntimeConfig;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.STSClient = exports.__Client = void 0;\nconst middleware_host_header_1 = require(\"@aws-sdk/middleware-host-header\");\nconst middleware_logger_1 = require(\"@aws-sdk/middleware-logger\");\nconst middleware_recursion_detection_1 = require(\"@aws-sdk/middleware-recursion-detection\");\nconst middleware_user_agent_1 = require(\"@aws-sdk/middleware-user-agent\");\nconst config_resolver_1 = require(\"@smithy/config-resolver\");\nconst core_1 = require(\"@smithy/core\");\nconst middleware_content_length_1 = require(\"@smithy/middleware-content-length\");\nconst middleware_endpoint_1 = require(\"@smithy/middleware-endpoint\");\nconst middleware_retry_1 = require(\"@smithy/middleware-retry\");\nconst smithy_client_1 = require(\"@smithy/smithy-client\");\nObject.defineProperty(exports, \"__Client\", { enumerable: true, get: function () { return smithy_client_1.Client; } });\nconst httpAuthSchemeProvider_1 = require(\"./auth/httpAuthSchemeProvider\");\nconst EndpointParameters_1 = require(\"./endpoint/EndpointParameters\");\nconst runtimeConfig_1 = require(\"./runtimeConfig\");\nconst runtimeExtensions_1 = require(\"./runtimeExtensions\");\nclass STSClient extends smithy_client_1.Client {\n config;\n constructor(...[configuration]) {\n const _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration || {});\n super(_config_0);\n this.initConfig = _config_0;\n const _config_1 = (0, EndpointParameters_1.resolveClientEndpointParameters)(_config_0);\n const _config_2 = (0, middleware_user_agent_1.resolveUserAgentConfig)(_config_1);\n const _config_3 = (0, middleware_retry_1.resolveRetryConfig)(_config_2);\n const _config_4 = (0, config_resolver_1.resolveRegionConfig)(_config_3);\n const _config_5 = (0, middleware_host_header_1.resolveHostHeaderConfig)(_config_4);\n const _config_6 = (0, middleware_endpoint_1.resolveEndpointConfig)(_config_5);\n const _config_7 = (0, httpAuthSchemeProvider_1.resolveHttpAuthSchemeConfig)(_config_6);\n const _config_8 = (0, runtimeExtensions_1.resolveRuntimeExtensions)(_config_7, configuration?.extensions || []);\n this.config = _config_8;\n this.middlewareStack.use((0, middleware_user_agent_1.getUserAgentPlugin)(this.config));\n this.middlewareStack.use((0, middleware_retry_1.getRetryPlugin)(this.config));\n this.middlewareStack.use((0, middleware_content_length_1.getContentLengthPlugin)(this.config));\n this.middlewareStack.use((0, middleware_host_header_1.getHostHeaderPlugin)(this.config));\n this.middlewareStack.use((0, middleware_logger_1.getLoggerPlugin)(this.config));\n this.middlewareStack.use((0, middleware_recursion_detection_1.getRecursionDetectionPlugin)(this.config));\n this.middlewareStack.use((0, core_1.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {\n httpAuthSchemeParametersProvider: httpAuthSchemeProvider_1.defaultSTSHttpAuthSchemeParametersProvider,\n identityProviderConfigProvider: async (config) => new core_1.DefaultIdentityProviderConfig({\n \"aws.auth#sigv4\": config.credentials,\n }),\n }));\n this.middlewareStack.use((0, core_1.getHttpSigningPlugin)(this.config));\n }\n destroy() {\n super.destroy();\n }\n}\nexports.STSClient = STSClient;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resolveHttpAuthRuntimeConfig = exports.getHttpAuthExtensionConfiguration = void 0;\nconst getHttpAuthExtensionConfiguration = (runtimeConfig) => {\n const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;\n let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;\n let _credentials = runtimeConfig.credentials;\n return {\n setHttpAuthScheme(httpAuthScheme) {\n const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);\n if (index === -1) {\n _httpAuthSchemes.push(httpAuthScheme);\n }\n else {\n _httpAuthSchemes.splice(index, 1, httpAuthScheme);\n }\n },\n httpAuthSchemes() {\n return _httpAuthSchemes;\n },\n setHttpAuthSchemeProvider(httpAuthSchemeProvider) {\n _httpAuthSchemeProvider = httpAuthSchemeProvider;\n },\n httpAuthSchemeProvider() {\n return _httpAuthSchemeProvider;\n },\n setCredentials(credentials) {\n _credentials = credentials;\n },\n credentials() {\n return _credentials;\n },\n };\n};\nexports.getHttpAuthExtensionConfiguration = getHttpAuthExtensionConfiguration;\nconst resolveHttpAuthRuntimeConfig = (config) => {\n return {\n httpAuthSchemes: config.httpAuthSchemes(),\n httpAuthSchemeProvider: config.httpAuthSchemeProvider(),\n credentials: config.credentials(),\n };\n};\nexports.resolveHttpAuthRuntimeConfig = resolveHttpAuthRuntimeConfig;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resolveHttpAuthSchemeConfig = exports.resolveStsAuthConfig = exports.defaultSTSHttpAuthSchemeProvider = exports.defaultSTSHttpAuthSchemeParametersProvider = void 0;\nconst core_1 = require(\"@aws-sdk/core\");\nconst util_middleware_1 = require(\"@smithy/util-middleware\");\nconst STSClient_1 = require(\"../STSClient\");\nconst defaultSTSHttpAuthSchemeParametersProvider = async (config, context, input) => {\n return {\n operation: (0, util_middleware_1.getSmithyContext)(context).operation,\n region: (await (0, util_middleware_1.normalizeProvider)(config.region)()) ||\n (() => {\n throw new Error(\"expected `region` to be configured for `aws.auth#sigv4`\");\n })(),\n };\n};\nexports.defaultSTSHttpAuthSchemeParametersProvider = defaultSTSHttpAuthSchemeParametersProvider;\nfunction createAwsAuthSigv4HttpAuthOption(authParameters) {\n return {\n schemeId: \"aws.auth#sigv4\",\n signingProperties: {\n name: \"sts\",\n region: authParameters.region,\n },\n propertiesExtractor: (config, context) => ({\n signingProperties: {\n config,\n context,\n },\n }),\n };\n}\nfunction createSmithyApiNoAuthHttpAuthOption(authParameters) {\n return {\n schemeId: \"smithy.api#noAuth\",\n };\n}\nconst defaultSTSHttpAuthSchemeProvider = (authParameters) => {\n const options = [];\n switch (authParameters.operation) {\n case \"AssumeRoleWithWebIdentity\": {\n options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));\n break;\n }\n default: {\n options.push(createAwsAuthSigv4HttpAuthOption(authParameters));\n }\n }\n return options;\n};\nexports.defaultSTSHttpAuthSchemeProvider = defaultSTSHttpAuthSchemeProvider;\nconst resolveStsAuthConfig = (input) => Object.assign(input, {\n stsClientCtor: STSClient_1.STSClient,\n});\nexports.resolveStsAuthConfig = resolveStsAuthConfig;\nconst resolveHttpAuthSchemeConfig = (config) => {\n const config_0 = (0, exports.resolveStsAuthConfig)(config);\n const config_1 = (0, core_1.resolveAwsSdkSigV4Config)(config_0);\n return Object.assign(config_1, {\n authSchemePreference: (0, util_middleware_1.normalizeProvider)(config.authSchemePreference ?? []),\n });\n};\nexports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.commonParams = exports.resolveClientEndpointParameters = void 0;\nconst resolveClientEndpointParameters = (options) => {\n return Object.assign(options, {\n useDualstackEndpoint: options.useDualstackEndpoint ?? false,\n useFipsEndpoint: options.useFipsEndpoint ?? false,\n useGlobalEndpoint: options.useGlobalEndpoint ?? false,\n defaultSigningName: \"sts\",\n });\n};\nexports.resolveClientEndpointParameters = resolveClientEndpointParameters;\nexports.commonParams = {\n UseGlobalEndpoint: { type: \"builtInParams\", name: \"useGlobalEndpoint\" },\n UseFIPS: { type: \"builtInParams\", name: \"useFipsEndpoint\" },\n Endpoint: { type: \"builtInParams\", name: \"endpoint\" },\n Region: { type: \"builtInParams\", name: \"region\" },\n UseDualStack: { type: \"builtInParams\", name: \"useDualstackEndpoint\" },\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.defaultEndpointResolver = void 0;\nconst util_endpoints_1 = require(\"@aws-sdk/util-endpoints\");\nconst util_endpoints_2 = require(\"@smithy/util-endpoints\");\nconst ruleset_1 = require(\"./ruleset\");\nconst cache = new util_endpoints_2.EndpointCache({\n size: 50,\n params: [\"Endpoint\", \"Region\", \"UseDualStack\", \"UseFIPS\", \"UseGlobalEndpoint\"],\n});\nconst defaultEndpointResolver = (endpointParams, context = {}) => {\n return cache.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, {\n endpointParams: endpointParams,\n logger: context.logger,\n }));\n};\nexports.defaultEndpointResolver = defaultEndpointResolver;\nutil_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ruleSet = void 0;\nconst F = \"required\", G = \"type\", H = \"fn\", I = \"argv\", J = \"ref\";\nconst a = false, b = true, c = \"booleanEquals\", d = \"stringEquals\", e = \"sigv4\", f = \"sts\", g = \"us-east-1\", h = \"endpoint\", i = \"https://sts.{Region}.{PartitionResult#dnsSuffix}\", j = \"tree\", k = \"error\", l = \"getAttr\", m = { [F]: false, [G]: \"String\" }, n = { [F]: true, \"default\": false, [G]: \"Boolean\" }, o = { [J]: \"Endpoint\" }, p = { [H]: \"isSet\", [I]: [{ [J]: \"Region\" }] }, q = { [J]: \"Region\" }, r = { [H]: \"aws.partition\", [I]: [q], \"assign\": \"PartitionResult\" }, s = { [J]: \"UseFIPS\" }, t = { [J]: \"UseDualStack\" }, u = { \"url\": \"https://sts.amazonaws.com\", \"properties\": { \"authSchemes\": [{ \"name\": e, \"signingName\": f, \"signingRegion\": g }] }, \"headers\": {} }, v = {}, w = { \"conditions\": [{ [H]: d, [I]: [q, \"aws-global\"] }], [h]: u, [G]: h }, x = { [H]: c, [I]: [s, true] }, y = { [H]: c, [I]: [t, true] }, z = { [H]: l, [I]: [{ [J]: \"PartitionResult\" }, \"supportsFIPS\"] }, A = { [J]: \"PartitionResult\" }, B = { [H]: c, [I]: [true, { [H]: l, [I]: [A, \"supportsDualStack\"] }] }, C = [{ [H]: \"isSet\", [I]: [o] }], D = [x], E = [y];\nconst _data = { version: \"1.0\", parameters: { Region: m, UseDualStack: n, UseFIPS: n, Endpoint: m, UseGlobalEndpoint: n }, rules: [{ conditions: [{ [H]: c, [I]: [{ [J]: \"UseGlobalEndpoint\" }, b] }, { [H]: \"not\", [I]: C }, p, r, { [H]: c, [I]: [s, a] }, { [H]: c, [I]: [t, a] }], rules: [{ conditions: [{ [H]: d, [I]: [q, \"ap-northeast-1\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"ap-south-1\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"ap-southeast-1\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"ap-southeast-2\"] }], endpoint: u, [G]: h }, w, { conditions: [{ [H]: d, [I]: [q, \"ca-central-1\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"eu-central-1\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"eu-north-1\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"eu-west-1\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"eu-west-2\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"eu-west-3\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"sa-east-1\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, g] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"us-east-2\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"us-west-1\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"us-west-2\"] }], endpoint: u, [G]: h }, { endpoint: { url: i, properties: { authSchemes: [{ name: e, signingName: f, signingRegion: \"{Region}\" }] }, headers: v }, [G]: h }], [G]: j }, { conditions: C, rules: [{ conditions: D, error: \"Invalid Configuration: FIPS and custom endpoint are not supported\", [G]: k }, { conditions: E, error: \"Invalid Configuration: Dualstack and custom endpoint are not supported\", [G]: k }, { endpoint: { url: o, properties: v, headers: v }, [G]: h }], [G]: j }, { conditions: [p], rules: [{ conditions: [r], rules: [{ conditions: [x, y], rules: [{ conditions: [{ [H]: c, [I]: [b, z] }, B], rules: [{ endpoint: { url: \"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}\", properties: v, headers: v }, [G]: h }], [G]: j }, { error: \"FIPS and DualStack are enabled, but this partition does not support one or both\", [G]: k }], [G]: j }, { conditions: D, rules: [{ conditions: [{ [H]: c, [I]: [z, b] }], rules: [{ conditions: [{ [H]: d, [I]: [{ [H]: l, [I]: [A, \"name\"] }, \"aws-us-gov\"] }], endpoint: { url: \"https://sts.{Region}.amazonaws.com\", properties: v, headers: v }, [G]: h }, { endpoint: { url: \"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}\", properties: v, headers: v }, [G]: h }], [G]: j }, { error: \"FIPS is enabled but this partition does not support FIPS\", [G]: k }], [G]: j }, { conditions: E, rules: [{ conditions: [B], rules: [{ endpoint: { url: \"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}\", properties: v, headers: v }, [G]: h }], [G]: j }, { error: \"DualStack is enabled but this partition does not support DualStack\", [G]: k }], [G]: j }, w, { endpoint: { url: i, properties: v, headers: v }, [G]: h }], [G]: j }], [G]: j }, { error: \"Invalid Configuration: Missing Region\", [G]: k }] };\nexports.ruleSet = _data;\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/submodules/sts/index.ts\nvar index_exports = {};\n__export(index_exports, {\n AssumeRoleCommand: () => AssumeRoleCommand,\n AssumeRoleResponseFilterSensitiveLog: () => AssumeRoleResponseFilterSensitiveLog,\n AssumeRoleWithWebIdentityCommand: () => AssumeRoleWithWebIdentityCommand,\n AssumeRoleWithWebIdentityRequestFilterSensitiveLog: () => AssumeRoleWithWebIdentityRequestFilterSensitiveLog,\n AssumeRoleWithWebIdentityResponseFilterSensitiveLog: () => AssumeRoleWithWebIdentityResponseFilterSensitiveLog,\n ClientInputEndpointParameters: () => import_EndpointParameters3.ClientInputEndpointParameters,\n CredentialsFilterSensitiveLog: () => CredentialsFilterSensitiveLog,\n ExpiredTokenException: () => ExpiredTokenException,\n IDPCommunicationErrorException: () => IDPCommunicationErrorException,\n IDPRejectedClaimException: () => IDPRejectedClaimException,\n InvalidIdentityTokenException: () => InvalidIdentityTokenException,\n MalformedPolicyDocumentException: () => MalformedPolicyDocumentException,\n PackedPolicyTooLargeException: () => PackedPolicyTooLargeException,\n RegionDisabledException: () => RegionDisabledException,\n STS: () => STS,\n STSServiceException: () => STSServiceException,\n decorateDefaultCredentialProvider: () => decorateDefaultCredentialProvider,\n getDefaultRoleAssumer: () => getDefaultRoleAssumer2,\n getDefaultRoleAssumerWithWebIdentity: () => getDefaultRoleAssumerWithWebIdentity2\n});\nmodule.exports = __toCommonJS(index_exports);\n__reExport(index_exports, require(\"./STSClient\"), module.exports);\n\n// src/submodules/sts/STS.ts\nvar import_smithy_client6 = require(\"@smithy/smithy-client\");\n\n// src/submodules/sts/commands/AssumeRoleCommand.ts\nvar import_middleware_endpoint = require(\"@smithy/middleware-endpoint\");\nvar import_middleware_serde = require(\"@smithy/middleware-serde\");\nvar import_smithy_client4 = require(\"@smithy/smithy-client\");\nvar import_EndpointParameters = require(\"./endpoint/EndpointParameters\");\n\n// src/submodules/sts/models/models_0.ts\nvar import_smithy_client2 = require(\"@smithy/smithy-client\");\n\n// src/submodules/sts/models/STSServiceException.ts\nvar import_smithy_client = require(\"@smithy/smithy-client\");\nvar STSServiceException = class _STSServiceException extends import_smithy_client.ServiceException {\n static {\n __name(this, \"STSServiceException\");\n }\n /**\n * @internal\n */\n constructor(options) {\n super(options);\n Object.setPrototypeOf(this, _STSServiceException.prototype);\n }\n};\n\n// src/submodules/sts/models/models_0.ts\nvar CredentialsFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.SecretAccessKey && { SecretAccessKey: import_smithy_client2.SENSITIVE_STRING }\n}), \"CredentialsFilterSensitiveLog\");\nvar AssumeRoleResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) }\n}), \"AssumeRoleResponseFilterSensitiveLog\");\nvar ExpiredTokenException = class _ExpiredTokenException extends STSServiceException {\n static {\n __name(this, \"ExpiredTokenException\");\n }\n name = \"ExpiredTokenException\";\n $fault = \"client\";\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"ExpiredTokenException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _ExpiredTokenException.prototype);\n }\n};\nvar MalformedPolicyDocumentException = class _MalformedPolicyDocumentException extends STSServiceException {\n static {\n __name(this, \"MalformedPolicyDocumentException\");\n }\n name = \"MalformedPolicyDocumentException\";\n $fault = \"client\";\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"MalformedPolicyDocumentException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _MalformedPolicyDocumentException.prototype);\n }\n};\nvar PackedPolicyTooLargeException = class _PackedPolicyTooLargeException extends STSServiceException {\n static {\n __name(this, \"PackedPolicyTooLargeException\");\n }\n name = \"PackedPolicyTooLargeException\";\n $fault = \"client\";\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"PackedPolicyTooLargeException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _PackedPolicyTooLargeException.prototype);\n }\n};\nvar RegionDisabledException = class _RegionDisabledException extends STSServiceException {\n static {\n __name(this, \"RegionDisabledException\");\n }\n name = \"RegionDisabledException\";\n $fault = \"client\";\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"RegionDisabledException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _RegionDisabledException.prototype);\n }\n};\nvar IDPRejectedClaimException = class _IDPRejectedClaimException extends STSServiceException {\n static {\n __name(this, \"IDPRejectedClaimException\");\n }\n name = \"IDPRejectedClaimException\";\n $fault = \"client\";\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"IDPRejectedClaimException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _IDPRejectedClaimException.prototype);\n }\n};\nvar InvalidIdentityTokenException = class _InvalidIdentityTokenException extends STSServiceException {\n static {\n __name(this, \"InvalidIdentityTokenException\");\n }\n name = \"InvalidIdentityTokenException\";\n $fault = \"client\";\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"InvalidIdentityTokenException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _InvalidIdentityTokenException.prototype);\n }\n};\nvar AssumeRoleWithWebIdentityRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.WebIdentityToken && { WebIdentityToken: import_smithy_client2.SENSITIVE_STRING }\n}), \"AssumeRoleWithWebIdentityRequestFilterSensitiveLog\");\nvar AssumeRoleWithWebIdentityResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) }\n}), \"AssumeRoleWithWebIdentityResponseFilterSensitiveLog\");\nvar IDPCommunicationErrorException = class _IDPCommunicationErrorException extends STSServiceException {\n static {\n __name(this, \"IDPCommunicationErrorException\");\n }\n name = \"IDPCommunicationErrorException\";\n $fault = \"client\";\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"IDPCommunicationErrorException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _IDPCommunicationErrorException.prototype);\n }\n};\n\n// src/submodules/sts/protocols/Aws_query.ts\nvar import_core = require(\"@aws-sdk/core\");\nvar import_protocol_http = require(\"@smithy/protocol-http\");\nvar import_smithy_client3 = require(\"@smithy/smithy-client\");\nvar se_AssumeRoleCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_AssumeRoleRequest(input, context),\n [_A]: _AR,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_AssumeRoleCommand\");\nvar se_AssumeRoleWithWebIdentityCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_AssumeRoleWithWebIdentityRequest(input, context),\n [_A]: _ARWWI,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_AssumeRoleWithWebIdentityCommand\");\nvar de_AssumeRoleCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_AssumeRoleResponse(data.AssumeRoleResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_AssumeRoleCommand\");\nvar de_AssumeRoleWithWebIdentityCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_AssumeRoleWithWebIdentityResponse(data.AssumeRoleWithWebIdentityResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_AssumeRoleWithWebIdentityCommand\");\nvar de_CommandError = /* @__PURE__ */ __name(async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await (0, import_core.parseXmlErrorBody)(output.body, context)\n };\n const errorCode = loadQueryErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"ExpiredTokenException\":\n case \"com.amazonaws.sts#ExpiredTokenException\":\n throw await de_ExpiredTokenExceptionRes(parsedOutput, context);\n case \"MalformedPolicyDocument\":\n case \"com.amazonaws.sts#MalformedPolicyDocumentException\":\n throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput, context);\n case \"PackedPolicyTooLarge\":\n case \"com.amazonaws.sts#PackedPolicyTooLargeException\":\n throw await de_PackedPolicyTooLargeExceptionRes(parsedOutput, context);\n case \"RegionDisabledException\":\n case \"com.amazonaws.sts#RegionDisabledException\":\n throw await de_RegionDisabledExceptionRes(parsedOutput, context);\n case \"IDPCommunicationError\":\n case \"com.amazonaws.sts#IDPCommunicationErrorException\":\n throw await de_IDPCommunicationErrorExceptionRes(parsedOutput, context);\n case \"IDPRejectedClaim\":\n case \"com.amazonaws.sts#IDPRejectedClaimException\":\n throw await de_IDPRejectedClaimExceptionRes(parsedOutput, context);\n case \"InvalidIdentityToken\":\n case \"com.amazonaws.sts#InvalidIdentityTokenException\":\n throw await de_InvalidIdentityTokenExceptionRes(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n return throwDefaultError({\n output,\n parsedBody: parsedBody.Error,\n errorCode\n });\n }\n}, \"de_CommandError\");\nvar de_ExpiredTokenExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_ExpiredTokenException(body.Error, context);\n const exception = new ExpiredTokenException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client3.decorateServiceException)(exception, body);\n}, \"de_ExpiredTokenExceptionRes\");\nvar de_IDPCommunicationErrorExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_IDPCommunicationErrorException(body.Error, context);\n const exception = new IDPCommunicationErrorException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client3.decorateServiceException)(exception, body);\n}, \"de_IDPCommunicationErrorExceptionRes\");\nvar de_IDPRejectedClaimExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_IDPRejectedClaimException(body.Error, context);\n const exception = new IDPRejectedClaimException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client3.decorateServiceException)(exception, body);\n}, \"de_IDPRejectedClaimExceptionRes\");\nvar de_InvalidIdentityTokenExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_InvalidIdentityTokenException(body.Error, context);\n const exception = new InvalidIdentityTokenException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client3.decorateServiceException)(exception, body);\n}, \"de_InvalidIdentityTokenExceptionRes\");\nvar de_MalformedPolicyDocumentExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_MalformedPolicyDocumentException(body.Error, context);\n const exception = new MalformedPolicyDocumentException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client3.decorateServiceException)(exception, body);\n}, \"de_MalformedPolicyDocumentExceptionRes\");\nvar de_PackedPolicyTooLargeExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_PackedPolicyTooLargeException(body.Error, context);\n const exception = new PackedPolicyTooLargeException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client3.decorateServiceException)(exception, body);\n}, \"de_PackedPolicyTooLargeExceptionRes\");\nvar de_RegionDisabledExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_RegionDisabledException(body.Error, context);\n const exception = new RegionDisabledException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client3.decorateServiceException)(exception, body);\n}, \"de_RegionDisabledExceptionRes\");\nvar se_AssumeRoleRequest = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_RA] != null) {\n entries[_RA] = input[_RA];\n }\n if (input[_RSN] != null) {\n entries[_RSN] = input[_RSN];\n }\n if (input[_PA] != null) {\n const memberEntries = se_policyDescriptorListType(input[_PA], context);\n if (input[_PA]?.length === 0) {\n entries.PolicyArns = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `PolicyArns.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_P] != null) {\n entries[_P] = input[_P];\n }\n if (input[_DS] != null) {\n entries[_DS] = input[_DS];\n }\n if (input[_T] != null) {\n const memberEntries = se_tagListType(input[_T], context);\n if (input[_T]?.length === 0) {\n entries.Tags = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Tags.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_TTK] != null) {\n const memberEntries = se_tagKeyListType(input[_TTK], context);\n if (input[_TTK]?.length === 0) {\n entries.TransitiveTagKeys = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `TransitiveTagKeys.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_EI] != null) {\n entries[_EI] = input[_EI];\n }\n if (input[_SN] != null) {\n entries[_SN] = input[_SN];\n }\n if (input[_TC] != null) {\n entries[_TC] = input[_TC];\n }\n if (input[_SI] != null) {\n entries[_SI] = input[_SI];\n }\n if (input[_PC] != null) {\n const memberEntries = se_ProvidedContextsListType(input[_PC], context);\n if (input[_PC]?.length === 0) {\n entries.ProvidedContexts = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `ProvidedContexts.${key}`;\n entries[loc] = value;\n });\n }\n return entries;\n}, \"se_AssumeRoleRequest\");\nvar se_AssumeRoleWithWebIdentityRequest = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_RA] != null) {\n entries[_RA] = input[_RA];\n }\n if (input[_RSN] != null) {\n entries[_RSN] = input[_RSN];\n }\n if (input[_WIT] != null) {\n entries[_WIT] = input[_WIT];\n }\n if (input[_PI] != null) {\n entries[_PI] = input[_PI];\n }\n if (input[_PA] != null) {\n const memberEntries = se_policyDescriptorListType(input[_PA], context);\n if (input[_PA]?.length === 0) {\n entries.PolicyArns = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `PolicyArns.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_P] != null) {\n entries[_P] = input[_P];\n }\n if (input[_DS] != null) {\n entries[_DS] = input[_DS];\n }\n return entries;\n}, \"se_AssumeRoleWithWebIdentityRequest\");\nvar se_policyDescriptorListType = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n const memberEntries = se_PolicyDescriptorType(entry, context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n entries[`member.${counter}.${key}`] = value;\n });\n counter++;\n }\n return entries;\n}, \"se_policyDescriptorListType\");\nvar se_PolicyDescriptorType = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_a] != null) {\n entries[_a] = input[_a];\n }\n return entries;\n}, \"se_PolicyDescriptorType\");\nvar se_ProvidedContext = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_PAr] != null) {\n entries[_PAr] = input[_PAr];\n }\n if (input[_CA] != null) {\n entries[_CA] = input[_CA];\n }\n return entries;\n}, \"se_ProvidedContext\");\nvar se_ProvidedContextsListType = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n const memberEntries = se_ProvidedContext(entry, context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n entries[`member.${counter}.${key}`] = value;\n });\n counter++;\n }\n return entries;\n}, \"se_ProvidedContextsListType\");\nvar se_Tag = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_K] != null) {\n entries[_K] = input[_K];\n }\n if (input[_Va] != null) {\n entries[_Va] = input[_Va];\n }\n return entries;\n}, \"se_Tag\");\nvar se_tagKeyListType = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n entries[`member.${counter}`] = entry;\n counter++;\n }\n return entries;\n}, \"se_tagKeyListType\");\nvar se_tagListType = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n const memberEntries = se_Tag(entry, context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n entries[`member.${counter}.${key}`] = value;\n });\n counter++;\n }\n return entries;\n}, \"se_tagListType\");\nvar de_AssumedRoleUser = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_ARI] != null) {\n contents[_ARI] = (0, import_smithy_client3.expectString)(output[_ARI]);\n }\n if (output[_Ar] != null) {\n contents[_Ar] = (0, import_smithy_client3.expectString)(output[_Ar]);\n }\n return contents;\n}, \"de_AssumedRoleUser\");\nvar de_AssumeRoleResponse = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_C] != null) {\n contents[_C] = de_Credentials(output[_C], context);\n }\n if (output[_ARU] != null) {\n contents[_ARU] = de_AssumedRoleUser(output[_ARU], context);\n }\n if (output[_PPS] != null) {\n contents[_PPS] = (0, import_smithy_client3.strictParseInt32)(output[_PPS]);\n }\n if (output[_SI] != null) {\n contents[_SI] = (0, import_smithy_client3.expectString)(output[_SI]);\n }\n return contents;\n}, \"de_AssumeRoleResponse\");\nvar de_AssumeRoleWithWebIdentityResponse = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_C] != null) {\n contents[_C] = de_Credentials(output[_C], context);\n }\n if (output[_SFWIT] != null) {\n contents[_SFWIT] = (0, import_smithy_client3.expectString)(output[_SFWIT]);\n }\n if (output[_ARU] != null) {\n contents[_ARU] = de_AssumedRoleUser(output[_ARU], context);\n }\n if (output[_PPS] != null) {\n contents[_PPS] = (0, import_smithy_client3.strictParseInt32)(output[_PPS]);\n }\n if (output[_Pr] != null) {\n contents[_Pr] = (0, import_smithy_client3.expectString)(output[_Pr]);\n }\n if (output[_Au] != null) {\n contents[_Au] = (0, import_smithy_client3.expectString)(output[_Au]);\n }\n if (output[_SI] != null) {\n contents[_SI] = (0, import_smithy_client3.expectString)(output[_SI]);\n }\n return contents;\n}, \"de_AssumeRoleWithWebIdentityResponse\");\nvar de_Credentials = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_AKI] != null) {\n contents[_AKI] = (0, import_smithy_client3.expectString)(output[_AKI]);\n }\n if (output[_SAK] != null) {\n contents[_SAK] = (0, import_smithy_client3.expectString)(output[_SAK]);\n }\n if (output[_ST] != null) {\n contents[_ST] = (0, import_smithy_client3.expectString)(output[_ST]);\n }\n if (output[_E] != null) {\n contents[_E] = (0, import_smithy_client3.expectNonNull)((0, import_smithy_client3.parseRfc3339DateTimeWithOffset)(output[_E]));\n }\n return contents;\n}, \"de_Credentials\");\nvar de_ExpiredTokenException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_m] != null) {\n contents[_m] = (0, import_smithy_client3.expectString)(output[_m]);\n }\n return contents;\n}, \"de_ExpiredTokenException\");\nvar de_IDPCommunicationErrorException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_m] != null) {\n contents[_m] = (0, import_smithy_client3.expectString)(output[_m]);\n }\n return contents;\n}, \"de_IDPCommunicationErrorException\");\nvar de_IDPRejectedClaimException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_m] != null) {\n contents[_m] = (0, import_smithy_client3.expectString)(output[_m]);\n }\n return contents;\n}, \"de_IDPRejectedClaimException\");\nvar de_InvalidIdentityTokenException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_m] != null) {\n contents[_m] = (0, import_smithy_client3.expectString)(output[_m]);\n }\n return contents;\n}, \"de_InvalidIdentityTokenException\");\nvar de_MalformedPolicyDocumentException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_m] != null) {\n contents[_m] = (0, import_smithy_client3.expectString)(output[_m]);\n }\n return contents;\n}, \"de_MalformedPolicyDocumentException\");\nvar de_PackedPolicyTooLargeException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_m] != null) {\n contents[_m] = (0, import_smithy_client3.expectString)(output[_m]);\n }\n return contents;\n}, \"de_PackedPolicyTooLargeException\");\nvar de_RegionDisabledException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_m] != null) {\n contents[_m] = (0, import_smithy_client3.expectString)(output[_m]);\n }\n return contents;\n}, \"de_RegionDisabledException\");\nvar deserializeMetadata = /* @__PURE__ */ __name((output) => ({\n httpStatusCode: output.statusCode,\n requestId: output.headers[\"x-amzn-requestid\"] ?? output.headers[\"x-amzn-request-id\"] ?? output.headers[\"x-amz-request-id\"],\n extendedRequestId: output.headers[\"x-amz-id-2\"],\n cfId: output.headers[\"x-amz-cf-id\"]\n}), \"deserializeMetadata\");\nvar throwDefaultError = (0, import_smithy_client3.withBaseException)(STSServiceException);\nvar buildHttpRpcRequest = /* @__PURE__ */ __name(async (context, headers, path, resolvedHostname, body) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const contents = {\n protocol,\n hostname,\n port,\n method: \"POST\",\n path: basePath.endsWith(\"/\") ? basePath.slice(0, -1) + path : basePath + path,\n headers\n };\n if (resolvedHostname !== void 0) {\n contents.hostname = resolvedHostname;\n }\n if (body !== void 0) {\n contents.body = body;\n }\n return new import_protocol_http.HttpRequest(contents);\n}, \"buildHttpRpcRequest\");\nvar SHARED_HEADERS = {\n \"content-type\": \"application/x-www-form-urlencoded\"\n};\nvar _ = \"2011-06-15\";\nvar _A = \"Action\";\nvar _AKI = \"AccessKeyId\";\nvar _AR = \"AssumeRole\";\nvar _ARI = \"AssumedRoleId\";\nvar _ARU = \"AssumedRoleUser\";\nvar _ARWWI = \"AssumeRoleWithWebIdentity\";\nvar _Ar = \"Arn\";\nvar _Au = \"Audience\";\nvar _C = \"Credentials\";\nvar _CA = \"ContextAssertion\";\nvar _DS = \"DurationSeconds\";\nvar _E = \"Expiration\";\nvar _EI = \"ExternalId\";\nvar _K = \"Key\";\nvar _P = \"Policy\";\nvar _PA = \"PolicyArns\";\nvar _PAr = \"ProviderArn\";\nvar _PC = \"ProvidedContexts\";\nvar _PI = \"ProviderId\";\nvar _PPS = \"PackedPolicySize\";\nvar _Pr = \"Provider\";\nvar _RA = \"RoleArn\";\nvar _RSN = \"RoleSessionName\";\nvar _SAK = \"SecretAccessKey\";\nvar _SFWIT = \"SubjectFromWebIdentityToken\";\nvar _SI = \"SourceIdentity\";\nvar _SN = \"SerialNumber\";\nvar _ST = \"SessionToken\";\nvar _T = \"Tags\";\nvar _TC = \"TokenCode\";\nvar _TTK = \"TransitiveTagKeys\";\nvar _V = \"Version\";\nvar _Va = \"Value\";\nvar _WIT = \"WebIdentityToken\";\nvar _a = \"arn\";\nvar _m = \"message\";\nvar buildFormUrlencodedString = /* @__PURE__ */ __name((formEntries) => Object.entries(formEntries).map(([key, value]) => (0, import_smithy_client3.extendedEncodeURIComponent)(key) + \"=\" + (0, import_smithy_client3.extendedEncodeURIComponent)(value)).join(\"&\"), \"buildFormUrlencodedString\");\nvar loadQueryErrorCode = /* @__PURE__ */ __name((output, data) => {\n if (data.Error?.Code !== void 0) {\n return data.Error.Code;\n }\n if (output.statusCode == 404) {\n return \"NotFound\";\n }\n}, \"loadQueryErrorCode\");\n\n// src/submodules/sts/commands/AssumeRoleCommand.ts\nvar AssumeRoleCommand = class extends import_smithy_client4.Command.classBuilder().ep(import_EndpointParameters.commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSSecurityTokenServiceV20110615\", \"AssumeRole\", {}).n(\"STSClient\", \"AssumeRoleCommand\").f(void 0, AssumeRoleResponseFilterSensitiveLog).ser(se_AssumeRoleCommand).de(de_AssumeRoleCommand).build() {\n static {\n __name(this, \"AssumeRoleCommand\");\n }\n};\n\n// src/submodules/sts/commands/AssumeRoleWithWebIdentityCommand.ts\nvar import_middleware_endpoint2 = require(\"@smithy/middleware-endpoint\");\nvar import_middleware_serde2 = require(\"@smithy/middleware-serde\");\nvar import_smithy_client5 = require(\"@smithy/smithy-client\");\nvar import_EndpointParameters2 = require(\"./endpoint/EndpointParameters\");\nvar AssumeRoleWithWebIdentityCommand = class extends import_smithy_client5.Command.classBuilder().ep(import_EndpointParameters2.commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSSecurityTokenServiceV20110615\", \"AssumeRoleWithWebIdentity\", {}).n(\"STSClient\", \"AssumeRoleWithWebIdentityCommand\").f(AssumeRoleWithWebIdentityRequestFilterSensitiveLog, AssumeRoleWithWebIdentityResponseFilterSensitiveLog).ser(se_AssumeRoleWithWebIdentityCommand).de(de_AssumeRoleWithWebIdentityCommand).build() {\n static {\n __name(this, \"AssumeRoleWithWebIdentityCommand\");\n }\n};\n\n// src/submodules/sts/STS.ts\nvar import_STSClient = require(\"./STSClient\");\nvar commands = {\n AssumeRoleCommand,\n AssumeRoleWithWebIdentityCommand\n};\nvar STS = class extends import_STSClient.STSClient {\n static {\n __name(this, \"STS\");\n }\n};\n(0, import_smithy_client6.createAggregatedClient)(commands, STS);\n\n// src/submodules/sts/index.ts\nvar import_EndpointParameters3 = require(\"./endpoint/EndpointParameters\");\n\n// src/submodules/sts/defaultStsRoleAssumers.ts\nvar import_client = require(\"@aws-sdk/core/client\");\nvar ASSUME_ROLE_DEFAULT_REGION = \"us-east-1\";\nvar getAccountIdFromAssumedRoleUser = /* @__PURE__ */ __name((assumedRoleUser) => {\n if (typeof assumedRoleUser?.Arn === \"string\") {\n const arnComponents = assumedRoleUser.Arn.split(\":\");\n if (arnComponents.length > 4 && arnComponents[4] !== \"\") {\n return arnComponents[4];\n }\n }\n return void 0;\n}, \"getAccountIdFromAssumedRoleUser\");\nvar resolveRegion = /* @__PURE__ */ __name(async (_region, _parentRegion, credentialProviderLogger) => {\n const region = typeof _region === \"function\" ? await _region() : _region;\n const parentRegion = typeof _parentRegion === \"function\" ? await _parentRegion() : _parentRegion;\n credentialProviderLogger?.debug?.(\n \"@aws-sdk/client-sts::resolveRegion\",\n \"accepting first of:\",\n `${region} (provider)`,\n `${parentRegion} (parent client)`,\n `${ASSUME_ROLE_DEFAULT_REGION} (STS default)`\n );\n return region ?? parentRegion ?? ASSUME_ROLE_DEFAULT_REGION;\n}, \"resolveRegion\");\nvar getDefaultRoleAssumer = /* @__PURE__ */ __name((stsOptions, STSClient3) => {\n let stsClient;\n let closureSourceCreds;\n return async (sourceCreds, params) => {\n closureSourceCreds = sourceCreds;\n if (!stsClient) {\n const {\n logger = stsOptions?.parentClientConfig?.logger,\n region,\n requestHandler = stsOptions?.parentClientConfig?.requestHandler,\n credentialProviderLogger\n } = stsOptions;\n const resolvedRegion = await resolveRegion(\n region,\n stsOptions?.parentClientConfig?.region,\n credentialProviderLogger\n );\n const isCompatibleRequestHandler = !isH2(requestHandler);\n stsClient = new STSClient3({\n profile: stsOptions?.parentClientConfig?.profile,\n // A hack to make sts client uses the credential in current closure.\n credentialDefaultProvider: /* @__PURE__ */ __name(() => async () => closureSourceCreds, \"credentialDefaultProvider\"),\n region: resolvedRegion,\n requestHandler: isCompatibleRequestHandler ? requestHandler : void 0,\n logger\n });\n }\n const { Credentials: Credentials2, AssumedRoleUser: AssumedRoleUser2 } = await stsClient.send(new AssumeRoleCommand(params));\n if (!Credentials2 || !Credentials2.AccessKeyId || !Credentials2.SecretAccessKey) {\n throw new Error(`Invalid response from STS.assumeRole call with role ${params.RoleArn}`);\n }\n const accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser2);\n const credentials = {\n accessKeyId: Credentials2.AccessKeyId,\n secretAccessKey: Credentials2.SecretAccessKey,\n sessionToken: Credentials2.SessionToken,\n expiration: Credentials2.Expiration,\n // TODO(credentialScope): access normally when shape is updated.\n ...Credentials2.CredentialScope && { credentialScope: Credentials2.CredentialScope },\n ...accountId && { accountId }\n };\n (0, import_client.setCredentialFeature)(credentials, \"CREDENTIALS_STS_ASSUME_ROLE\", \"i\");\n return credentials;\n };\n}, \"getDefaultRoleAssumer\");\nvar getDefaultRoleAssumerWithWebIdentity = /* @__PURE__ */ __name((stsOptions, STSClient3) => {\n let stsClient;\n return async (params) => {\n if (!stsClient) {\n const {\n logger = stsOptions?.parentClientConfig?.logger,\n region,\n requestHandler = stsOptions?.parentClientConfig?.requestHandler,\n credentialProviderLogger\n } = stsOptions;\n const resolvedRegion = await resolveRegion(\n region,\n stsOptions?.parentClientConfig?.region,\n credentialProviderLogger\n );\n const isCompatibleRequestHandler = !isH2(requestHandler);\n stsClient = new STSClient3({\n profile: stsOptions?.parentClientConfig?.profile,\n region: resolvedRegion,\n requestHandler: isCompatibleRequestHandler ? requestHandler : void 0,\n logger\n });\n }\n const { Credentials: Credentials2, AssumedRoleUser: AssumedRoleUser2 } = await stsClient.send(new AssumeRoleWithWebIdentityCommand(params));\n if (!Credentials2 || !Credentials2.AccessKeyId || !Credentials2.SecretAccessKey) {\n throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${params.RoleArn}`);\n }\n const accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser2);\n const credentials = {\n accessKeyId: Credentials2.AccessKeyId,\n secretAccessKey: Credentials2.SecretAccessKey,\n sessionToken: Credentials2.SessionToken,\n expiration: Credentials2.Expiration,\n // TODO(credentialScope): access normally when shape is updated.\n ...Credentials2.CredentialScope && { credentialScope: Credentials2.CredentialScope },\n ...accountId && { accountId }\n };\n if (accountId) {\n (0, import_client.setCredentialFeature)(credentials, \"RESOLVED_ACCOUNT_ID\", \"T\");\n }\n (0, import_client.setCredentialFeature)(credentials, \"CREDENTIALS_STS_ASSUME_ROLE_WEB_ID\", \"k\");\n return credentials;\n };\n}, \"getDefaultRoleAssumerWithWebIdentity\");\nvar isH2 = /* @__PURE__ */ __name((requestHandler) => {\n return requestHandler?.metadata?.handlerProtocol === \"h2\";\n}, \"isH2\");\n\n// src/submodules/sts/defaultRoleAssumers.ts\nvar import_STSClient2 = require(\"./STSClient\");\nvar getCustomizableStsClientCtor = /* @__PURE__ */ __name((baseCtor, customizations) => {\n if (!customizations) return baseCtor;\n else\n return class CustomizableSTSClient extends baseCtor {\n static {\n __name(this, \"CustomizableSTSClient\");\n }\n constructor(config) {\n super(config);\n for (const customization of customizations) {\n this.middlewareStack.use(customization);\n }\n }\n };\n}, \"getCustomizableStsClientCtor\");\nvar getDefaultRoleAssumer2 = /* @__PURE__ */ __name((stsOptions = {}, stsPlugins) => getDefaultRoleAssumer(stsOptions, getCustomizableStsClientCtor(import_STSClient2.STSClient, stsPlugins)), \"getDefaultRoleAssumer\");\nvar getDefaultRoleAssumerWithWebIdentity2 = /* @__PURE__ */ __name((stsOptions = {}, stsPlugins) => getDefaultRoleAssumerWithWebIdentity(stsOptions, getCustomizableStsClientCtor(import_STSClient2.STSClient, stsPlugins)), \"getDefaultRoleAssumerWithWebIdentity\");\nvar decorateDefaultCredentialProvider = /* @__PURE__ */ __name((provider) => (input) => provider({\n roleAssumer: getDefaultRoleAssumer2(input),\n roleAssumerWithWebIdentity: getDefaultRoleAssumerWithWebIdentity2(input),\n ...input\n}), \"decorateDefaultCredentialProvider\");\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n AssumeRoleCommand,\n AssumeRoleResponseFilterSensitiveLog,\n AssumeRoleWithWebIdentityCommand,\n AssumeRoleWithWebIdentityRequestFilterSensitiveLog,\n AssumeRoleWithWebIdentityResponseFilterSensitiveLog,\n ClientInputEndpointParameters,\n CredentialsFilterSensitiveLog,\n ExpiredTokenException,\n IDPCommunicationErrorException,\n IDPRejectedClaimException,\n InvalidIdentityTokenException,\n MalformedPolicyDocumentException,\n PackedPolicyTooLargeException,\n RegionDisabledException,\n STS,\n STSServiceException,\n decorateDefaultCredentialProvider,\n getDefaultRoleAssumer,\n getDefaultRoleAssumerWithWebIdentity,\n ...require(\"./STSClient\")\n});\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getRuntimeConfig = void 0;\nconst tslib_1 = require(\"tslib\");\nconst package_json_1 = tslib_1.__importDefault(require(\"../../../package.json\"));\nconst core_1 = require(\"@aws-sdk/core\");\nconst util_user_agent_node_1 = require(\"@aws-sdk/util-user-agent-node\");\nconst config_resolver_1 = require(\"@smithy/config-resolver\");\nconst core_2 = require(\"@smithy/core\");\nconst hash_node_1 = require(\"@smithy/hash-node\");\nconst middleware_retry_1 = require(\"@smithy/middleware-retry\");\nconst node_config_provider_1 = require(\"@smithy/node-config-provider\");\nconst node_http_handler_1 = require(\"@smithy/node-http-handler\");\nconst util_body_length_node_1 = require(\"@smithy/util-body-length-node\");\nconst util_retry_1 = require(\"@smithy/util-retry\");\nconst runtimeConfig_shared_1 = require(\"./runtimeConfig.shared\");\nconst smithy_client_1 = require(\"@smithy/smithy-client\");\nconst util_defaults_mode_node_1 = require(\"@smithy/util-defaults-mode-node\");\nconst smithy_client_2 = require(\"@smithy/smithy-client\");\nconst getRuntimeConfig = (config) => {\n (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);\n const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);\n const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);\n const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);\n (0, core_1.emitWarningIfUnsupportedVersion)(process.version);\n const loaderConfig = {\n profile: config?.profile,\n logger: clientSharedValues.logger,\n };\n return {\n ...clientSharedValues,\n ...config,\n runtime: \"node\",\n defaultsMode,\n authSchemePreference: config?.authSchemePreference ?? (0, node_config_provider_1.loadConfig)(core_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),\n bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,\n defaultUserAgentProvider: config?.defaultUserAgentProvider ??\n (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),\n httpAuthSchemes: config?.httpAuthSchemes ?? [\n {\n schemeId: \"aws.auth#sigv4\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"aws.auth#sigv4\") ||\n (async (idProps) => await config.credentialDefaultProvider(idProps?.__config || {})()),\n signer: new core_1.AwsSdkSigV4Signer(),\n },\n {\n schemeId: \"smithy.api#noAuth\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"smithy.api#noAuth\") || (async () => ({})),\n signer: new core_2.NoAuthSigner(),\n },\n ],\n maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),\n region: config?.region ??\n (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),\n requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),\n retryMode: config?.retryMode ??\n (0, node_config_provider_1.loadConfig)({\n ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,\n default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE,\n }, config),\n sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, \"sha256\"),\n streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,\n useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),\n };\n};\nexports.getRuntimeConfig = getRuntimeConfig;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getRuntimeConfig = void 0;\nconst core_1 = require(\"@aws-sdk/core\");\nconst core_2 = require(\"@smithy/core\");\nconst smithy_client_1 = require(\"@smithy/smithy-client\");\nconst url_parser_1 = require(\"@smithy/url-parser\");\nconst util_base64_1 = require(\"@smithy/util-base64\");\nconst util_utf8_1 = require(\"@smithy/util-utf8\");\nconst httpAuthSchemeProvider_1 = require(\"./auth/httpAuthSchemeProvider\");\nconst endpointResolver_1 = require(\"./endpoint/endpointResolver\");\nconst getRuntimeConfig = (config) => {\n return {\n apiVersion: \"2011-06-15\",\n base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64,\n base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,\n disableHostPrefix: config?.disableHostPrefix ?? false,\n endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,\n extensions: config?.extensions ?? [],\n httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSTSHttpAuthSchemeProvider,\n httpAuthSchemes: config?.httpAuthSchemes ?? [\n {\n schemeId: \"aws.auth#sigv4\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"aws.auth#sigv4\"),\n signer: new core_1.AwsSdkSigV4Signer(),\n },\n {\n schemeId: \"smithy.api#noAuth\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"smithy.api#noAuth\") || (async () => ({})),\n signer: new core_2.NoAuthSigner(),\n },\n ],\n logger: config?.logger ?? new smithy_client_1.NoOpLogger(),\n serviceId: config?.serviceId ?? \"STS\",\n urlParser: config?.urlParser ?? url_parser_1.parseUrl,\n utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,\n utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8,\n };\n};\nexports.getRuntimeConfig = getRuntimeConfig;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resolveRuntimeExtensions = void 0;\nconst region_config_resolver_1 = require(\"@aws-sdk/region-config-resolver\");\nconst protocol_http_1 = require(\"@smithy/protocol-http\");\nconst smithy_client_1 = require(\"@smithy/smithy-client\");\nconst httpAuthExtensionConfiguration_1 = require(\"./auth/httpAuthExtensionConfiguration\");\nconst resolveRuntimeExtensions = (runtimeConfig, extensions) => {\n const extensionConfiguration = Object.assign((0, region_config_resolver_1.getAwsRegionExtensionConfiguration)(runtimeConfig), (0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig), (0, protocol_http_1.getHttpHandlerExtensionConfiguration)(runtimeConfig), (0, httpAuthExtensionConfiguration_1.getHttpAuthExtensionConfiguration)(runtimeConfig));\n extensions.forEach((extension) => extension.configure(extensionConfiguration));\n return Object.assign(runtimeConfig, (0, region_config_resolver_1.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), (0, smithy_client_1.resolveDefaultRuntimeConfig)(extensionConfiguration), (0, protocol_http_1.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), (0, httpAuthExtensionConfiguration_1.resolveHttpAuthRuntimeConfig)(extensionConfiguration));\n};\nexports.resolveRuntimeExtensions = resolveRuntimeExtensions;\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar index_exports = {};\n__export(index_exports, {\n NODE_REGION_CONFIG_FILE_OPTIONS: () => NODE_REGION_CONFIG_FILE_OPTIONS,\n NODE_REGION_CONFIG_OPTIONS: () => NODE_REGION_CONFIG_OPTIONS,\n REGION_ENV_NAME: () => REGION_ENV_NAME,\n REGION_INI_NAME: () => REGION_INI_NAME,\n getAwsRegionExtensionConfiguration: () => getAwsRegionExtensionConfiguration,\n resolveAwsRegionExtensionConfiguration: () => resolveAwsRegionExtensionConfiguration,\n resolveRegionConfig: () => resolveRegionConfig\n});\nmodule.exports = __toCommonJS(index_exports);\n\n// src/extensions/index.ts\nvar getAwsRegionExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {\n return {\n setRegion(region) {\n runtimeConfig.region = region;\n },\n region() {\n return runtimeConfig.region;\n }\n };\n}, \"getAwsRegionExtensionConfiguration\");\nvar resolveAwsRegionExtensionConfiguration = /* @__PURE__ */ __name((awsRegionExtensionConfiguration) => {\n return {\n region: awsRegionExtensionConfiguration.region()\n };\n}, \"resolveAwsRegionExtensionConfiguration\");\n\n// src/regionConfig/config.ts\nvar REGION_ENV_NAME = \"AWS_REGION\";\nvar REGION_INI_NAME = \"region\";\nvar NODE_REGION_CONFIG_OPTIONS = {\n environmentVariableSelector: /* @__PURE__ */ __name((env) => env[REGION_ENV_NAME], \"environmentVariableSelector\"),\n configFileSelector: /* @__PURE__ */ __name((profile) => profile[REGION_INI_NAME], \"configFileSelector\"),\n default: /* @__PURE__ */ __name(() => {\n throw new Error(\"Region is missing\");\n }, \"default\")\n};\nvar NODE_REGION_CONFIG_FILE_OPTIONS = {\n preferredFile: \"credentials\"\n};\n\n// src/regionConfig/isFipsRegion.ts\nvar isFipsRegion = /* @__PURE__ */ __name((region) => typeof region === \"string\" && (region.startsWith(\"fips-\") || region.endsWith(\"-fips\")), \"isFipsRegion\");\n\n// src/regionConfig/getRealRegion.ts\nvar getRealRegion = /* @__PURE__ */ __name((region) => isFipsRegion(region) ? [\"fips-aws-global\", \"aws-fips\"].includes(region) ? \"us-east-1\" : region.replace(/fips-(dkr-|prod-)?|-fips/, \"\") : region, \"getRealRegion\");\n\n// src/regionConfig/resolveRegionConfig.ts\nvar resolveRegionConfig = /* @__PURE__ */ __name((input) => {\n const { region, useFipsEndpoint } = input;\n if (!region) {\n throw new Error(\"Region is missing\");\n }\n return Object.assign(input, {\n region: /* @__PURE__ */ __name(async () => {\n if (typeof region === \"string\") {\n return getRealRegion(region);\n }\n const providedRegion = await region();\n return getRealRegion(providedRegion);\n }, \"region\"),\n useFipsEndpoint: /* @__PURE__ */ __name(async () => {\n const providedRegion = typeof region === \"string\" ? region : await region();\n if (isFipsRegion(providedRegion)) {\n return true;\n }\n return typeof useFipsEndpoint !== \"function\" ? Promise.resolve(!!useFipsEndpoint) : useFipsEndpoint();\n }, \"useFipsEndpoint\")\n });\n}, \"resolveRegionConfig\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n getAwsRegionExtensionConfiguration,\n resolveAwsRegionExtensionConfiguration,\n REGION_ENV_NAME,\n REGION_INI_NAME,\n NODE_REGION_CONFIG_OPTIONS,\n NODE_REGION_CONFIG_FILE_OPTIONS,\n resolveRegionConfig\n});\n\n","\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar index_exports = {};\n__export(index_exports, {\n fromEnvSigningName: () => fromEnvSigningName,\n fromSso: () => fromSso,\n fromStatic: () => fromStatic,\n nodeProvider: () => nodeProvider\n});\nmodule.exports = __toCommonJS(index_exports);\n\n// src/fromEnvSigningName.ts\nvar import_core = require(\"@aws-sdk/core\");\nvar import_property_provider = require(\"@smithy/property-provider\");\nvar fromEnvSigningName = /* @__PURE__ */ __name(({ logger, signingName } = {}) => async () => {\n logger?.debug?.(\"@aws-sdk/token-providers - fromEnvSigningName\");\n if (!signingName) {\n throw new import_property_provider.TokenProviderError(\"Please pass 'signingName' to compute environment variable key\", { logger });\n }\n const bearerTokenKey = (0, import_core.getBearerTokenEnvKey)(signingName);\n if (!(bearerTokenKey in process.env)) {\n throw new import_property_provider.TokenProviderError(`Token not present in '${bearerTokenKey}' environment variable`, { logger });\n }\n return { token: process.env[bearerTokenKey] };\n}, \"fromEnvSigningName\");\n\n// src/fromSso.ts\n\n\n\n// src/constants.ts\nvar EXPIRE_WINDOW_MS = 5 * 60 * 1e3;\nvar REFRESH_MESSAGE = `To refresh this SSO session run 'aws sso login' with the corresponding profile.`;\n\n// src/getSsoOidcClient.ts\nvar getSsoOidcClient = /* @__PURE__ */ __name(async (ssoRegion, init = {}) => {\n const { SSOOIDCClient } = await Promise.resolve().then(() => __toESM(require(\"@aws-sdk/nested-clients/sso-oidc\")));\n const ssoOidcClient = new SSOOIDCClient(\n Object.assign({}, init.clientConfig ?? {}, {\n region: ssoRegion ?? init.clientConfig?.region,\n logger: init.clientConfig?.logger ?? init.parentClientConfig?.logger\n })\n );\n return ssoOidcClient;\n}, \"getSsoOidcClient\");\n\n// src/getNewSsoOidcToken.ts\nvar getNewSsoOidcToken = /* @__PURE__ */ __name(async (ssoToken, ssoRegion, init = {}) => {\n const { CreateTokenCommand } = await Promise.resolve().then(() => __toESM(require(\"@aws-sdk/nested-clients/sso-oidc\")));\n const ssoOidcClient = await getSsoOidcClient(ssoRegion, init);\n return ssoOidcClient.send(\n new CreateTokenCommand({\n clientId: ssoToken.clientId,\n clientSecret: ssoToken.clientSecret,\n refreshToken: ssoToken.refreshToken,\n grantType: \"refresh_token\"\n })\n );\n}, \"getNewSsoOidcToken\");\n\n// src/validateTokenExpiry.ts\n\nvar validateTokenExpiry = /* @__PURE__ */ __name((token) => {\n if (token.expiration && token.expiration.getTime() < Date.now()) {\n throw new import_property_provider.TokenProviderError(`Token is expired. ${REFRESH_MESSAGE}`, false);\n }\n}, \"validateTokenExpiry\");\n\n// src/validateTokenKey.ts\n\nvar validateTokenKey = /* @__PURE__ */ __name((key, value, forRefresh = false) => {\n if (typeof value === \"undefined\") {\n throw new import_property_provider.TokenProviderError(\n `Value not present for '${key}' in SSO Token${forRefresh ? \". Cannot refresh\" : \"\"}. ${REFRESH_MESSAGE}`,\n false\n );\n }\n}, \"validateTokenKey\");\n\n// src/writeSSOTokenToFile.ts\nvar import_shared_ini_file_loader = require(\"@smithy/shared-ini-file-loader\");\nvar import_fs = require(\"fs\");\nvar { writeFile } = import_fs.promises;\nvar writeSSOTokenToFile = /* @__PURE__ */ __name((id, ssoToken) => {\n const tokenFilepath = (0, import_shared_ini_file_loader.getSSOTokenFilepath)(id);\n const tokenString = JSON.stringify(ssoToken, null, 2);\n return writeFile(tokenFilepath, tokenString);\n}, \"writeSSOTokenToFile\");\n\n// src/fromSso.ts\nvar lastRefreshAttemptTime = /* @__PURE__ */ new Date(0);\nvar fromSso = /* @__PURE__ */ __name((_init = {}) => async ({ callerClientConfig } = {}) => {\n const init = {\n ..._init,\n parentClientConfig: {\n ...callerClientConfig,\n ..._init.parentClientConfig\n }\n };\n init.logger?.debug(\"@aws-sdk/token-providers - fromSso\");\n const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init);\n const profileName = (0, import_shared_ini_file_loader.getProfileName)({\n profile: init.profile ?? callerClientConfig?.profile\n });\n const profile = profiles[profileName];\n if (!profile) {\n throw new import_property_provider.TokenProviderError(`Profile '${profileName}' could not be found in shared credentials file.`, false);\n } else if (!profile[\"sso_session\"]) {\n throw new import_property_provider.TokenProviderError(`Profile '${profileName}' is missing required property 'sso_session'.`);\n }\n const ssoSessionName = profile[\"sso_session\"];\n const ssoSessions = await (0, import_shared_ini_file_loader.loadSsoSessionData)(init);\n const ssoSession = ssoSessions[ssoSessionName];\n if (!ssoSession) {\n throw new import_property_provider.TokenProviderError(\n `Sso session '${ssoSessionName}' could not be found in shared credentials file.`,\n false\n );\n }\n for (const ssoSessionRequiredKey of [\"sso_start_url\", \"sso_region\"]) {\n if (!ssoSession[ssoSessionRequiredKey]) {\n throw new import_property_provider.TokenProviderError(\n `Sso session '${ssoSessionName}' is missing required property '${ssoSessionRequiredKey}'.`,\n false\n );\n }\n }\n const ssoStartUrl = ssoSession[\"sso_start_url\"];\n const ssoRegion = ssoSession[\"sso_region\"];\n let ssoToken;\n try {\n ssoToken = await (0, import_shared_ini_file_loader.getSSOTokenFromFile)(ssoSessionName);\n } catch (e) {\n throw new import_property_provider.TokenProviderError(\n `The SSO session token associated with profile=${profileName} was not found or is invalid. ${REFRESH_MESSAGE}`,\n false\n );\n }\n validateTokenKey(\"accessToken\", ssoToken.accessToken);\n validateTokenKey(\"expiresAt\", ssoToken.expiresAt);\n const { accessToken, expiresAt } = ssoToken;\n const existingToken = { token: accessToken, expiration: new Date(expiresAt) };\n if (existingToken.expiration.getTime() - Date.now() > EXPIRE_WINDOW_MS) {\n return existingToken;\n }\n if (Date.now() - lastRefreshAttemptTime.getTime() < 30 * 1e3) {\n validateTokenExpiry(existingToken);\n return existingToken;\n }\n validateTokenKey(\"clientId\", ssoToken.clientId, true);\n validateTokenKey(\"clientSecret\", ssoToken.clientSecret, true);\n validateTokenKey(\"refreshToken\", ssoToken.refreshToken, true);\n try {\n lastRefreshAttemptTime.setTime(Date.now());\n const newSsoOidcToken = await getNewSsoOidcToken(ssoToken, ssoRegion, init);\n validateTokenKey(\"accessToken\", newSsoOidcToken.accessToken);\n validateTokenKey(\"expiresIn\", newSsoOidcToken.expiresIn);\n const newTokenExpiration = new Date(Date.now() + newSsoOidcToken.expiresIn * 1e3);\n try {\n await writeSSOTokenToFile(ssoSessionName, {\n ...ssoToken,\n accessToken: newSsoOidcToken.accessToken,\n expiresAt: newTokenExpiration.toISOString(),\n refreshToken: newSsoOidcToken.refreshToken\n });\n } catch (error) {\n }\n return {\n token: newSsoOidcToken.accessToken,\n expiration: newTokenExpiration\n };\n } catch (error) {\n validateTokenExpiry(existingToken);\n return existingToken;\n }\n}, \"fromSso\");\n\n// src/fromStatic.ts\n\nvar fromStatic = /* @__PURE__ */ __name(({ token, logger }) => async () => {\n logger?.debug(\"@aws-sdk/token-providers - fromStatic\");\n if (!token || !token.token) {\n throw new import_property_provider.TokenProviderError(`Please pass a valid token to fromStatic`, false);\n }\n return token;\n}, \"fromStatic\");\n\n// src/nodeProvider.ts\n\nvar nodeProvider = /* @__PURE__ */ __name((init = {}) => (0, import_property_provider.memoize)(\n (0, import_property_provider.chain)(fromSso(init), async () => {\n throw new import_property_provider.TokenProviderError(\"Could not load token from any providers\", false);\n }),\n (token) => token.expiration !== void 0 && token.expiration.getTime() - Date.now() < 3e5,\n (token) => token.expiration !== void 0\n), \"nodeProvider\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n fromEnvSigningName,\n fromSso,\n fromStatic,\n nodeProvider\n});\n\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar index_exports = {};\n__export(index_exports, {\n ConditionObject: () => import_util_endpoints.ConditionObject,\n DeprecatedObject: () => import_util_endpoints.DeprecatedObject,\n EndpointError: () => import_util_endpoints.EndpointError,\n EndpointObject: () => import_util_endpoints.EndpointObject,\n EndpointObjectHeaders: () => import_util_endpoints.EndpointObjectHeaders,\n EndpointObjectProperties: () => import_util_endpoints.EndpointObjectProperties,\n EndpointParams: () => import_util_endpoints.EndpointParams,\n EndpointResolverOptions: () => import_util_endpoints.EndpointResolverOptions,\n EndpointRuleObject: () => import_util_endpoints.EndpointRuleObject,\n ErrorRuleObject: () => import_util_endpoints.ErrorRuleObject,\n EvaluateOptions: () => import_util_endpoints.EvaluateOptions,\n Expression: () => import_util_endpoints.Expression,\n FunctionArgv: () => import_util_endpoints.FunctionArgv,\n FunctionObject: () => import_util_endpoints.FunctionObject,\n FunctionReturn: () => import_util_endpoints.FunctionReturn,\n ParameterObject: () => import_util_endpoints.ParameterObject,\n ReferenceObject: () => import_util_endpoints.ReferenceObject,\n ReferenceRecord: () => import_util_endpoints.ReferenceRecord,\n RuleSetObject: () => import_util_endpoints.RuleSetObject,\n RuleSetRules: () => import_util_endpoints.RuleSetRules,\n TreeRuleObject: () => import_util_endpoints.TreeRuleObject,\n awsEndpointFunctions: () => awsEndpointFunctions,\n getUserAgentPrefix: () => getUserAgentPrefix,\n isIpAddress: () => import_util_endpoints.isIpAddress,\n partition: () => partition,\n resolveEndpoint: () => import_util_endpoints.resolveEndpoint,\n setPartitionInfo: () => setPartitionInfo,\n useDefaultPartitionInfo: () => useDefaultPartitionInfo\n});\nmodule.exports = __toCommonJS(index_exports);\n\n// src/aws.ts\n\n\n// src/lib/aws/isVirtualHostableS3Bucket.ts\n\n\n// src/lib/isIpAddress.ts\nvar import_util_endpoints = require(\"@smithy/util-endpoints\");\n\n// src/lib/aws/isVirtualHostableS3Bucket.ts\nvar isVirtualHostableS3Bucket = /* @__PURE__ */ __name((value, allowSubDomains = false) => {\n if (allowSubDomains) {\n for (const label of value.split(\".\")) {\n if (!isVirtualHostableS3Bucket(label)) {\n return false;\n }\n }\n return true;\n }\n if (!(0, import_util_endpoints.isValidHostLabel)(value)) {\n return false;\n }\n if (value.length < 3 || value.length > 63) {\n return false;\n }\n if (value !== value.toLowerCase()) {\n return false;\n }\n if ((0, import_util_endpoints.isIpAddress)(value)) {\n return false;\n }\n return true;\n}, \"isVirtualHostableS3Bucket\");\n\n// src/lib/aws/parseArn.ts\nvar ARN_DELIMITER = \":\";\nvar RESOURCE_DELIMITER = \"/\";\nvar parseArn = /* @__PURE__ */ __name((value) => {\n const segments = value.split(ARN_DELIMITER);\n if (segments.length < 6) return null;\n const [arn, partition2, service, region, accountId, ...resourcePath] = segments;\n if (arn !== \"arn\" || partition2 === \"\" || service === \"\" || resourcePath.join(ARN_DELIMITER) === \"\") return null;\n const resourceId = resourcePath.map((resource) => resource.split(RESOURCE_DELIMITER)).flat();\n return {\n partition: partition2,\n service,\n region,\n accountId,\n resourceId\n };\n}, \"parseArn\");\n\n// src/lib/aws/partitions.json\nvar partitions_default = {\n partitions: [{\n id: \"aws\",\n outputs: {\n dnsSuffix: \"amazonaws.com\",\n dualStackDnsSuffix: \"api.aws\",\n implicitGlobalRegion: \"us-east-1\",\n name: \"aws\",\n supportsDualStack: true,\n supportsFIPS: true\n },\n regionRegex: \"^(us|eu|ap|sa|ca|me|af|il|mx)\\\\-\\\\w+\\\\-\\\\d+$\",\n regions: {\n \"af-south-1\": {\n description: \"Africa (Cape Town)\"\n },\n \"ap-east-1\": {\n description: \"Asia Pacific (Hong Kong)\"\n },\n \"ap-northeast-1\": {\n description: \"Asia Pacific (Tokyo)\"\n },\n \"ap-northeast-2\": {\n description: \"Asia Pacific (Seoul)\"\n },\n \"ap-northeast-3\": {\n description: \"Asia Pacific (Osaka)\"\n },\n \"ap-south-1\": {\n description: \"Asia Pacific (Mumbai)\"\n },\n \"ap-south-2\": {\n description: \"Asia Pacific (Hyderabad)\"\n },\n \"ap-southeast-1\": {\n description: \"Asia Pacific (Singapore)\"\n },\n \"ap-southeast-2\": {\n description: \"Asia Pacific (Sydney)\"\n },\n \"ap-southeast-3\": {\n description: \"Asia Pacific (Jakarta)\"\n },\n \"ap-southeast-4\": {\n description: \"Asia Pacific (Melbourne)\"\n },\n \"ap-southeast-5\": {\n description: \"Asia Pacific (Malaysia)\"\n },\n \"ap-southeast-7\": {\n description: \"Asia Pacific (Thailand)\"\n },\n \"aws-global\": {\n description: \"AWS Standard global region\"\n },\n \"ca-central-1\": {\n description: \"Canada (Central)\"\n },\n \"ca-west-1\": {\n description: \"Canada West (Calgary)\"\n },\n \"eu-central-1\": {\n description: \"Europe (Frankfurt)\"\n },\n \"eu-central-2\": {\n description: \"Europe (Zurich)\"\n },\n \"eu-north-1\": {\n description: \"Europe (Stockholm)\"\n },\n \"eu-south-1\": {\n description: \"Europe (Milan)\"\n },\n \"eu-south-2\": {\n description: \"Europe (Spain)\"\n },\n \"eu-west-1\": {\n description: \"Europe (Ireland)\"\n },\n \"eu-west-2\": {\n description: \"Europe (London)\"\n },\n \"eu-west-3\": {\n description: \"Europe (Paris)\"\n },\n \"il-central-1\": {\n description: \"Israel (Tel Aviv)\"\n },\n \"me-central-1\": {\n description: \"Middle East (UAE)\"\n },\n \"me-south-1\": {\n description: \"Middle East (Bahrain)\"\n },\n \"mx-central-1\": {\n description: \"Mexico (Central)\"\n },\n \"sa-east-1\": {\n description: \"South America (Sao Paulo)\"\n },\n \"us-east-1\": {\n description: \"US East (N. Virginia)\"\n },\n \"us-east-2\": {\n description: \"US East (Ohio)\"\n },\n \"us-west-1\": {\n description: \"US West (N. California)\"\n },\n \"us-west-2\": {\n description: \"US West (Oregon)\"\n }\n }\n }, {\n id: \"aws-cn\",\n outputs: {\n dnsSuffix: \"amazonaws.com.cn\",\n dualStackDnsSuffix: \"api.amazonwebservices.com.cn\",\n implicitGlobalRegion: \"cn-northwest-1\",\n name: \"aws-cn\",\n supportsDualStack: true,\n supportsFIPS: true\n },\n regionRegex: \"^cn\\\\-\\\\w+\\\\-\\\\d+$\",\n regions: {\n \"aws-cn-global\": {\n description: \"AWS China global region\"\n },\n \"cn-north-1\": {\n description: \"China (Beijing)\"\n },\n \"cn-northwest-1\": {\n description: \"China (Ningxia)\"\n }\n }\n }, {\n id: \"aws-us-gov\",\n outputs: {\n dnsSuffix: \"amazonaws.com\",\n dualStackDnsSuffix: \"api.aws\",\n implicitGlobalRegion: \"us-gov-west-1\",\n name: \"aws-us-gov\",\n supportsDualStack: true,\n supportsFIPS: true\n },\n regionRegex: \"^us\\\\-gov\\\\-\\\\w+\\\\-\\\\d+$\",\n regions: {\n \"aws-us-gov-global\": {\n description: \"AWS GovCloud (US) global region\"\n },\n \"us-gov-east-1\": {\n description: \"AWS GovCloud (US-East)\"\n },\n \"us-gov-west-1\": {\n description: \"AWS GovCloud (US-West)\"\n }\n }\n }, {\n id: \"aws-iso\",\n outputs: {\n dnsSuffix: \"c2s.ic.gov\",\n dualStackDnsSuffix: \"c2s.ic.gov\",\n implicitGlobalRegion: \"us-iso-east-1\",\n name: \"aws-iso\",\n supportsDualStack: false,\n supportsFIPS: true\n },\n regionRegex: \"^us\\\\-iso\\\\-\\\\w+\\\\-\\\\d+$\",\n regions: {\n \"aws-iso-global\": {\n description: \"AWS ISO (US) global region\"\n },\n \"us-iso-east-1\": {\n description: \"US ISO East\"\n },\n \"us-iso-west-1\": {\n description: \"US ISO WEST\"\n }\n }\n }, {\n id: \"aws-iso-b\",\n outputs: {\n dnsSuffix: \"sc2s.sgov.gov\",\n dualStackDnsSuffix: \"sc2s.sgov.gov\",\n implicitGlobalRegion: \"us-isob-east-1\",\n name: \"aws-iso-b\",\n supportsDualStack: false,\n supportsFIPS: true\n },\n regionRegex: \"^us\\\\-isob\\\\-\\\\w+\\\\-\\\\d+$\",\n regions: {\n \"aws-iso-b-global\": {\n description: \"AWS ISOB (US) global region\"\n },\n \"us-isob-east-1\": {\n description: \"US ISOB East (Ohio)\"\n }\n }\n }, {\n id: \"aws-iso-e\",\n outputs: {\n dnsSuffix: \"cloud.adc-e.uk\",\n dualStackDnsSuffix: \"cloud.adc-e.uk\",\n implicitGlobalRegion: \"eu-isoe-west-1\",\n name: \"aws-iso-e\",\n supportsDualStack: false,\n supportsFIPS: true\n },\n regionRegex: \"^eu\\\\-isoe\\\\-\\\\w+\\\\-\\\\d+$\",\n regions: {\n \"aws-iso-e-global\": {\n description: \"AWS ISOE (Europe) global region\"\n },\n \"eu-isoe-west-1\": {\n description: \"EU ISOE West\"\n }\n }\n }, {\n id: \"aws-iso-f\",\n outputs: {\n dnsSuffix: \"csp.hci.ic.gov\",\n dualStackDnsSuffix: \"csp.hci.ic.gov\",\n implicitGlobalRegion: \"us-isof-south-1\",\n name: \"aws-iso-f\",\n supportsDualStack: false,\n supportsFIPS: true\n },\n regionRegex: \"^us\\\\-isof\\\\-\\\\w+\\\\-\\\\d+$\",\n regions: {\n \"aws-iso-f-global\": {\n description: \"AWS ISOF global region\"\n },\n \"us-isof-east-1\": {\n description: \"US ISOF EAST\"\n },\n \"us-isof-south-1\": {\n description: \"US ISOF SOUTH\"\n }\n }\n }, {\n id: \"aws-eusc\",\n outputs: {\n dnsSuffix: \"amazonaws.eu\",\n dualStackDnsSuffix: \"amazonaws.eu\",\n implicitGlobalRegion: \"eusc-de-east-1\",\n name: \"aws-eusc\",\n supportsDualStack: false,\n supportsFIPS: true\n },\n regionRegex: \"^eusc\\\\-(de)\\\\-\\\\w+\\\\-\\\\d+$\",\n regions: {\n \"eusc-de-east-1\": {\n description: \"EU (Germany)\"\n }\n }\n }],\n version: \"1.1\"\n};\n\n// src/lib/aws/partition.ts\nvar selectedPartitionsInfo = partitions_default;\nvar selectedUserAgentPrefix = \"\";\nvar partition = /* @__PURE__ */ __name((value) => {\n const { partitions } = selectedPartitionsInfo;\n for (const partition2 of partitions) {\n const { regions, outputs } = partition2;\n for (const [region, regionData] of Object.entries(regions)) {\n if (region === value) {\n return {\n ...outputs,\n ...regionData\n };\n }\n }\n }\n for (const partition2 of partitions) {\n const { regionRegex, outputs } = partition2;\n if (new RegExp(regionRegex).test(value)) {\n return {\n ...outputs\n };\n }\n }\n const DEFAULT_PARTITION = partitions.find((partition2) => partition2.id === \"aws\");\n if (!DEFAULT_PARTITION) {\n throw new Error(\n \"Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.\"\n );\n }\n return {\n ...DEFAULT_PARTITION.outputs\n };\n}, \"partition\");\nvar setPartitionInfo = /* @__PURE__ */ __name((partitionsInfo, userAgentPrefix = \"\") => {\n selectedPartitionsInfo = partitionsInfo;\n selectedUserAgentPrefix = userAgentPrefix;\n}, \"setPartitionInfo\");\nvar useDefaultPartitionInfo = /* @__PURE__ */ __name(() => {\n setPartitionInfo(partitions_default, \"\");\n}, \"useDefaultPartitionInfo\");\nvar getUserAgentPrefix = /* @__PURE__ */ __name(() => selectedUserAgentPrefix, \"getUserAgentPrefix\");\n\n// src/aws.ts\nvar awsEndpointFunctions = {\n isVirtualHostableS3Bucket,\n parseArn,\n partition\n};\nimport_util_endpoints.customEndpointFunctions.aws = awsEndpointFunctions;\n\n// src/resolveEndpoint.ts\n\n\n// src/types/EndpointError.ts\n\n\n// src/types/EndpointRuleObject.ts\n\n\n// src/types/ErrorRuleObject.ts\n\n\n// src/types/RuleSetObject.ts\n\n\n// src/types/TreeRuleObject.ts\n\n\n// src/types/shared.ts\n\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n awsEndpointFunctions,\n partition,\n setPartitionInfo,\n useDefaultPartitionInfo,\n getUserAgentPrefix,\n isIpAddress,\n resolveEndpoint,\n EndpointError\n});\n\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar index_exports = {};\n__export(index_exports, {\n NODE_APP_ID_CONFIG_OPTIONS: () => NODE_APP_ID_CONFIG_OPTIONS,\n UA_APP_ID_ENV_NAME: () => UA_APP_ID_ENV_NAME,\n UA_APP_ID_INI_NAME: () => UA_APP_ID_INI_NAME,\n createDefaultUserAgentProvider: () => createDefaultUserAgentProvider,\n crtAvailability: () => crtAvailability,\n defaultUserAgent: () => defaultUserAgent\n});\nmodule.exports = __toCommonJS(index_exports);\n\n// src/defaultUserAgent.ts\nvar import_os = require(\"os\");\nvar import_process = require(\"process\");\n\n// src/crt-availability.ts\nvar crtAvailability = {\n isCrtAvailable: false\n};\n\n// src/is-crt-available.ts\nvar isCrtAvailable = /* @__PURE__ */ __name(() => {\n if (crtAvailability.isCrtAvailable) {\n return [\"md/crt-avail\"];\n }\n return null;\n}, \"isCrtAvailable\");\n\n// src/defaultUserAgent.ts\nvar createDefaultUserAgentProvider = /* @__PURE__ */ __name(({ serviceId, clientVersion }) => {\n return async (config) => {\n const sections = [\n // sdk-metadata\n [\"aws-sdk-js\", clientVersion],\n // ua-metadata\n [\"ua\", \"2.1\"],\n // os-metadata\n [`os/${(0, import_os.platform)()}`, (0, import_os.release)()],\n // language-metadata\n // ECMAScript edition doesn't matter in JS, so no version needed.\n [\"lang/js\"],\n [\"md/nodejs\", `${import_process.versions.node}`]\n ];\n const crtAvailable = isCrtAvailable();\n if (crtAvailable) {\n sections.push(crtAvailable);\n }\n if (serviceId) {\n sections.push([`api/${serviceId}`, clientVersion]);\n }\n if (import_process.env.AWS_EXECUTION_ENV) {\n sections.push([`exec-env/${import_process.env.AWS_EXECUTION_ENV}`]);\n }\n const appId = await config?.userAgentAppId?.();\n const resolvedUserAgent = appId ? [...sections, [`app/${appId}`]] : [...sections];\n return resolvedUserAgent;\n };\n}, \"createDefaultUserAgentProvider\");\nvar defaultUserAgent = createDefaultUserAgentProvider;\n\n// src/nodeAppIdConfigOptions.ts\nvar import_middleware_user_agent = require(\"@aws-sdk/middleware-user-agent\");\nvar UA_APP_ID_ENV_NAME = \"AWS_SDK_UA_APP_ID\";\nvar UA_APP_ID_INI_NAME = \"sdk_ua_app_id\";\nvar UA_APP_ID_INI_NAME_DEPRECATED = \"sdk-ua-app-id\";\nvar NODE_APP_ID_CONFIG_OPTIONS = {\n environmentVariableSelector: /* @__PURE__ */ __name((env2) => env2[UA_APP_ID_ENV_NAME], \"environmentVariableSelector\"),\n configFileSelector: /* @__PURE__ */ __name((profile) => profile[UA_APP_ID_INI_NAME] ?? profile[UA_APP_ID_INI_NAME_DEPRECATED], \"configFileSelector\"),\n default: import_middleware_user_agent.DEFAULT_UA_APP_ID\n};\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n crtAvailability,\n createDefaultUserAgentProvider,\n defaultUserAgent,\n UA_APP_ID_ENV_NAME,\n UA_APP_ID_INI_NAME,\n NODE_APP_ID_CONFIG_OPTIONS\n});\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Database = void 0;\nconst entity_1 = require(\"./entity\");\nconst relationship_1 = require(\"./relationship\");\nclass Database {\n static entitiesOnly(entities) {\n return new Database(entities, relationship_1.NO_RELATIONSHIPS);\n }\n constructor(entities, relationships) {\n this.idCtr = 0;\n this.schema = {\n ...entities,\n ...relationships({\n relationship: (fromKey, toKey) => (0, relationship_1.relationshipCollection)((id) => this.get(fromKey, id), (id) => this.get(toKey, id)),\n }),\n };\n }\n id() {\n return `${this.idCtr++}`;\n }\n /**\n * Allocate an ID and store\n */\n allocate(key, entity) {\n return this.store(key, this.e(entity));\n }\n /**\n * Store with a preallocated ID\n */\n store(key, entity) {\n const coll = this.schema[key];\n coll.add(entity);\n return entity;\n }\n /**\n * Get an entity by key\n */\n get(key, id) {\n const coll = this.schema[key];\n const ret = coll.entities.get(typeof id === 'string' ? id : id.$ref);\n if (!ret) {\n throw new Error(`No such ${String(key)}: ${id}`);\n }\n return ret;\n }\n /**\n * All entities of a given type\n */\n all(key) {\n const coll = this.schema[key];\n return Array.from(coll.entities.values());\n }\n /**\n * Lookup an entity by index\n */\n lookup(key, index, lookup, value) {\n const coll = this.schema[key];\n const ids = coll.indexes[index].lookups[lookup](value);\n return addOnlyMethod(ids.map((id) => coll.entities.get(id)), `${String(key)} with ${String(index)} ${String(lookup)} ${JSON.stringify(value)}`);\n }\n /**\n * Allocate an ID and store if the entity does not yet exist\n */\n findOrAllocate(key, index, lookup, entity) {\n const res = this.lookup(key, index, lookup, entity[index]);\n if (res.length) {\n return res.only();\n }\n return this.allocate(key, entity);\n }\n link(key, from, to, attributes) {\n const col = this.schema[key];\n col.add(from, to, attributes);\n }\n /**\n * Follow a link\n */\n follow(key, from) {\n var _a;\n const col = this.schema[key];\n const toLinks = (_a = col.forward.get(from.$id)) !== null && _a !== void 0 ? _a : [];\n const ret = toLinks.map((i) => ({ entity: col.toColl(i.$id), ...removeId(i) }));\n return addOnlyMethod(ret, `${String(key)} from ${from}`);\n }\n /**\n * Follow incoming links backwards\n */\n incoming(key, to) {\n var _a;\n const col = this.schema[key];\n const fromIds = (_a = col.backward.get(to.$id)) !== null && _a !== void 0 ? _a : [];\n const ret = fromIds.map((i) => ({ entity: col.fromColl(i.$id), ...removeId(i) }));\n return addOnlyMethod(ret, `${String(key)} to ${to}`);\n }\n e(entity) {\n return {\n $id: this.id(),\n ...entity,\n };\n }\n /**\n * Turn the current database collection into something that can be stored.\n */\n save() {\n return {\n idCtr: this.idCtr,\n schema: dehydrate(this.schema),\n };\n function dehydrate(x) {\n if ((0, entity_1.isEntityCollection)(x)) {\n return x.dehydrate();\n }\n if ((0, relationship_1.isRelationshipCollection)(x)) {\n return x.dehydrate();\n }\n if (Array.isArray(x)) {\n return x.map(dehydrate);\n }\n if (!!x && typeof x === 'object') {\n return Object.fromEntries(Object.entries(x).map(([k, v]) => [k, dehydrate(v)]));\n }\n return x;\n }\n }\n load(db) {\n this.idCtr = db.idCtr;\n hydrate(this.schema, db.schema);\n function hydrate(proto, x) {\n if ((0, entity_1.isEntityCollection)(proto)) {\n proto.hydrateFrom(x);\n }\n if ((0, relationship_1.isRelationshipCollection)(proto)) {\n proto.hydrateFrom(x);\n }\n if (Array.isArray(x)) {\n x.forEach(hydrate);\n }\n if (!!proto && typeof proto === 'object' && !!x && typeof x === 'object') {\n for (const [k, v] of Object.entries(proto)) {\n hydrate(v, x[k]);\n }\n }\n }\n }\n}\nexports.Database = Database;\nfunction removeId(x) {\n const ret = { ...x };\n delete ret.$id;\n return ret;\n}\nfunction addOnlyMethod(xs, description) {\n return Object.defineProperties(xs, {\n only: {\n enumerable: false,\n value: () => {\n if (xs.length !== 1) {\n throw new Error(`Expected exactly 1 ${description}, found ${xs.length}`);\n }\n return xs[0];\n },\n },\n });\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0YWJhc2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvZGF0YWJhc2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEscUNBQXVHO0FBQ3ZHLGlEQU13QjtBQVN4QixNQUFhLFFBQVE7SUFDWixNQUFNLENBQUMsWUFBWSxDQUFvQixRQUFZO1FBQ3hELE9BQU8sSUFBSSxRQUFRLENBQUMsUUFBUSxFQUFFLCtCQUFnQixDQUFDLENBQUM7SUFDbEQsQ0FBQztJQUtELFlBQVksUUFBWSxFQUFFLGFBQWtEO1FBRnBFLFVBQUssR0FBRyxDQUFDLENBQUM7UUFHaEIsSUFBSSxDQUFDLE1BQU0sR0FBRztZQUNaLEdBQUcsUUFBUTtZQUNYLEdBQUcsYUFBYSxDQUFDO2dCQUNmLFlBQVksRUFBRSxDQUFDLE9BQU8sRUFBRSxLQUFLLEVBQUUsRUFBRSxDQUMvQixJQUFBLHFDQUFzQixFQUNwQixDQUFDLEVBQUUsRUFBRSxFQUFFLENBQUMsSUFBSSxDQUFDLEdBQUcsQ0FBQyxPQUFPLEVBQUUsRUFBRSxDQUFDLEVBQzdCLENBQUMsRUFBRSxFQUFFLEVBQUUsQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLEtBQUssRUFBRSxFQUFFLENBQUMsQ0FDNUI7YUFDSixDQUFDO1NBQ0gsQ0FBQztJQUNKLENBQUM7SUFFTSxFQUFFO1FBQ1AsT0FBTyxHQUFHLElBQUksQ0FBQyxLQUFLLEVBQUUsRUFBRSxDQUFDO0lBQzNCLENBQUM7SUFFRDs7T0FFRztJQUNJLFFBQVEsQ0FBcUIsR0FBTSxFQUFFLE1BQWdDO1FBQzFFLE9BQU8sSUFBSSxDQUFDLEtBQUssQ0FBQyxHQUFHLEVBQUUsSUFBSSxDQUFDLENBQUMsQ0FBQyxNQUFNLENBQUMsQ0FBQyxDQUFDO0lBQ3pDLENBQUM7SUFFRDs7T0FFRztJQUNJLEtBQUssQ0FBcUIsR0FBTSxFQUFFLE1BQXlCO1FBQ2hFLE1BQU0sSUFBSSxHQUEwQixJQUFJLENBQUMsTUFBTSxDQUFDLEdBQUcsQ0FBUSxDQUFDO1FBQzVELElBQUksQ0FBQyxHQUFHLENBQUMsTUFBTSxDQUFDLENBQUM7UUFDakIsT0FBTyxNQUFhLENBQUM7SUFDdkIsQ0FBQztJQUVEOztPQUVHO0lBQ0ksR0FBRyxDQUFxQixHQUFNLEVBQUUsRUFBeUM7UUFDOUUsTUFBTSxJQUFJLEdBQTBCLElBQUksQ0FBQyxNQUFNLENBQUMsR0FBRyxDQUFRLENBQUM7UUFDNUQsTUFBTSxHQUFHLEdBQUcsSUFBSSxDQUFDLFFBQVEsQ0FBQyxHQUFHLENBQUMsT0FBTyxFQUFFLEtBQUssUUFBUSxDQUFDLENBQUMsQ0FBQyxFQUFFLENBQUMsQ0FBQyxDQUFDLEVBQUUsQ0FBQyxJQUFJLENBQUMsQ0FBQztRQUNyRSxJQUFJLENBQUMsR0FBRyxFQUFFO1lBQ1IsTUFBTSxJQUFJLEtBQUssQ0FBQyxXQUFXLE1BQU0sQ0FBQyxHQUFHLENBQUMsS0FBSyxFQUFFLEVBQUUsQ0FBQyxDQUFDO1NBQ2xEO1FBQ0QsT0FBTyxHQUFHLENBQUM7SUFDYixDQUFDO0lBRUQ7O09BRUc7SUFDSSxHQUFHLENBQXFCLEdBQU07UUFDbkMsTUFBTSxJQUFJLEdBQTBCLElBQUksQ0FBQyxNQUFNLENBQUMsR0FBRyxDQUFRLENBQUM7UUFDNUQsT0FBTyxLQUFLLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxRQUFRLENBQUMsTUFBTSxFQUFFLENBQUMsQ0FBQztJQUM1QyxDQUFDO0lBRUQ7O09BRUc7SUFDSSxNQUFNLENBQ1gsR0FBTSxFQUNOLEtBQVEsRUFDUixNQUFvQyxFQUNwQyxLQUFxQztRQUVyQyxNQUFNLElBQUksR0FBMEIsSUFBSSxDQUFDLE1BQU0sQ0FBQyxHQUFHLENBQVEsQ0FBQztRQUM1RCxNQUFNLEdBQUcsR0FBSSxJQUFJLENBQUMsT0FBZSxDQUFDLEtBQUssQ0FBQyxDQUFDLE9BQU8sQ0FBQyxNQUFNLENBQUMsQ0FBQyxLQUFLLENBQUMsQ0FBQztRQUNoRSxPQUFPLGFBQWEsQ0FDbEIsR0FBRyxDQUFDLEdBQUcsQ0FBQyxDQUFDLEVBQVUsRUFBRSxFQUFFLENBQUMsSUFBSSxDQUFDLFFBQVEsQ0FBQyxHQUFHLENBQUMsRUFBRSxDQUFDLENBQUMsRUFDOUMsR0FBRyxNQUFNLENBQUMsR0FBRyxDQUFDLFNBQVMsTUFBTSxDQUFDLEtBQUssQ0FBQyxJQUFJLE1BQU0sQ0FBQyxNQUFNLENBQUMsSUFBSSxJQUFJLENBQUMsU0FBUyxDQUFDLEtBQUssQ0FBQyxFQUFFLENBQ2xGLENBQUM7SUFDSixDQUFDO0lBRUQ7O09BRUc7SUFDSSxjQUFjLENBQ25CLEdBQU0sRUFDTixLQUFRLEVBQ1IsTUFBb0MsRUFDcEMsTUFBZ0M7UUFFaEMsTUFBTSxHQUFHLEdBQUcsSUFBSSxDQUFDLE1BQU0sQ0FBQyxHQUFHLEVBQUUsS0FBSyxFQUFFLE1BQU0sRUFBRSxNQUFNLENBQUMsS0FBSyxDQUFDLENBQUMsQ0FBQztRQUMzRCxJQUFJLEdBQUcsQ0FBQyxNQUFNLEVBQUU7WUFDZCxPQUFPLEdBQUcsQ0FBQyxJQUFJLEVBQUUsQ0FBQztTQUNuQjtRQUNELE9BQU8sSUFBSSxDQUFDLFFBQVEsQ0FBQyxHQUFHLEVBQUUsTUFBTSxDQUFDLENBQUM7SUFDcEMsQ0FBQztJQWNNLElBQUksQ0FDVCxHQUFNLEVBQ04sSUFBNEIsRUFDNUIsRUFBd0IsRUFDeEIsVUFBbUM7UUFFbkMsTUFBTSxHQUFHLEdBQWdDLElBQUksQ0FBQyxNQUFNLENBQUMsR0FBRyxDQUFRLENBQUM7UUFDakUsR0FBRyxDQUFDLEdBQUcsQ0FBQyxJQUFJLEVBQUUsRUFBRSxFQUFFLFVBQVUsQ0FBQyxDQUFDO0lBQ2hDLENBQUM7SUFFRDs7T0FFRztJQUNJLE1BQU0sQ0FDWCxHQUFNLEVBQ04sSUFBNEI7O1FBRTVCLE1BQU0sR0FBRyxHQUFnQyxJQUFJLENBQUMsTUFBTSxDQUFDLEdBQUcsQ0FBUSxDQUFDO1FBQ2pFLE1BQU0sT0FBTyxHQUFHLE1BQUEsR0FBRyxDQUFDLE9BQU8sQ0FBQyxHQUFHLENBQUMsSUFBSSxDQUFDLEdBQUcsQ0FBQyxtQ0FBSSxFQUFFLENBQUM7UUFDaEQsTUFBTSxHQUFHLEdBQUcsT0FBTyxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUMsRUFBRSxFQUFFLENBQUMsQ0FBQyxFQUFFLE1BQU0sRUFBRSxHQUFHLENBQUMsTUFBTSxDQUFDLENBQUMsQ0FBQyxHQUFHLENBQUMsRUFBRSxHQUFHLFFBQVEsQ0FBQyxDQUFDLENBQUMsRUFBVSxDQUFBLENBQUMsQ0FBQztRQUV2RixPQUFPLGFBQWEsQ0FBQyxHQUFHLEVBQUUsR0FBRyxNQUFNLENBQUMsR0FBRyxDQUFDLFNBQVMsSUFBSSxFQUFFLENBQUMsQ0FBQztJQUMzRCxDQUFDO0lBRUQ7O09BRUc7SUFDSSxRQUFRLENBQ2IsR0FBTSxFQUNOLEVBQXdCOztRQUV4QixNQUFNLEdBQUcsR0FBZ0MsSUFBSSxDQUFDLE1BQU0sQ0FBQyxHQUFHLENBQVEsQ0FBQztRQUNqRSxNQUFNLE9BQU8sR0FBRyxNQUFBLEdBQUcsQ0FBQyxRQUFRLENBQUMsR0FBRyxDQUFDLEVBQUUsQ0FBQyxHQUFHLENBQUMsbUNBQUksRUFBRSxDQUFDO1FBQy9DLE1BQU0sR0FBRyxHQUFHLE9BQU8sQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDLEVBQUUsRUFBRSxDQUFDLENBQUMsRUFBRSxNQUFNLEVBQUUsR0FBRyxDQUFDLFFBQVEsQ0FBQyxDQUFDLENBQUMsR0FBRyxDQUFDLEVBQUUsR0FBRyxRQUFRLENBQUMsQ0FBQyxDQUFDLEVBQVUsQ0FBQSxDQUFDLENBQUM7UUFFekYsT0FBTyxhQUFhLENBQUMsR0FBRyxFQUFFLEdBQUcsTUFBTSxDQUFDLEdBQUcsQ0FBQyxPQUFPLEVBQUUsRUFBRSxDQUFDLENBQUM7SUFDdkQsQ0FBQztJQUVNLENBQUMsQ0FBbUIsTUFBZ0I7UUFDekMsT0FBTztZQUNMLEdBQUcsRUFBRSxJQUFJLENBQUMsRUFBRSxFQUFFO1lBQ2QsR0FBRyxNQUFNO1NBQ0gsQ0FBQztJQUNYLENBQUM7SUFFRDs7T0FFRztJQUNJLElBQUk7UUFDVCxPQUFPO1lBQ0wsS0FBSyxFQUFFLElBQUksQ0FBQyxLQUFLO1lBQ2pCLE1BQU0sRUFBRSxTQUFTLENBQUMsSUFBSSxDQUFDLE1BQU0sQ0FBQztTQUMvQixDQUFDO1FBRUYsU0FBUyxTQUFTLENBQUMsQ0FBVTtZQUMzQixJQUFJLElBQUEsMkJBQWtCLEVBQUMsQ0FBQyxDQUFDLEVBQUU7Z0JBQ3pCLE9BQU8sQ0FBQyxDQUFDLFNBQVMsRUFBRSxDQUFDO2FBQ3RCO1lBQ0QsSUFBSSxJQUFBLHVDQUF3QixFQUFDLENBQUMsQ0FBQyxFQUFFO2dCQUMvQixPQUFPLENBQUMsQ0FBQyxTQUFTLEVBQUUsQ0FBQzthQUN0QjtZQUNELElBQUksS0FBSyxDQUFDLE9BQU8sQ0FBQyxDQUFDLENBQUMsRUFBRTtnQkFDcEIsT0FBTyxDQUFDLENBQUMsR0FBRyxDQUFDLFNBQVMsQ0FBQyxDQUFDO2FBQ3pCO1lBQ0QsSUFBSSxDQUFDLENBQUMsQ0FBQyxJQUFJLE9BQU8sQ0FBQyxLQUFLLFFBQVEsRUFBRTtnQkFDaEMsT0FBTyxNQUFNLENBQUMsV0FBVyxDQUFDLE1BQU0sQ0FBQyxPQUFPLENBQUMsQ0FBQyxDQUFDLENBQUMsR0FBRyxDQUFDLENBQUMsQ0FBQyxDQUFDLEVBQUUsQ0FBQyxDQUFDLEVBQUUsRUFBRSxDQUFDLENBQUMsQ0FBQyxFQUFFLFNBQVMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQzthQUNqRjtZQUNELE9BQU8sQ0FBQyxDQUFDO1FBQ1gsQ0FBQztJQUNILENBQUM7SUFFTSxJQUFJLENBQUMsRUFBc0I7UUFDaEMsSUFBSSxDQUFDLEtBQUssR0FBRyxFQUFFLENBQUMsS0FBSyxDQUFDO1FBQ3RCLE9BQU8sQ0FBQyxJQUFJLENBQUMsTUFBTSxFQUFFLEVBQUUsQ0FBQyxNQUFNLENBQUMsQ0FBQztRQUVoQyxTQUFTLE9BQU8sQ0FBQyxLQUFjLEVBQUUsQ0FBVTtZQUN6QyxJQUFJLElBQUEsMkJBQWtCLEVBQUMsS0FBSyxDQUFDLEVBQUU7Z0JBQzdCLEtBQUssQ0FBQyxXQUFXLENBQUMsQ0FBQyxDQUFDLENBQUM7YUFDdEI7WUFDRCxJQUFJLElBQUEsdUNBQXdCLEVBQUMsS0FBSyxDQUFDLEVBQUU7Z0JBQ25DLEtBQUssQ0FBQyxXQUFXLENBQUMsQ0FBQyxDQUFDLENBQUM7YUFDdEI7WUFDRCxJQUFJLEtBQUssQ0FBQyxPQUFPLENBQUMsQ0FBQyxDQUFDLEVBQUU7Z0JBQ3BCLENBQUMsQ0FBQyxPQUFPLENBQUMsT0FBTyxDQUFDLENBQUM7YUFDcEI7WUFDRCxJQUFJLENBQUMsQ0FBQyxLQUFLLElBQUksT0FBTyxLQUFLLEtBQUssUUFBUSxJQUFJLENBQUMsQ0FBQyxDQUFDLElBQUksT0FBTyxDQUFDLEtBQUssUUFBUSxFQUFFO2dCQUN4RSxLQUFLLE1BQU0sQ0FBQyxDQUFDLEVBQUUsQ0FBQyxDQUFDLElBQUksTUFBTSxDQUFDLE9BQU8sQ0FBQyxLQUFLLENBQUMsRUFBRTtvQkFDMUMsT0FBTyxDQUFDLENBQUMsRUFBRyxDQUFTLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQztpQkFDM0I7YUFDRjtRQUNILENBQUM7SUFDSCxDQUFDO0NBQ0Y7QUF0TUQsNEJBc01DO0FBT0QsU0FBUyxRQUFRLENBQW1CLENBQUk7SUFDdEMsTUFBTSxHQUFHLEdBQUcsRUFBRSxHQUFHLENBQUMsRUFBRSxDQUFDO0lBQ3JCLE9BQVEsR0FBVyxDQUFDLEdBQUcsQ0FBQztJQUN4QixPQUFPLEdBQUcsQ0FBQztBQUNiLENBQUM7QUFzQ0QsU0FBUyxhQUFhLENBQUksRUFBTyxFQUFFLFdBQW1CO0lBQ3BELE9BQU8sTUFBTSxDQUFDLGdCQUFnQixDQUFDLEVBQUUsRUFBRTtRQUNqQyxJQUFJLEVBQUU7WUFDSixVQUFVLEVBQUUsS0FBSztZQUNqQixLQUFLLEVBQUUsR0FBRyxFQUFFO2dCQUNWLElBQUksRUFBRSxDQUFDLE1BQU0sS0FBSyxDQUFDLEVBQUU7b0JBQ25CLE1BQU0sSUFBSSxLQUFLLENBQUMsc0JBQXNCLFdBQVcsV0FBVyxFQUFFLENBQUMsTUFBTSxFQUFFLENBQUMsQ0FBQztpQkFDMUU7Z0JBQ0QsT0FBTyxFQUFFLENBQUMsQ0FBQyxDQUFDLENBQUM7WUFDZixDQUFDO1NBQ0Y7S0FDRixDQUFRLENBQUM7QUFDWixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgRW50aXR5LCBFbnRpdHlDb2xsZWN0aW9uLCBFbnRpdHlJbmRleCwgaXNFbnRpdHlDb2xsZWN0aW9uLCBQbGFpbiwgUmVmZXJlbmNlIH0gZnJvbSAnLi9lbnRpdHknO1xuaW1wb3J0IHtcbiAgaXNSZWxhdGlvbnNoaXBDb2xsZWN0aW9uLFxuICBOT19SRUxBVElPTlNISVBTLFxuICBSZWxhdGlvbnNoaXAsXG4gIHJlbGF0aW9uc2hpcENvbGxlY3Rpb24sXG4gIFJlbGF0aW9uc2hpcENvbGxlY3Rpb24sXG59IGZyb20gJy4vcmVsYXRpb25zaGlwJztcblxuZXhwb3J0IGludGVyZmFjZSBSZWxhdGlvbnNoaXBzQnVpbGRlcjxFUyBleHRlbmRzIG9iamVjdD4ge1xuICByZWxhdGlvbnNoaXA8UiBleHRlbmRzIFJlbGF0aW9uc2hpcDxhbnksIGFueSwgYW55Pj4oXG4gICAgZnJvbUtleTogS2V5c0ZvcjxFUywgRW50aXR5Q29sbGVjdGlvbjxSWydmcm9tJ10sIGFueT4+LFxuICAgIHRvS2V5OiBLZXlzRm9yPEVTLCBFbnRpdHlDb2xsZWN0aW9uPFJbJ3RvJ10sIGFueT4+LFxuICApOiBSZWxhdGlvbnNoaXBDb2xsZWN0aW9uPFI+O1xufVxuXG5leHBvcnQgY2xhc3MgRGF0YWJhc2U8RVMgZXh0ZW5kcyBvYmplY3QsIFJTIGV4dGVuZHMgb2JqZWN0PiB7XG4gIHB1YmxpYyBzdGF0aWMgZW50aXRpZXNPbmx5PEVTIGV4dGVuZHMgb2JqZWN0PihlbnRpdGllczogRVMpOiBEYXRhYmFzZTxFUywge30+IHtcbiAgICByZXR1cm4gbmV3IERhdGFiYXNlKGVudGl0aWVzLCBOT19SRUxBVElPTlNISVBTKTtcbiAgfVxuXG4gIHByaXZhdGUgcmVhZG9ubHkgc2NoZW1hOiBFUyAmIFJTO1xuICBwcml2YXRlIGlkQ3RyID0gMDtcblxuICBjb25zdHJ1Y3RvcihlbnRpdGllczogRVMsIHJlbGF0aW9uc2hpcHM6ICh4OiBSZWxhdGlvbnNoaXBzQnVpbGRlcjxFUz4pID0+IFJTKSB7XG4gICAgdGhpcy5zY2hlbWEgPSB7XG4gICAgICAuLi5lbnRpdGllcyxcbiAgICAgIC4uLnJlbGF0aW9uc2hpcHMoe1xuICAgICAgICByZWxhdGlvbnNoaXA6IChmcm9tS2V5LCB0b0tleSkgPT5cbiAgICAgICAgICByZWxhdGlvbnNoaXBDb2xsZWN0aW9uKFxuICAgICAgICAgICAgKGlkKSA9PiB0aGlzLmdldChmcm9tS2V5LCBpZCksXG4gICAgICAgICAgICAoaWQpID0+IHRoaXMuZ2V0KHRvS2V5LCBpZCksXG4gICAgICAgICAgKSxcbiAgICAgIH0pLFxuICAgIH07XG4gIH1cblxuICBwdWJsaWMgaWQoKSB7XG4gICAgcmV0dXJuIGAke3RoaXMuaWRDdHIrK31gO1xuICB9XG5cbiAgLyoqXG4gICAqIEFsbG9jYXRlIGFuIElEIGFuZCBzdG9yZVxuICAgKi9cbiAgcHVibGljIGFsbG9jYXRlPEsgZXh0ZW5kcyBrZXlvZiBFUz4oa2V5OiBLLCBlbnRpdHk6IFBsYWluPEVudGl0eVR5cGU8RVNbS10+Pik6IEVudGl0eVR5cGU8RVNbS10+IHtcbiAgICByZXR1cm4gdGhpcy5zdG9yZShrZXksIHRoaXMuZShlbnRpdHkpKTtcbiAgfVxuXG4gIC8qKlxuICAgKiBTdG9yZSB3aXRoIGEgcHJlYWxsb2NhdGVkIElEXG4gICAqL1xuICBwdWJsaWMgc3RvcmU8SyBleHRlbmRzIGtleW9mIEVTPihrZXk6IEssIGVudGl0eTogRW50aXR5VHlwZTxFU1tLXT4pOiBFbnRpdHlUeXBlPEVTW0tdPiB7XG4gICAgY29uc3QgY29sbDogRW50aXR5Q29sbGVjdGlvbjxhbnk+ID0gdGhpcy5zY2hlbWFba2V5XSBhcyBhbnk7XG4gICAgY29sbC5hZGQoZW50aXR5KTtcbiAgICByZXR1cm4gZW50aXR5IGFzIGFueTtcbiAgfVxuXG4gIC8qKlxuICAgKiBHZXQgYW4gZW50aXR5IGJ5IGtleVxuICAgKi9cbiAgcHVibGljIGdldDxLIGV4dGVuZHMga2V5b2YgRVM+KGtleTogSywgaWQ6IHN0cmluZyB8IFJlZmVyZW5jZTxFbnRpdHlUeXBlPEVTW0tdPj4pOiBFbnRpdHlUeXBlPEVTW0tdPiB7XG4gICAgY29uc3QgY29sbDogRW50aXR5Q29sbGVjdGlvbjxhbnk+ID0gdGhpcy5zY2hlbWFba2V5XSBhcyBhbnk7XG4gICAgY29uc3QgcmV0ID0gY29sbC5lbnRpdGllcy5nZXQodHlwZW9mIGlkID09PSAnc3RyaW5nJyA/IGlkIDogaWQuJHJlZik7XG4gICAgaWYgKCFyZXQpIHtcbiAgICAgIHRocm93IG5ldyBFcnJvcihgTm8gc3VjaCAke1N0cmluZyhrZXkpfTogJHtpZH1gKTtcbiAgICB9XG4gICAgcmV0dXJuIHJldDtcbiAgfVxuXG4gIC8qKlxuICAgKiBBbGwgZW50aXRpZXMgb2YgYSBnaXZlbiB0eXBlXG4gICAqL1xuICBwdWJsaWMgYWxsPEsgZXh0ZW5kcyBrZXlvZiBFUz4oa2V5OiBLKTogQXJyYXk8RW50aXR5VHlwZTxFU1tLXT4+IHtcbiAgICBjb25zdCBjb2xsOiBFbnRpdHlDb2xsZWN0aW9uPGFueT4gPSB0aGlzLnNjaGVtYVtrZXldIGFzIGFueTtcbiAgICByZXR1cm4gQXJyYXkuZnJvbShjb2xsLmVudGl0aWVzLnZhbHVlcygpKTtcbiAgfVxuXG4gIC8qKlxuICAgKiBMb29rdXAgYW4gZW50aXR5IGJ5IGluZGV4XG4gICAqL1xuICBwdWJsaWMgbG9va3VwPEsgZXh0ZW5kcyBrZXlvZiBFUywgSSBleHRlbmRzIEluZGV4TmFtZXNPZjxFU1tLXT4+KFxuICAgIGtleTogSyxcbiAgICBpbmRleDogSSxcbiAgICBsb29rdXA6IEluZGV4T2Y8RVNbS10sIEk+Wydsb29rdXBzJ10sXG4gICAgdmFsdWU6IEluZGV4T2Y8RVNbS10sIEk+Wyd2YWx1ZVR5cGUnXSxcbiAgKTogUmljaFJlYWRvbmx5QXJyYXk8RW50aXR5VHlwZTxFU1tLXT4+IHtcbiAgICBjb25zdCBjb2xsOiBFbnRpdHlDb2xsZWN0aW9uPGFueT4gPSB0aGlzLnNjaGVtYVtrZXldIGFzIGFueTtcbiAgICBjb25zdCBpZHMgPSAoY29sbC5pbmRleGVzIGFzIGFueSlbaW5kZXhdLmxvb2t1cHNbbG9va3VwXSh2YWx1ZSk7XG4gICAgcmV0dXJuIGFkZE9ubHlNZXRob2QoXG4gICAgICBpZHMubWFwKChpZDogc3RyaW5nKSA9PiBjb2xsLmVudGl0aWVzLmdldChpZCkpLFxuICAgICAgYCR7U3RyaW5nKGtleSl9IHdpdGggJHtTdHJpbmcoaW5kZXgpfSAke1N0cmluZyhsb29rdXApfSAke0pTT04uc3RyaW5naWZ5KHZhbHVlKX1gLFxuICAgICk7XG4gIH1cblxuICAvKipcbiAgICogQWxsb2NhdGUgYW4gSUQgYW5kIHN0b3JlIGlmIHRoZSBlbnRpdHkgZG9lcyBub3QgeWV0IGV4aXN0XG4gICAqL1xuICBwdWJsaWMgZmluZE9yQWxsb2NhdGU8SyBleHRlbmRzIGtleW9mIEVTLCBJIGV4dGVuZHMga2V5b2YgUGxhaW48RW50aXR5VHlwZTxFU1tLXT4+ICYgSW5kZXhOYW1lc09mPEVTW0tdPj4oXG4gICAga2V5OiBLLFxuICAgIGluZGV4OiBJLFxuICAgIGxvb2t1cDogSW5kZXhPZjxFU1tLXSwgST5bJ2xvb2t1cHMnXSxcbiAgICBlbnRpdHk6IFBsYWluPEVudGl0eVR5cGU8RVNbS10+PixcbiAgKTogRW50aXR5VHlwZTxFU1tLXT4ge1xuICAgIGNvbnN0IHJlcyA9IHRoaXMubG9va3VwKGtleSwgaW5kZXgsIGxvb2t1cCwgZW50aXR5W2luZGV4XSk7XG4gICAgaWYgKHJlcy5sZW5ndGgpIHtcbiAgICAgIHJldHVybiByZXMub25seSgpO1xuICAgIH1cbiAgICByZXR1cm4gdGhpcy5hbGxvY2F0ZShrZXksIGVudGl0eSk7XG4gIH1cblxuICAvKipcbiAgICogUmVjb3JkIGEgcmVsYXRpb25zaGlwIGJldHdlZW4gdHdvIGVudGl0aWVzXG4gICAqXG4gICAqIE92ZXJsb2FkIHRvIGFjY291bnQgZm9yIHdoZXRoZXIgd2UgaGF2ZSBhdHRyaWJ1dGVzIG9yIG5vdC5cbiAgICovXG4gIHB1YmxpYyBsaW5rPEsgZXh0ZW5kcyBSZWxXQXR0cnM8UlM+PihcbiAgICBrZXk6IEssXG4gICAgZnJvbTogUmVsVHlwZTxSU1tLXT5bJ2Zyb20nXSxcbiAgICB0bzogUmVsVHlwZTxSU1tLXT5bJ3RvJ10sXG4gICAgYXR0cmlidXRlczogUmVsVHlwZTxSU1tLXT5bJ2F0dHInXSxcbiAgKTogdm9pZDtcbiAgcHVibGljIGxpbms8SyBleHRlbmRzIFJlbFdvQXR0cnM8UlM+PihrZXk6IEssIGZyb206IFJlbFR5cGU8UlNbS10+Wydmcm9tJ10sIHRvOiBSZWxUeXBlPFJTW0tdPlsndG8nXSk6IHZvaWQ7XG4gIHB1YmxpYyBsaW5rPEsgZXh0ZW5kcyBrZXlvZiBSUz4oXG4gICAga2V5OiBLLFxuICAgIGZyb206IFJlbFR5cGU8UlNbS10+Wydmcm9tJ10sXG4gICAgdG86IFJlbFR5cGU8UlNbS10+Wyd0byddLFxuICAgIGF0dHJpYnV0ZXM/OiBSZWxUeXBlPFJTW0tdPlsnYXR0ciddLFxuICApIHtcbiAgICBjb25zdCBjb2w6IFJlbGF0aW9uc2hpcENvbGxlY3Rpb248YW55PiA9IHRoaXMuc2NoZW1hW2tleV0gYXMgYW55O1xuICAgIGNvbC5hZGQoZnJvbSwgdG8sIGF0dHJpYnV0ZXMpO1xuICB9XG5cbiAgLyoqXG4gICAqIEZvbGxvdyBhIGxpbmtcbiAgICovXG4gIHB1YmxpYyBmb2xsb3c8SyBleHRlbmRzIGtleW9mIFJTPihcbiAgICBrZXk6IEssXG4gICAgZnJvbTogUmVsVHlwZTxSU1tLXT5bJ2Zyb20nXSxcbiAgKTogUmljaFJlYWRvbmx5QXJyYXk8TGluazxSZWxUeXBlPFJTW0tdPlsndG8nXSwgUmVsVHlwZTxSU1tLXT5bJ2F0dHInXT4+IHtcbiAgICBjb25zdCBjb2w6IFJlbGF0aW9uc2hpcENvbGxlY3Rpb248YW55PiA9IHRoaXMuc2NoZW1hW2tleV0gYXMgYW55O1xuICAgIGNvbnN0IHRvTGlua3MgPSBjb2wuZm9yd2FyZC5nZXQoZnJvbS4kaWQpID8/IFtdO1xuICAgIGNvbnN0IHJldCA9IHRvTGlua3MubWFwKChpKSA9PiAoeyBlbnRpdHk6IGNvbC50b0NvbGwoaS4kaWQpLCAuLi5yZW1vdmVJZChpKSB9IGFzIGFueSkpO1xuXG4gICAgcmV0dXJuIGFkZE9ubHlNZXRob2QocmV0LCBgJHtTdHJpbmcoa2V5KX0gZnJvbSAke2Zyb219YCk7XG4gIH1cblxuICAvKipcbiAgICogRm9sbG93IGluY29taW5nIGxpbmtzIGJhY2t3YXJkc1xuICAgKi9cbiAgcHVibGljIGluY29taW5nPEsgZXh0ZW5kcyBrZXlvZiBSUz4oXG4gICAga2V5OiBLLFxuICAgIHRvOiBSZWxUeXBlPFJTW0tdPlsndG8nXSxcbiAgKTogUmljaFJlYWRvbmx5QXJyYXk8TGluazxSZWxUeXBlPFJTW0tdPlsnZnJvbSddLCBSZWxUeXBlPFJTW0tdPlsnYXR0ciddPj4ge1xuICAgIGNvbnN0IGNvbDogUmVsYXRpb25zaGlwQ29sbGVjdGlvbjxhbnk+ID0gdGhpcy5zY2hlbWFba2V5XSBhcyBhbnk7XG4gICAgY29uc3QgZnJvbUlkcyA9IGNvbC5iYWNrd2FyZC5nZXQodG8uJGlkKSA/PyBbXTtcbiAgICBjb25zdCByZXQgPSBmcm9tSWRzLm1hcCgoaSkgPT4gKHsgZW50aXR5OiBjb2wuZnJvbUNvbGwoaS4kaWQpLCAuLi5yZW1vdmVJZChpKSB9IGFzIGFueSkpO1xuXG4gICAgcmV0dXJuIGFkZE9ubHlNZXRob2QocmV0LCBgJHtTdHJpbmcoa2V5KX0gdG8gJHt0b31gKTtcbiAgfVxuXG4gIHB1YmxpYyBlPEUgZXh0ZW5kcyBFbnRpdHk+KGVudGl0eTogUGxhaW48RT4pOiBFIHtcbiAgICByZXR1cm4ge1xuICAgICAgJGlkOiB0aGlzLmlkKCksXG4gICAgICAuLi5lbnRpdHksXG4gICAgfSBhcyBhbnk7XG4gIH1cblxuICAvKipcbiAgICogVHVybiB0aGUgY3VycmVudCBkYXRhYmFzZSBjb2xsZWN0aW9uIGludG8gc29tZXRoaW5nIHRoYXQgY2FuIGJlIHN0b3JlZC5cbiAgICovXG4gIHB1YmxpYyBzYXZlKCk6IERlaHlkcmF0ZWREYXRhYmFzZSB7XG4gICAgcmV0dXJuIHtcbiAgICAgIGlkQ3RyOiB0aGlzLmlkQ3RyLFxuICAgICAgc2NoZW1hOiBkZWh5ZHJhdGUodGhpcy5zY2hlbWEpLFxuICAgIH07XG5cbiAgICBmdW5jdGlvbiBkZWh5ZHJhdGUoeDogdW5rbm93bik6IGFueSB7XG4gICAgICBpZiAoaXNFbnRpdHlDb2xsZWN0aW9uKHgpKSB7XG4gICAgICAgIHJldHVybiB4LmRlaHlkcmF0ZSgpO1xuICAgICAgfVxuICAgICAgaWYgKGlzUmVsYXRpb25zaGlwQ29sbGVjdGlvbih4KSkge1xuICAgICAgICByZXR1cm4geC5kZWh5ZHJhdGUoKTtcbiAgICAgIH1cbiAgICAgIGlmIChBcnJheS5pc0FycmF5KHgpKSB7XG4gICAgICAgIHJldHVybiB4Lm1hcChkZWh5ZHJhdGUpO1xuICAgICAgfVxuICAgICAgaWYgKCEheCAmJiB0eXBlb2YgeCA9PT0gJ29iamVjdCcpIHtcbiAgICAgICAgcmV0dXJuIE9iamVjdC5mcm9tRW50cmllcyhPYmplY3QuZW50cmllcyh4KS5tYXAoKFtrLCB2XSkgPT4gW2ssIGRlaHlkcmF0ZSh2KV0pKTtcbiAgICAgIH1cbiAgICAgIHJldHVybiB4O1xuICAgIH1cbiAgfVxuXG4gIHB1YmxpYyBsb2FkKGRiOiBEZWh5ZHJhdGVkRGF0YWJhc2UpIHtcbiAgICB0aGlzLmlkQ3RyID0gZGIuaWRDdHI7XG4gICAgaHlkcmF0ZSh0aGlzLnNjaGVtYSwgZGIuc2NoZW1hKTtcblxuICAgIGZ1bmN0aW9uIGh5ZHJhdGUocHJvdG86IHVua25vd24sIHg6IHVua25vd24pOiB2b2lkIHtcbiAgICAgIGlmIChpc0VudGl0eUNvbGxlY3Rpb24ocHJvdG8pKSB7XG4gICAgICAgIHByb3RvLmh5ZHJhdGVGcm9tKHgpO1xuICAgICAgfVxuICAgICAgaWYgKGlzUmVsYXRpb25zaGlwQ29sbGVjdGlvbihwcm90bykpIHtcbiAgICAgICAgcHJvdG8uaHlkcmF0ZUZyb20oeCk7XG4gICAgICB9XG4gICAgICBpZiAoQXJyYXkuaXNBcnJheSh4KSkge1xuICAgICAgICB4LmZvckVhY2goaHlkcmF0ZSk7XG4gICAgICB9XG4gICAgICBpZiAoISFwcm90byAmJiB0eXBlb2YgcHJvdG8gPT09ICdvYmplY3QnICYmICEheCAmJiB0eXBlb2YgeCA9PT0gJ29iamVjdCcpIHtcbiAgICAgICAgZm9yIChjb25zdCBbaywgdl0gb2YgT2JqZWN0LmVudHJpZXMocHJvdG8pKSB7XG4gICAgICAgICAgaHlkcmF0ZSh2LCAoeCBhcyBhbnkpW2tdKTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cbiAgfVxufVxuXG5pbnRlcmZhY2UgRGVoeWRyYXRlZERhdGFiYXNlIHtcbiAgcmVhZG9ubHkgaWRDdHI6IG51bWJlcjtcbiAgcmVhZG9ubHkgc2NoZW1hOiBhbnk7XG59XG5cbmZ1bmN0aW9uIHJlbW92ZUlkPEEgZXh0ZW5kcyBvYmplY3Q+KHg6IEEpOiBPbWl0PEEsICckaWQnPiB7XG4gIGNvbnN0IHJldCA9IHsgLi4ueCB9O1xuICBkZWxldGUgKHJldCBhcyBhbnkpLiRpZDtcbiAgcmV0dXJuIHJldDtcbn1cblxuZXhwb3J0IHR5cGUgTGluazxFLCBBPiA9IHsgcmVhZG9ubHkgZW50aXR5OiBFIH0gJiBBO1xuXG50eXBlIFJlbFdBdHRyczxSUz4gPSB7IFtLIGluIGtleW9mIFJTXToge30gZXh0ZW5kcyBSZWxUeXBlPFJTW0tdPlsnYXR0ciddID8gbmV2ZXIgOiBLIH1ba2V5b2YgUlNdO1xudHlwZSBSZWxXb0F0dHJzPFJTPiA9IHsgW0sgaW4ga2V5b2YgUlNdOiB7fSBleHRlbmRzIFJlbFR5cGU8UlNbS10+WydhdHRyJ10gPyBLIDogbmV2ZXIgfVtrZXlvZiBSU107XG5cbi8vIE5lY2Vzc2FyeSBiZWNhdXNlIHRoaXMgdHlwZSBtaWdodCBiZSBhIHVuaW9uXG50eXBlIEluZGV4TmFtZXNPZjxBPiA9IEEgZXh0ZW5kcyBFbnRpdHlDb2xsZWN0aW9uPGFueT4gPyBLZXlzT2ZVbmlvbjxBWydpbmRleGVzJ10+IDogbmV2ZXI7XG5cbi8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBwcmV0dGllci9wcmV0dGllclxudHlwZSBJbmRleE9mPEVDLCBJIGV4dGVuZHMgSW5kZXhOYW1lc09mPEVDPj4gPVxuICBFQyBleHRlbmRzIEVudGl0eUNvbGxlY3Rpb248YW55PlxuICA/IEVDWydpbmRleGVzJ11bSV0gZXh0ZW5kcyBFbnRpdHlJbmRleDxhbnksIGluZmVyIEluZGV4VHlwZT5cbiAgICA/IHtcbiAgICAgICAgdmFsdWVUeXBlOiBJbmRleFR5cGU7XG4gICAgICAgIGxvb2t1cHM6IGtleW9mIEVDWydpbmRleGVzJ11bSV1bJ2xvb2t1cHMnXTtcbiAgICAgIH1cbiAgICA6IG5ldmVyXG4gIDogbmV2ZXI7XG5cbnR5cGUgRW50aXR5VHlwZTxBPiA9IEEgZXh0ZW5kcyBFbnRpdHlDb2xsZWN0aW9uPGluZmVyIEI+ID8gQiA6IG5ldmVyO1xuXG50eXBlIFJlbFR5cGU8QT4gPSBBIGV4dGVuZHMgUmVsYXRpb25zaGlwQ29sbGVjdGlvbjxpbmZlciBSPiA/IFIgOiBuZXZlcjtcblxudHlwZSBSZXNvbHZlVW5pb248VD4gPSBUIGV4dGVuZHMgVCA/IFQgOiBuZXZlcjtcblxudHlwZSBLZXlzT2ZVbmlvbjxUPiA9IGtleW9mIFJlc29sdmVVbmlvbjxUPjtcblxuZXhwb3J0IHR5cGUgRW50aXRpZXNPZjxEQj4gPSBEQiBleHRlbmRzIERhdGFiYXNlPGluZmVyIEVTLCBhbnk+ID8geyBbayBpbiBrZXlvZiBFU106IEVudGl0eVR5cGU8RVNba10+IH0gOiB7fTtcblxuZXhwb3J0IGludGVyZmFjZSBSaWNoUmVhZG9ubHlBcnJheTxBPiBleHRlbmRzIFJlYWRvbmx5QXJyYXk8QT4ge1xuICAvKipcbiAgICogUmV0dXJuIHRoZSBmaXJzdCBhbmQgb25seSBlbGVtZW50LCB0aHJvd2luZyBpZiB0aGVyZSBhcmUgIT0gMSBlbGVtZW50c1xuICAgKi9cbiAgb25seSgpOiBBO1xufVxuXG5mdW5jdGlvbiBhZGRPbmx5TWV0aG9kPEE+KHhzOiBBW10sIGRlc2NyaXB0aW9uOiBzdHJpbmcpOiBSaWNoUmVhZG9ubHlBcnJheTxBPiB7XG4gIHJldHVybiBPYmplY3QuZGVmaW5lUHJvcGVydGllcyh4cywge1xuICAgIG9ubHk6IHtcbiAgICAgIGVudW1lcmFibGU6IGZhbHNlLFxuICAgICAgdmFsdWU6ICgpID0+IHtcbiAgICAgICAgaWYgKHhzLmxlbmd0aCAhPT0gMSkge1xuICAgICAgICAgIHRocm93IG5ldyBFcnJvcihgRXhwZWN0ZWQgZXhhY3RseSAxICR7ZGVzY3JpcHRpb259LCBmb3VuZCAke3hzLmxlbmd0aH1gKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4geHNbMF07XG4gICAgICB9LFxuICAgIH0sXG4gIH0pIGFzIGFueTtcbn1cblxuLyoqXG4gKiBSZXR1cm4gdGhlIGtleXMgb2YgYW4gb2JqZWN0IHRoYXQgbWFwIHRvIGEgcGFydGljdWxhciB0eXBlXG4gKi9cbnR5cGUgS2V5c0ZvcjxPIGV4dGVuZHMgb2JqZWN0LCBUPiA9IHsgW2sgaW4ga2V5b2YgT106IE9ba10gZXh0ZW5kcyBUID8gayA6IG5ldmVyIH1ba2V5b2YgT107XG4iXX0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.optionalCmp = exports.numberCmp = exports.stringCmp = exports.ref = exports.isEntityCollection = exports.calculatedIndex = exports.fieldIndex = exports.entityCollection = void 0;\nconst sorted_map_1 = require(\"./sorted-map\");\nfunction entityCollection() {\n const entities = new Map();\n const _indexes = {};\n function add(x) {\n entities.set(x.$id, x);\n for (const index of Object.values(_indexes)) {\n // FIXME: why can't we type this?\n index.add(x);\n }\n }\n return {\n type: 'entities',\n entities,\n indexes: _indexes,\n add,\n dehydrate: () => ({\n type: 'entities',\n entities: Array.from(validatePlainObjects(entities).values()),\n }),\n hydrateFrom: (x) => {\n entities.clear();\n for (const e of Object.values(x.entities)) {\n add(e);\n }\n },\n index(indexes) {\n // This limitation exists purely because I couldn't type it otherwise.\n // Declaring a return type of `EntityCollection` would make a lot\n // of our other type inspection code stop working (the union is hard to pick\n // apart). Since adding indexes in multiple goes is not really a use case,\n // the simpler solution is just to type it as if we replaced all indexes\n // and add a runtime check to make sure the types aren't lying.\n if (Object.keys(_indexes).length > 0) {\n throw new Error('You may only call .index() once on a new collection');\n }\n Object.assign(_indexes, indexes);\n return this;\n },\n };\n}\nexports.entityCollection = entityCollection;\n/**\n * An index that uses the value of an entity's field\n */\nfunction fieldIndex(propName, comparator) {\n return calculatedIndex((x) => x[propName], comparator);\n}\nexports.fieldIndex = fieldIndex;\n/**\n * An index that is calculated based on a function applied to an entity\n */\nfunction calculatedIndex(fn, comparator) {\n const index = [];\n return {\n add: (x) => sorted_map_1.sortedMap.add(index, comparator, fn(x), x.$id),\n lookups: {\n equals: (value) => sorted_map_1.sortedMap.findAll(index, comparator, value),\n },\n index,\n };\n}\nexports.calculatedIndex = calculatedIndex;\nfunction isEntityCollection(x) {\n return typeof x === 'object' && !!x && x.type === 'entities';\n}\nexports.isEntityCollection = isEntityCollection;\nfunction validatePlainObjects(xs) {\n for (const x of xs.values()) {\n if (x.constructor !== Object) {\n throw new Error(`Entities should be plain-text objects, got instance of ${x.constructor}`);\n }\n }\n return xs;\n}\nfunction ref(x) {\n return typeof x === 'string' ? { $ref: x } : { $ref: x.$id };\n}\nexports.ref = ref;\n/**\n * Determines whether two strings are equivalent in the current or specified locale.\n */\nfunction stringCmp(a, b) {\n return a.localeCompare(b);\n}\nexports.stringCmp = stringCmp;\n/**\n * Determines whether two numbers are equivalent.\n */\nfunction numberCmp(a, b) {\n return a - b;\n}\nexports.numberCmp = numberCmp;\n/**\n * Creates a comparator to determine equivalent of two values, using a given comparator, but allows values to be optional.\n *\n * @param frontOrder If `true`, returns so that undefined values are ordered at the front. If `false`, undefined values are ordered at the back.\n */\nfunction optionalCmp(cmp, frontOrder = true) {\n return (a, b) => {\n if (a == undefined && b != undefined) {\n return frontOrder ? -1 : 1;\n }\n if (a != undefined && b == undefined) {\n return frontOrder ? 1 : -1;\n }\n if (a == undefined && b == undefined) {\n return 0;\n }\n return cmp(a, b);\n };\n}\nexports.optionalCmp = optionalCmp;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW50aXR5LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2VudGl0eS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSw2Q0FBeUQ7QUE0RXpELFNBQWdCLGdCQUFnQjtJQUM5QixNQUFNLFFBQVEsR0FBRyxJQUFJLEdBQUcsRUFBYSxDQUFDO0lBQ3RDLE1BQU0sUUFBUSxHQUFHLEVBQUUsQ0FBQztJQUVwQixTQUFTLEdBQUcsQ0FBQyxDQUFJO1FBQ2YsUUFBUSxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUMsR0FBRyxFQUFFLENBQUMsQ0FBQyxDQUFDO1FBQ3ZCLEtBQUssTUFBTSxLQUFLLElBQUksTUFBTSxDQUFDLE1BQU0sQ0FBQyxRQUFRLENBQUMsRUFBRTtZQUMzQyxpQ0FBaUM7WUFDaEMsS0FBYSxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUMsQ0FBQztTQUN2QjtJQUNILENBQUM7SUFFRCxPQUFPO1FBQ0wsSUFBSSxFQUFFLFVBQVU7UUFDaEIsUUFBUTtRQUNSLE9BQU8sRUFBRSxRQUFlO1FBQ3hCLEdBQUc7UUFDSCxTQUFTLEVBQUUsR0FBRyxFQUFFLENBQUMsQ0FBQztZQUNoQixJQUFJLEVBQUUsVUFBVTtZQUNoQixRQUFRLEVBQUUsS0FBSyxDQUFDLElBQUksQ0FBQyxvQkFBb0IsQ0FBQyxRQUFRLENBQUMsQ0FBQyxNQUFNLEVBQUUsQ0FBQztTQUM5RCxDQUFDO1FBQ0YsV0FBVyxFQUFFLENBQUMsQ0FBQyxFQUFFLEVBQUU7WUFDakIsUUFBUSxDQUFDLEtBQUssRUFBRSxDQUFDO1lBQ2pCLEtBQUssTUFBTSxDQUFDLElBQUksTUFBTSxDQUFDLE1BQU0sQ0FBQyxDQUFDLENBQUMsUUFBUSxDQUFDLEVBQUU7Z0JBQ3pDLEdBQUcsQ0FBQyxDQUFRLENBQUMsQ0FBQzthQUNmO1FBQ0gsQ0FBQztRQUNELEtBQUssQ0FBQyxPQUFPO1lBQ1gsc0VBQXNFO1lBQ3RFLDRFQUE0RTtZQUM1RSw0RUFBNEU7WUFDNUUsMEVBQTBFO1lBQzFFLHdFQUF3RTtZQUN4RSwrREFBK0Q7WUFDL0QsSUFBSSxNQUFNLENBQUMsSUFBSSxDQUFDLFFBQVEsQ0FBQyxDQUFDLE1BQU0sR0FBRyxDQUFDLEVBQUU7Z0JBQ3BDLE1BQU0sSUFBSSxLQUFLLENBQUMscURBQXFELENBQUMsQ0FBQzthQUN4RTtZQUNELE1BQU0sQ0FBQyxNQUFNLENBQUMsUUFBUSxFQUFFLE9BQU8sQ0FBQyxDQUFDO1lBQ2pDLE9BQU8sSUFBVyxDQUFDO1FBQ3JCLENBQUM7S0FDRixDQUFDO0FBQ0osQ0FBQztBQXpDRCw0Q0F5Q0M7QUFFRDs7R0FFRztBQUNILFNBQWdCLFVBQVUsQ0FDeEIsUUFBVyxFQUNYLFVBQXNDO0lBRXRDLE9BQU8sZUFBZSxDQUFDLENBQUMsQ0FBQyxFQUFFLEVBQUUsQ0FBQyxDQUFDLENBQUMsUUFBUSxDQUFDLEVBQUUsVUFBVSxDQUFDLENBQUM7QUFDekQsQ0FBQztBQUxELGdDQUtDO0FBRUQ7O0dBRUc7QUFDSCxTQUFnQixlQUFlLENBQXNCLEVBQWUsRUFBRSxVQUFtQztJQUN2RyxNQUFNLEtBQUssR0FBOEIsRUFBRSxDQUFDO0lBQzVDLE9BQU87UUFDTCxHQUFHLEVBQUUsQ0FBQyxDQUFJLEVBQUUsRUFBRSxDQUFDLHNCQUFTLENBQUMsR0FBRyxDQUFDLEtBQUssRUFBRSxVQUFVLEVBQUUsRUFBRSxDQUFDLENBQUMsQ0FBQyxFQUFFLENBQUMsQ0FBQyxHQUFHLENBQUM7UUFDN0QsT0FBTyxFQUFFO1lBQ1AsTUFBTSxFQUFFLENBQUMsS0FBUSxFQUFFLEVBQUUsQ0FBQyxzQkFBUyxDQUFDLE9BQU8sQ0FBQyxLQUFLLEVBQUUsVUFBVSxFQUFFLEtBQUssQ0FBQztTQUMzRDtRQUNSLEtBQUs7S0FDTixDQUFDO0FBQ0osQ0FBQztBQVRELDBDQVNDO0FBRUQsU0FBZ0Isa0JBQWtCLENBQUMsQ0FBVTtJQUMzQyxPQUFPLE9BQU8sQ0FBQyxLQUFLLFFBQVEsSUFBSSxDQUFDLENBQUMsQ0FBQyxJQUFLLENBQVMsQ0FBQyxJQUFJLEtBQUssVUFBVSxDQUFDO0FBQ3hFLENBQUM7QUFGRCxnREFFQztBQUVELFNBQVMsb0JBQW9CLENBQW1CLEVBQWtCO0lBQ2hFLEtBQUssTUFBTSxDQUFDLElBQUksRUFBRSxDQUFDLE1BQU0sRUFBRSxFQUFFO1FBQzNCLElBQUksQ0FBQyxDQUFDLFdBQVcsS0FBSyxNQUFNLEVBQUU7WUFDNUIsTUFBTSxJQUFJLEtBQUssQ0FBQywwREFBMEQsQ0FBQyxDQUFDLFdBQVcsRUFBRSxDQUFDLENBQUM7U0FDNUY7S0FDRjtJQUNELE9BQU8sRUFBRSxDQUFDO0FBQ1osQ0FBQztBQU1ELFNBQWdCLEdBQUcsQ0FBbUIsQ0FBYTtJQUNqRCxPQUFPLE9BQU8sQ0FBQyxLQUFLLFFBQVEsQ0FBQyxDQUFDLENBQUMsRUFBRSxJQUFJLEVBQUUsQ0FBQyxFQUFFLENBQUMsQ0FBQyxDQUFDLEVBQUUsSUFBSSxFQUFFLENBQUMsQ0FBQyxHQUFHLEVBQUUsQ0FBQztBQUMvRCxDQUFDO0FBRkQsa0JBRUM7QUFFRDs7R0FFRztBQUNILFNBQWdCLFNBQVMsQ0FBQyxDQUFTLEVBQUUsQ0FBUztJQUM1QyxPQUFPLENBQUMsQ0FBQyxhQUFhLENBQUMsQ0FBQyxDQUFDLENBQUM7QUFDNUIsQ0FBQztBQUZELDhCQUVDO0FBRUQ7O0dBRUc7QUFDSCxTQUFnQixTQUFTLENBQUMsQ0FBUyxFQUFFLENBQVM7SUFDNUMsT0FBTyxDQUFDLEdBQUcsQ0FBQyxDQUFDO0FBQ2YsQ0FBQztBQUZELDhCQUVDO0FBRUQ7Ozs7R0FJRztBQUNILFNBQWdCLFdBQVcsQ0FBSSxHQUEyQixFQUFFLFVBQVUsR0FBRyxJQUFJO0lBQzNFLE9BQU8sQ0FBQyxDQUFnQixFQUFFLENBQWdCLEVBQUUsRUFBRTtRQUM1QyxJQUFJLENBQUMsSUFBSSxTQUFTLElBQUksQ0FBQyxJQUFJLFNBQVMsRUFBRTtZQUNwQyxPQUFPLFVBQVUsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQztTQUM1QjtRQUNELElBQUksQ0FBQyxJQUFJLFNBQVMsSUFBSSxDQUFDLElBQUksU0FBUyxFQUFFO1lBQ3BDLE9BQU8sVUFBVSxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDO1NBQzVCO1FBQ0QsSUFBSSxDQUFDLElBQUksU0FBUyxJQUFJLENBQUMsSUFBSSxTQUFTLEVBQUU7WUFDcEMsT0FBTyxDQUFDLENBQUM7U0FDVjtRQUVELE9BQU8sR0FBRyxDQUFDLENBQUUsRUFBRSxDQUFFLENBQUMsQ0FBQztJQUNyQixDQUFDLENBQUM7QUFDSixDQUFDO0FBZEQsa0NBY0MiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBzb3J0ZWRNYXAsIFNvcnRlZE11bHRpTWFwIH0gZnJvbSAnLi9zb3J0ZWQtbWFwJztcblxuZXhwb3J0IGludGVyZmFjZSBFbnRpdHkge1xuICByZWFkb25seSAkaWQ6IHN0cmluZztcbn1cblxuZXhwb3J0IHR5cGUgUGxhaW48RSBleHRlbmRzIEVudGl0eT4gPSBPbWl0PEUsICckaWQnPjtcblxudHlwZSBJbmRleGVzPEEgZXh0ZW5kcyBFbnRpdHk+ID0geyBbSyBpbiBQcm9wZXJ0eUtleV06IEVudGl0eUluZGV4PEEsIGFueT4gfTtcblxuZXhwb3J0IGludGVyZmFjZSBFbnRpdHlDb2xsZWN0aW9uPEEgZXh0ZW5kcyBFbnRpdHksIEkgZXh0ZW5kcyBJbmRleGVzPEVudGl0eT4gPSB7fT4ge1xuICByZWFkb25seSB0eXBlOiAnZW50aXRpZXMnO1xuICByZWFkb25seSBlbnRpdGllczogTWFwPHN0cmluZywgQT47XG4gIHJlYWRvbmx5IGluZGV4ZXM6IEk7XG5cbiAgYWRkKHg6IEEpOiB2b2lkO1xuICBkZWh5ZHJhdGUoKTogYW55O1xuICBoeWRyYXRlRnJvbSh4OiBhbnkpOiB2b2lkO1xuXG4gIC8qKlxuICAgKiBBZGQgaW5kZXhlcyB0byB0aGlzIGNvbGxlY3Rpb25cbiAgICpcbiAgICogQ3JlYXRpbmcgYW4gaW5kZXhlZCBjb2xsZWN0aW9uIGlzIGEgdHdvLXN0ZXAgb3BlcmF0aW9uIHNvIHRoYXQgd2UgY2FuIHNwZWNpZnkgdGhlXG4gICAqIEVudGl0eSB0eXBlLCBidXQgaW5mZXIgdGhlIGluZGV4IHR5cGVzIChUeXBlU2NyaXB0IGRvZXMgbm90IGFsbG93IGJvdGggc3BlY2lmeWluZyBBTkRcbiAgICogaW5mZXJyaW5nIGdlbmVyaWMgYXJndW1lbnRzIGluIGEgc2luZ2xlIGNhbGwpLlxuICAgKi9cbiAgaW5kZXg8SUkgZXh0ZW5kcyBJbmRleGVzPEE+PihpbmRleGVzOiBJSSk6IEVudGl0eUNvbGxlY3Rpb248QSwgSUk+O1xufVxuXG4vKipcbiAqIEludGVyZmFjZSBmb3IgaW5kZXggb2JqZWN0c1xuICovXG5leHBvcnQgaW50ZXJmYWNlIEVudGl0eUluZGV4PEEgZXh0ZW5kcyBFbnRpdHksIEluZGV4VHlwZT4ge1xuICAvKipcbiAgICogVGhlIGxvb2t1cHMgdGhhdCB0aGUgaW5kZXhlZCBmaWVsZCB0eXBlIGFmZm9yZHNcbiAgICpcbiAgICogRm9yIGV4YW1wbGUsICdlcXVhbHMnLCAnbGVzc1RoYW4nLCAncHJlZml4JywgZXRjLlxuICAgKi9cbiAgcmVhZG9ubHkgbG9va3VwczogSW5kZXhMb29rdXBzPEluZGV4VHlwZT47XG5cbiAgLyoqXG4gICAqIFRoZSBpbmRleCBkYXRhIHN0b3JlXG4gICAqL1xuICByZWFkb25seSBpbmRleDogU29ydGVkTXVsdGlNYXA8SW5kZXhUeXBlLCBzdHJpbmc+O1xuXG4gIC8qKlxuICAgKiBBZGQgYW4gZW50aXR5IHRvIHRoZSBpbmRleFxuICAgKi9cbiAgYWRkKHg6IEEpOiB2b2lkO1xufVxuXG4vKipcbiAqIE1hcCBhIHR5cGUgdGhlIHR5cGVzIG9mIGxvb2t1cHMgd2UgY2FuIGRvIG9uIHRoYXQgdHlwZVxuICovXG5leHBvcnQgdHlwZSBJbmRleExvb2t1cHM8UD4gPSBbUF0gZXh0ZW5kcyBbc3RyaW5nXVxuICA/IFN0cmluZ0luZGV4TG9va3Vwc1xuICA6IFtQXSBleHRlbmRzIFtzdHJpbmcgfCB1bmRlZmluZWRdXG4gID8gT3B0aW9uYWxTdHJpbmdJbmRleExvb2t1cHNcbiAgOiB7fTtcblxuLyoqXG4gKiBBbGwgdGhlIGxvb2t1cHMgb24gJ3N0cmluZycgdHlwZXNcbiAqXG4gKiBXZSBjdXJyZW50bHkgb25seSBoYXZlICdlcXVhbHMnIGJ1dCB3ZSBjb3VsZCBoYXZlIG1vcmUgOilcbiAqL1xuZXhwb3J0IGludGVyZmFjZSBTdHJpbmdJbmRleExvb2t1cHMge1xuICBlcXVhbHMoeDogc3RyaW5nKTogc3RyaW5nW107XG59XG5cbi8qKlxuICogQWxsIHRoZSBsb29rdXBzIG9uICdzdHJpbmcgfCB1bmRlZmluZWQnIHR5cGVzXG4gKi9cbmV4cG9ydCBpbnRlcmZhY2UgT3B0aW9uYWxTdHJpbmdJbmRleExvb2t1cHMge1xuICBlcXVhbHMoeDogc3RyaW5nIHwgdW5kZWZpbmVkKTogc3RyaW5nW107XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBlbnRpdHlDb2xsZWN0aW9uPEEgZXh0ZW5kcyBFbnRpdHk+KCk6IEVudGl0eUNvbGxlY3Rpb248QSwge30+IHtcbiAgY29uc3QgZW50aXRpZXMgPSBuZXcgTWFwPHN0cmluZywgQT4oKTtcbiAgY29uc3QgX2luZGV4ZXMgPSB7fTtcblxuICBmdW5jdGlvbiBhZGQoeDogQSkge1xuICAgIGVudGl0aWVzLnNldCh4LiRpZCwgeCk7XG4gICAgZm9yIChjb25zdCBpbmRleCBvZiBPYmplY3QudmFsdWVzKF9pbmRleGVzKSkge1xuICAgICAgLy8gRklYTUU6IHdoeSBjYW4ndCB3ZSB0eXBlIHRoaXM/XG4gICAgICAoaW5kZXggYXMgYW55KS5hZGQoeCk7XG4gICAgfVxuICB9XG5cbiAgcmV0dXJuIHtcbiAgICB0eXBlOiAnZW50aXRpZXMnLFxuICAgIGVudGl0aWVzLFxuICAgIGluZGV4ZXM6IF9pbmRleGVzIGFzIGFueSxcbiAgICBhZGQsXG4gICAgZGVoeWRyYXRlOiAoKSA9PiAoe1xuICAgICAgdHlwZTogJ2VudGl0aWVzJyxcbiAgICAgIGVudGl0aWVzOiBBcnJheS5mcm9tKHZhbGlkYXRlUGxhaW5PYmplY3RzKGVudGl0aWVzKS52YWx1ZXMoKSksXG4gICAgfSksXG4gICAgaHlkcmF0ZUZyb206ICh4KSA9PiB7XG4gICAgICBlbnRpdGllcy5jbGVhcigpO1xuICAgICAgZm9yIChjb25zdCBlIG9mIE9iamVjdC52YWx1ZXMoeC5lbnRpdGllcykpIHtcbiAgICAgICAgYWRkKGUgYXMgYW55KTtcbiAgICAgIH1cbiAgICB9LFxuICAgIGluZGV4KGluZGV4ZXMpIHtcbiAgICAgIC8vIFRoaXMgbGltaXRhdGlvbiBleGlzdHMgcHVyZWx5IGJlY2F1c2UgSSBjb3VsZG4ndCB0eXBlIGl0IG90aGVyd2lzZS5cbiAgICAgIC8vIERlY2xhcmluZyBhIHJldHVybiB0eXBlIG9mIGBFbnRpdHlDb2xsZWN0aW9uPEEsIEkgfCBJST5gIHdvdWxkIG1ha2UgYSBsb3RcbiAgICAgIC8vIG9mIG91ciBvdGhlciB0eXBlIGluc3BlY3Rpb24gY29kZSBzdG9wIHdvcmtpbmcgKHRoZSB1bmlvbiBpcyBoYXJkIHRvIHBpY2tcbiAgICAgIC8vIGFwYXJ0KS4gU2luY2UgYWRkaW5nIGluZGV4ZXMgaW4gbXVsdGlwbGUgZ29lcyBpcyBub3QgcmVhbGx5IGEgdXNlIGNhc2UsXG4gICAgICAvLyB0aGUgc2ltcGxlciBzb2x1dGlvbiBpcyBqdXN0IHRvIHR5cGUgaXQgYXMgaWYgd2UgcmVwbGFjZWQgYWxsIGluZGV4ZXNcbiAgICAgIC8vIGFuZCBhZGQgYSBydW50aW1lIGNoZWNrIHRvIG1ha2Ugc3VyZSB0aGUgdHlwZXMgYXJlbid0IGx5aW5nLlxuICAgICAgaWYgKE9iamVjdC5rZXlzKF9pbmRleGVzKS5sZW5ndGggPiAwKSB7XG4gICAgICAgIHRocm93IG5ldyBFcnJvcignWW91IG1heSBvbmx5IGNhbGwgLmluZGV4KCkgb25jZSBvbiBhIG5ldyBjb2xsZWN0aW9uJyk7XG4gICAgICB9XG4gICAgICBPYmplY3QuYXNzaWduKF9pbmRleGVzLCBpbmRleGVzKTtcbiAgICAgIHJldHVybiB0aGlzIGFzIGFueTtcbiAgICB9LFxuICB9O1xufVxuXG4vKipcbiAqIEFuIGluZGV4IHRoYXQgdXNlcyB0aGUgdmFsdWUgb2YgYW4gZW50aXR5J3MgZmllbGRcbiAqL1xuZXhwb3J0IGZ1bmN0aW9uIGZpZWxkSW5kZXg8QSBleHRlbmRzIEVudGl0eSwgUCBleHRlbmRzIGtleW9mIEE+KFxuICBwcm9wTmFtZTogUCxcbiAgY29tcGFyYXRvcjogc29ydGVkTWFwLkNvbXBhcmF0b3I8QVtQXT4sXG4pOiBFbnRpdHlJbmRleDxBLCBBW1BdPiB7XG4gIHJldHVybiBjYWxjdWxhdGVkSW5kZXgoKHgpID0+IHhbcHJvcE5hbWVdLCBjb21wYXJhdG9yKTtcbn1cblxuLyoqXG4gKiBBbiBpbmRleCB0aGF0IGlzIGNhbGN1bGF0ZWQgYmFzZWQgb24gYSBmdW5jdGlvbiBhcHBsaWVkIHRvIGFuIGVudGl0eVxuICovXG5leHBvcnQgZnVuY3Rpb24gY2FsY3VsYXRlZEluZGV4PEEgZXh0ZW5kcyBFbnRpdHksIEI+KGZuOiAoeDogQSkgPT4gQiwgY29tcGFyYXRvcjogc29ydGVkTWFwLkNvbXBhcmF0b3I8Qj4pIHtcbiAgY29uc3QgaW5kZXg6IFNvcnRlZE11bHRpTWFwPEIsIHN0cmluZz4gPSBbXTtcbiAgcmV0dXJuIHtcbiAgICBhZGQ6ICh4OiBBKSA9PiBzb3J0ZWRNYXAuYWRkKGluZGV4LCBjb21wYXJhdG9yLCBmbih4KSwgeC4kaWQpLFxuICAgIGxvb2t1cHM6IHtcbiAgICAgIGVxdWFsczogKHZhbHVlOiBCKSA9PiBzb3J0ZWRNYXAuZmluZEFsbChpbmRleCwgY29tcGFyYXRvciwgdmFsdWUpLFxuICAgIH0gYXMgYW55LFxuICAgIGluZGV4LFxuICB9O1xufVxuXG5leHBvcnQgZnVuY3Rpb24gaXNFbnRpdHlDb2xsZWN0aW9uKHg6IHVua25vd24pOiB4IGlzIEVudGl0eUNvbGxlY3Rpb248YW55PiB7XG4gIHJldHVybiB0eXBlb2YgeCA9PT0gJ29iamVjdCcgJiYgISF4ICYmICh4IGFzIGFueSkudHlwZSA9PT0gJ2VudGl0aWVzJztcbn1cblxuZnVuY3Rpb24gdmFsaWRhdGVQbGFpbk9iamVjdHM8QSBleHRlbmRzIG9iamVjdD4oeHM6IE1hcDxzdHJpbmcsIEE+KTogTWFwPHN0cmluZywgQT4ge1xuICBmb3IgKGNvbnN0IHggb2YgeHMudmFsdWVzKCkpIHtcbiAgICBpZiAoeC5jb25zdHJ1Y3RvciAhPT0gT2JqZWN0KSB7XG4gICAgICB0aHJvdyBuZXcgRXJyb3IoYEVudGl0aWVzIHNob3VsZCBiZSBwbGFpbi10ZXh0IG9iamVjdHMsIGdvdCBpbnN0YW5jZSBvZiAke3guY29uc3RydWN0b3J9YCk7XG4gICAgfVxuICB9XG4gIHJldHVybiB4cztcbn1cblxuZXhwb3J0IGludGVyZmFjZSBSZWZlcmVuY2U8RSBleHRlbmRzIEVudGl0eT4ge1xuICByZWFkb25seSAkcmVmOiBFWyckaWQnXTtcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIHJlZjxFIGV4dGVuZHMgRW50aXR5Pih4OiBFIHwgc3RyaW5nKTogUmVmZXJlbmNlPEU+IHtcbiAgcmV0dXJuIHR5cGVvZiB4ID09PSAnc3RyaW5nJyA/IHsgJHJlZjogeCB9IDogeyAkcmVmOiB4LiRpZCB9O1xufVxuXG4vKipcbiAqIERldGVybWluZXMgd2hldGhlciB0d28gc3RyaW5ncyBhcmUgZXF1aXZhbGVudCBpbiB0aGUgY3VycmVudCBvciBzcGVjaWZpZWQgbG9jYWxlLlxuICovXG5leHBvcnQgZnVuY3Rpb24gc3RyaW5nQ21wKGE6IHN0cmluZywgYjogc3RyaW5nKTogbnVtYmVyIHtcbiAgcmV0dXJuIGEubG9jYWxlQ29tcGFyZShiKTtcbn1cblxuLyoqXG4gKiBEZXRlcm1pbmVzIHdoZXRoZXIgdHdvIG51bWJlcnMgYXJlIGVxdWl2YWxlbnQuXG4gKi9cbmV4cG9ydCBmdW5jdGlvbiBudW1iZXJDbXAoYTogbnVtYmVyLCBiOiBudW1iZXIpOiBudW1iZXIge1xuICByZXR1cm4gYSAtIGI7XG59XG5cbi8qKlxuICogQ3JlYXRlcyBhIGNvbXBhcmF0b3IgdG8gZGV0ZXJtaW5lIGVxdWl2YWxlbnQgb2YgdHdvIHZhbHVlcywgdXNpbmcgYSBnaXZlbiBjb21wYXJhdG9yLCBidXQgYWxsb3dzIHZhbHVlcyB0byBiZSBvcHRpb25hbC5cbiAqXG4gKiBAcGFyYW0gZnJvbnRPcmRlciBJZiBgdHJ1ZWAsIHJldHVybnMgc28gdGhhdCB1bmRlZmluZWQgdmFsdWVzIGFyZSBvcmRlcmVkIGF0IHRoZSBmcm9udC4gSWYgYGZhbHNlYCwgdW5kZWZpbmVkIHZhbHVlcyBhcmUgb3JkZXJlZCBhdCB0aGUgYmFjay5cbiAqL1xuZXhwb3J0IGZ1bmN0aW9uIG9wdGlvbmFsQ21wPEE+KGNtcDogKGE6IEEsIGI6IEEpID0+IG51bWJlciwgZnJvbnRPcmRlciA9IHRydWUpIHtcbiAgcmV0dXJuIChhOiBBIHwgdW5kZWZpbmVkLCBiOiBBIHwgdW5kZWZpbmVkKSA9PiB7XG4gICAgaWYgKGEgPT0gdW5kZWZpbmVkICYmIGIgIT0gdW5kZWZpbmVkKSB7XG4gICAgICByZXR1cm4gZnJvbnRPcmRlciA/IC0xIDogMTtcbiAgICB9XG4gICAgaWYgKGEgIT0gdW5kZWZpbmVkICYmIGIgPT0gdW5kZWZpbmVkKSB7XG4gICAgICByZXR1cm4gZnJvbnRPcmRlciA/IDEgOiAtMTtcbiAgICB9XG4gICAgaWYgKGEgPT0gdW5kZWZpbmVkICYmIGIgPT0gdW5kZWZpbmVkKSB7XG4gICAgICByZXR1cm4gMDtcbiAgICB9XG5cbiAgICByZXR1cm4gY21wKGEhLCBiISk7XG4gIH07XG59XG4iXX0=","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./entity\"), exports);\n__exportStar(require(\"./relationship\"), exports);\n__exportStar(require(\"./database\"), exports);\n__exportStar(require(\"./invariant\"), exports);\n__exportStar(require(\"./result\"), exports);\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7OztBQUFBLDJDQUF5QjtBQUN6QixpREFBK0I7QUFDL0IsNkNBQTJCO0FBQzNCLDhDQUE0QjtBQUM1QiwyQ0FBeUIiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2VudGl0eSc7XG5leHBvcnQgKiBmcm9tICcuL3JlbGF0aW9uc2hpcCc7XG5leHBvcnQgKiBmcm9tICcuL2RhdGFiYXNlJztcbmV4cG9ydCAqIGZyb20gJy4vaW52YXJpYW50JztcbmV4cG9ydCAqIGZyb20gJy4vcmVzdWx0JztcbiJdfQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.impliesU = exports.implies = exports.evolutionInvariant = void 0;\nfunction evolutionInvariant(description, pred) {\n // TODO: Find a way\n Array.isArray(description);\n Array.isArray(pred);\n}\nexports.evolutionInvariant = evolutionInvariant;\nfunction implies(x, y) {\n return !x || y;\n}\nexports.implies = implies;\n/**\n * Implies, but treats 'undefined' as 'false'\n */\nfunction impliesU(x, y) {\n return !x || !!y;\n}\nexports.impliesU = impliesU;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW52YXJpYW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2ludmFyaWFudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFJQSxTQUFnQixrQkFBa0IsQ0FBSSxXQUFtQixFQUFFLElBQStCO0lBQ3hGLG1CQUFtQjtJQUNuQixLQUFLLENBQUMsT0FBTyxDQUFDLFdBQVcsQ0FBQyxDQUFDO0lBQzNCLEtBQUssQ0FBQyxPQUFPLENBQUMsSUFBSSxDQUFDLENBQUM7QUFDdEIsQ0FBQztBQUpELGdEQUlDO0FBRUQsU0FBZ0IsT0FBTyxDQUFDLENBQVUsRUFBRSxDQUFVO0lBQzVDLE9BQU8sQ0FBQyxDQUFDLElBQUksQ0FBQyxDQUFDO0FBQ2pCLENBQUM7QUFGRCwwQkFFQztBQUVEOztHQUVHO0FBQ0gsU0FBZ0IsUUFBUSxDQUFDLENBQXNCLEVBQUUsQ0FBc0I7SUFDckUsT0FBTyxDQUFDLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQyxDQUFDO0FBQ25CLENBQUM7QUFGRCw0QkFFQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCB0eXBlIEludmFyaWFudCA9IHZvaWQ7XG5cbmV4cG9ydCB0eXBlIEV2b2x1dGlvbkludmFyaWFudFByZWQ8QT4gPSAocHJldmlvdXM6IEEsIGN1cnJlbnQ6IEEpID0+IGJvb2xlYW47XG5cbmV4cG9ydCBmdW5jdGlvbiBldm9sdXRpb25JbnZhcmlhbnQ8QT4oZGVzY3JpcHRpb246IHN0cmluZywgcHJlZDogRXZvbHV0aW9uSW52YXJpYW50UHJlZDxBPik6IEludmFyaWFudCB7XG4gIC8vIFRPRE86IEZpbmQgYSB3YXlcbiAgQXJyYXkuaXNBcnJheShkZXNjcmlwdGlvbik7XG4gIEFycmF5LmlzQXJyYXkocHJlZCk7XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBpbXBsaWVzKHg6IGJvb2xlYW4sIHk6IGJvb2xlYW4pIHtcbiAgcmV0dXJuICF4IHx8IHk7XG59XG5cbi8qKlxuICogSW1wbGllcywgYnV0IHRyZWF0cyAndW5kZWZpbmVkJyBhcyAnZmFsc2UnXG4gKi9cbmV4cG9ydCBmdW5jdGlvbiBpbXBsaWVzVSh4OiBib29sZWFuIHwgdW5kZWZpbmVkLCB5OiBib29sZWFuIHwgdW5kZWZpbmVkKSB7XG4gIHJldHVybiAheCB8fCAhIXk7XG59XG4iXX0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isRelationshipCollection = exports.relationshipCollection = exports.NO_RELATIONSHIPS = void 0;\nconst NO_RELATIONSHIPS = () => ({});\nexports.NO_RELATIONSHIPS = NO_RELATIONSHIPS;\nfunction relationshipCollection(fromField, toField) {\n const forward = new Map();\n const backward = new Map();\n function add(fromId, toId, attrs) {\n let f = forward.get(fromId);\n if (!f) {\n f = [];\n forward.set(fromId, f);\n }\n let b = backward.get(toId);\n if (!b) {\n b = [];\n backward.set(toId, b);\n }\n // Behaves like a set, only add new relationship if it is structurally distinct\n const forwardRel = { $id: toId, ...attrs };\n const forwardRelStr = JSON.stringify(forwardRel);\n const existingRelationship = f.find((x) => JSON.stringify(x) === forwardRelStr);\n if (!existingRelationship) {\n f.push(forwardRel);\n b.push({ $id: fromId, ...attrs });\n }\n }\n return {\n type: 'rel',\n fromColl: fromField,\n toColl: toField,\n forward,\n backward,\n add(from, to, attributes) {\n add(from.$id, to.$id, attributes);\n },\n dehydrate() {\n return {\n type: 'rel',\n forward: Object.fromEntries(forward.entries()),\n };\n },\n hydrateFrom(x) {\n forward.clear();\n backward.clear();\n for (const [fromId, targets] of Object.entries(x.forward)) {\n for (const target of targets) {\n add(fromId, target.$id, removeId(target));\n }\n }\n },\n };\n}\nexports.relationshipCollection = relationshipCollection;\nfunction isRelationshipCollection(x) {\n return typeof x === 'object' && !!x && x.type === 'rel';\n}\nexports.isRelationshipCollection = isRelationshipCollection;\nfunction removeId(x) {\n const ret = { ...x };\n delete ret.$id;\n return ret;\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVsYXRpb25zaGlwLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL3JlbGF0aW9uc2hpcC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUE2Qk8sTUFBTSxnQkFBZ0IsR0FBRyxHQUFHLEVBQUUsQ0FBQyxDQUFDLEVBQUUsQ0FBQyxDQUFDO0FBQTlCLFFBQUEsZ0JBQWdCLG9CQUFjO0FBRTNDLFNBQWdCLHNCQUFzQixDQUNwQyxTQUF3QixFQUN4QixPQUFvQjtJQUVwQixNQUFNLE9BQU8sR0FBRyxJQUFJLEdBQUcsRUFBMkIsQ0FBQztJQUNuRCxNQUFNLFFBQVEsR0FBRyxJQUFJLEdBQUcsRUFBMkIsQ0FBQztJQUVwRCxTQUFTLEdBQUcsQ0FBQyxNQUFjLEVBQUUsSUFBWSxFQUFFLEtBQVU7UUFDbkQsSUFBSSxDQUFDLEdBQUcsT0FBTyxDQUFDLEdBQUcsQ0FBQyxNQUFNLENBQUMsQ0FBQztRQUM1QixJQUFJLENBQUMsQ0FBQyxFQUFFO1lBQ04sQ0FBQyxHQUFHLEVBQUUsQ0FBQztZQUNQLE9BQU8sQ0FBQyxHQUFHLENBQUMsTUFBTSxFQUFFLENBQUMsQ0FBQyxDQUFDO1NBQ3hCO1FBQ0QsSUFBSSxDQUFDLEdBQUcsUUFBUSxDQUFDLEdBQUcsQ0FBQyxJQUFJLENBQUMsQ0FBQztRQUMzQixJQUFJLENBQUMsQ0FBQyxFQUFFO1lBQ04sQ0FBQyxHQUFHLEVBQUUsQ0FBQztZQUNQLFFBQVEsQ0FBQyxHQUFHLENBQUMsSUFBSSxFQUFFLENBQUMsQ0FBQyxDQUFDO1NBQ3ZCO1FBRUQsK0VBQStFO1FBQy9FLE1BQU0sVUFBVSxHQUFHLEVBQUUsR0FBRyxFQUFFLElBQUksRUFBRSxHQUFHLEtBQUssRUFBRSxDQUFDO1FBQzNDLE1BQU0sYUFBYSxHQUFHLElBQUksQ0FBQyxTQUFTLENBQUMsVUFBVSxDQUFDLENBQUM7UUFDakQsTUFBTSxvQkFBb0IsR0FBRyxDQUFDLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQyxFQUFFLEVBQUUsQ0FBQyxJQUFJLENBQUMsU0FBUyxDQUFDLENBQUMsQ0FBQyxLQUFLLGFBQWEsQ0FBQyxDQUFDO1FBRWhGLElBQUksQ0FBQyxvQkFBb0IsRUFBRTtZQUN6QixDQUFDLENBQUMsSUFBSSxDQUFDLFVBQVUsQ0FBQyxDQUFDO1lBQ25CLENBQUMsQ0FBQyxJQUFJLENBQUMsRUFBRSxHQUFHLEVBQUUsTUFBTSxFQUFFLEdBQUcsS0FBSyxFQUFFLENBQUMsQ0FBQztTQUNuQztJQUNILENBQUM7SUFFRCxPQUFPO1FBQ0wsSUFBSSxFQUFFLEtBQUs7UUFDWCxRQUFRLEVBQUUsU0FBUztRQUNuQixNQUFNLEVBQUUsT0FBTztRQUNmLE9BQU87UUFDUCxRQUFRO1FBQ1IsR0FBRyxDQUFDLElBQVksRUFBRSxFQUFVLEVBQUUsVUFBZTtZQUMzQyxHQUFHLENBQUMsSUFBSSxDQUFDLEdBQUcsRUFBRSxFQUFFLENBQUMsR0FBRyxFQUFFLFVBQVUsQ0FBQyxDQUFDO1FBQ3BDLENBQUM7UUFDRCxTQUFTO1lBQ1AsT0FBTztnQkFDTCxJQUFJLEVBQUUsS0FBSztnQkFDWCxPQUFPLEVBQUUsTUFBTSxDQUFDLFdBQVcsQ0FBQyxPQUFPLENBQUMsT0FBTyxFQUFFLENBQUM7YUFDL0MsQ0FBQztRQUNKLENBQUM7UUFDRCxXQUFXLENBQUMsQ0FBTTtZQUNoQixPQUFPLENBQUMsS0FBSyxFQUFFLENBQUM7WUFDaEIsUUFBUSxDQUFDLEtBQUssRUFBRSxDQUFDO1lBRWpCLEtBQUssTUFBTSxDQUFDLE1BQU0sRUFBRSxPQUFPLENBQUMsSUFBSSxNQUFNLENBQUMsT0FBTyxDQUFDLENBQUMsQ0FBQyxPQUFPLENBQUMsRUFBRTtnQkFDekQsS0FBSyxNQUFNLE1BQU0sSUFBSSxPQUEwQixFQUFFO29CQUMvQyxHQUFHLENBQUMsTUFBTSxFQUFFLE1BQU0sQ0FBQyxHQUFHLEVBQUUsUUFBUSxDQUFDLE1BQU0sQ0FBQyxDQUFDLENBQUM7aUJBQzNDO2FBQ0Y7UUFDSCxDQUFDO0tBQ0YsQ0FBQztBQUNKLENBQUM7QUF4REQsd0RBd0RDO0FBRUQsU0FBZ0Isd0JBQXdCLENBQUMsQ0FBVTtJQUNqRCxPQUFPLE9BQU8sQ0FBQyxLQUFLLFFBQVEsSUFBSSxDQUFDLENBQUMsQ0FBQyxJQUFLLENBQVMsQ0FBQyxJQUFJLEtBQUssS0FBSyxDQUFDO0FBQ25FLENBQUM7QUFGRCw0REFFQztBQUVELFNBQVMsUUFBUSxDQUFtQixDQUFJO0lBQ3RDLE1BQU0sR0FBRyxHQUFHLEVBQUUsR0FBRyxDQUFDLEVBQUUsQ0FBQztJQUNyQixPQUFRLEdBQVcsQ0FBQyxHQUFHLENBQUM7SUFDeEIsT0FBTyxHQUFHLENBQUM7QUFDYixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgRW50aXR5LCBFbnRpdHlDb2xsZWN0aW9uIH0gZnJvbSAnLi9lbnRpdHknO1xuXG5leHBvcnQgaW50ZXJmYWNlIFJlbGF0aW9uc2hpcDxGcm9tIGV4dGVuZHMgRW50aXR5LCBUbyBleHRlbmRzIEVudGl0eSwgQXR0cmlidXRlcyA9IHt9PiB7XG4gIHJlYWRvbmx5IGZyb206IEZyb207XG4gIHJlYWRvbmx5IHRvOiBUbztcbiAgcmVhZG9ubHkgYXR0cjogQXR0cmlidXRlcztcbn1cblxudHlwZSBGcm9tR2V0dGVyPFIgZXh0ZW5kcyBSZWxhdGlvbnNoaXA8YW55LCBhbnksIGFueT4+ID0gKGlkOiBzdHJpbmcpID0+IFJbJ2Zyb20nXTtcbnR5cGUgVG9HZXR0ZXI8UiBleHRlbmRzIFJlbGF0aW9uc2hpcDxhbnksIGFueSwgYW55Pj4gPSAoaWQ6IHN0cmluZykgPT4gUlsndG8nXTtcblxuZXhwb3J0IGludGVyZmFjZSBSZWxhdGlvbnNoaXBDb2xsZWN0aW9uPFIgZXh0ZW5kcyBSZWxhdGlvbnNoaXA8YW55LCBhbnksIGFueT4+IHtcbiAgcmVhZG9ubHkgdHlwZTogJ3JlbCc7XG4gIHJlYWRvbmx5IGZyb21Db2xsOiBGcm9tR2V0dGVyPFI+O1xuICByZWFkb25seSB0b0NvbGw6IFRvR2V0dGVyPFI+O1xuICByZWFkb25seSBmb3J3YXJkOiBNYXA8c3RyaW5nLCBSZWw8UlsnYXR0ciddPltdPjtcbiAgcmVhZG9ubHkgYmFja3dhcmQ6IE1hcDxzdHJpbmcsIFJlbDxSWydhdHRyJ10+W10+O1xuXG4gIGFkZChmcm9tOiBSWydmcm9tJ10sIHRvOiBSWyd0byddLCBhdHRyaWJ1dGVzOiBSWydhdHRyJ10pOiB2b2lkO1xuICBkZWh5ZHJhdGUoKTogYW55O1xuICBoeWRyYXRlRnJvbSh4OiBhbnkpOiB2b2lkO1xufVxuXG5leHBvcnQgdHlwZSBSZWw8QXR0cmlidXRlcz4gPSB7IHJlYWRvbmx5ICRpZDogc3RyaW5nIH0gJiBBdHRyaWJ1dGVzO1xuXG5leHBvcnQgdHlwZSBLZXlGb3JFbnRpdHlDb2xsZWN0aW9uPFMsIEUgZXh0ZW5kcyBFbnRpdHk+ID0ge1xuICBbSyBpbiBrZXlvZiBTXTogU1tLXSBleHRlbmRzIEVudGl0eUNvbGxlY3Rpb248RT4gPyBLIDogbmV2ZXI7XG59W2tleW9mIFNdO1xuXG5leHBvcnQgY29uc3QgTk9fUkVMQVRJT05TSElQUyA9ICgpID0+ICh7fSk7XG5cbmV4cG9ydCBmdW5jdGlvbiByZWxhdGlvbnNoaXBDb2xsZWN0aW9uPFIgZXh0ZW5kcyBSZWxhdGlvbnNoaXA8YW55LCBhbnksIGFueT4+KFxuICBmcm9tRmllbGQ6IEZyb21HZXR0ZXI8Uj4sXG4gIHRvRmllbGQ6IFRvR2V0dGVyPFI+LFxuKTogUmVsYXRpb25zaGlwQ29sbGVjdGlvbjxSPiB7XG4gIGNvbnN0IGZvcndhcmQgPSBuZXcgTWFwPHN0cmluZywgQXJyYXk8UmVsPGFueT4+PigpO1xuICBjb25zdCBiYWNrd2FyZCA9IG5ldyBNYXA8c3RyaW5nLCBBcnJheTxSZWw8YW55Pj4+KCk7XG5cbiAgZnVuY3Rpb24gYWRkKGZyb21JZDogc3RyaW5nLCB0b0lkOiBzdHJpbmcsIGF0dHJzOiBhbnkpIHtcbiAgICBsZXQgZiA9IGZvcndhcmQuZ2V0KGZyb21JZCk7XG4gICAgaWYgKCFmKSB7XG4gICAgICBmID0gW107XG4gICAgICBmb3J3YXJkLnNldChmcm9tSWQsIGYpO1xuICAgIH1cbiAgICBsZXQgYiA9IGJhY2t3YXJkLmdldCh0b0lkKTtcbiAgICBpZiAoIWIpIHtcbiAgICAgIGIgPSBbXTtcbiAgICAgIGJhY2t3YXJkLnNldCh0b0lkLCBiKTtcbiAgICB9XG5cbiAgICAvLyBCZWhhdmVzIGxpa2UgYSBzZXQsIG9ubHkgYWRkIG5ldyByZWxhdGlvbnNoaXAgaWYgaXQgaXMgc3RydWN0dXJhbGx5IGRpc3RpbmN0XG4gICAgY29uc3QgZm9yd2FyZFJlbCA9IHsgJGlkOiB0b0lkLCAuLi5hdHRycyB9O1xuICAgIGNvbnN0IGZvcndhcmRSZWxTdHIgPSBKU09OLnN0cmluZ2lmeShmb3J3YXJkUmVsKTtcbiAgICBjb25zdCBleGlzdGluZ1JlbGF0aW9uc2hpcCA9IGYuZmluZCgoeCkgPT4gSlNPTi5zdHJpbmdpZnkoeCkgPT09IGZvcndhcmRSZWxTdHIpO1xuXG4gICAgaWYgKCFleGlzdGluZ1JlbGF0aW9uc2hpcCkge1xuICAgICAgZi5wdXNoKGZvcndhcmRSZWwpO1xuICAgICAgYi5wdXNoKHsgJGlkOiBmcm9tSWQsIC4uLmF0dHJzIH0pO1xuICAgIH1cbiAgfVxuXG4gIHJldHVybiB7XG4gICAgdHlwZTogJ3JlbCcsXG4gICAgZnJvbUNvbGw6IGZyb21GaWVsZCxcbiAgICB0b0NvbGw6IHRvRmllbGQsXG4gICAgZm9yd2FyZCxcbiAgICBiYWNrd2FyZCxcbiAgICBhZGQoZnJvbTogRW50aXR5LCB0bzogRW50aXR5LCBhdHRyaWJ1dGVzOiBhbnkpIHtcbiAgICAgIGFkZChmcm9tLiRpZCwgdG8uJGlkLCBhdHRyaWJ1dGVzKTtcbiAgICB9LFxuICAgIGRlaHlkcmF0ZSgpOiBhbnkge1xuICAgICAgcmV0dXJuIHtcbiAgICAgICAgdHlwZTogJ3JlbCcsXG4gICAgICAgIGZvcndhcmQ6IE9iamVjdC5mcm9tRW50cmllcyhmb3J3YXJkLmVudHJpZXMoKSksXG4gICAgICB9O1xuICAgIH0sXG4gICAgaHlkcmF0ZUZyb20oeDogYW55KTogdm9pZCB7XG4gICAgICBmb3J3YXJkLmNsZWFyKCk7XG4gICAgICBiYWNrd2FyZC5jbGVhcigpO1xuXG4gICAgICBmb3IgKGNvbnN0IFtmcm9tSWQsIHRhcmdldHNdIG9mIE9iamVjdC5lbnRyaWVzKHguZm9yd2FyZCkpIHtcbiAgICAgICAgZm9yIChjb25zdCB0YXJnZXQgb2YgdGFyZ2V0cyBhcyBBcnJheTxSZWw8YW55Pj4pIHtcbiAgICAgICAgICBhZGQoZnJvbUlkLCB0YXJnZXQuJGlkLCByZW1vdmVJZCh0YXJnZXQpKTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH0sXG4gIH07XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBpc1JlbGF0aW9uc2hpcENvbGxlY3Rpb24oeDogdW5rbm93bik6IHggaXMgUmVsYXRpb25zaGlwQ29sbGVjdGlvbjxhbnk+IHtcbiAgcmV0dXJuIHR5cGVvZiB4ID09PSAnb2JqZWN0JyAmJiAhIXggJiYgKHggYXMgYW55KS50eXBlID09PSAncmVsJztcbn1cblxuZnVuY3Rpb24gcmVtb3ZlSWQ8QSBleHRlbmRzIG9iamVjdD4oeDogQSk6IE9taXQ8QSwgJyRpZCc+IHtcbiAgY29uc3QgcmV0ID0geyAuLi54IH07XG4gIGRlbGV0ZSAocmV0IGFzIGFueSkuJGlkO1xuICByZXR1cm4gcmV0O1xufVxuIl19","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.liftUndefined = exports.liftResult = exports.locateFailure = exports.chain = exports.using = exports.tryCatch = exports.assertSuccess = exports.errorFrom = exports.errorMessage = exports.unpackOr = exports.unpack = exports.isSuccess = exports.isFailure = exports.failure = void 0;\n// Ensures you must use `fail()` to construct an instance of type Failure\nconst errorSym = Symbol('error');\nfunction mkLocate(prefix) {\n const ret = (error) => failure(`${prefix}: ${error}`);\n ret.in = (prefix2) => mkLocate(`${prefix}: ${prefix2}`);\n ret.locate = locateFailure(prefix);\n return ret;\n}\nfunction failure(error) {\n return { [errorSym]: error };\n}\nexports.failure = failure;\nfailure.in = (prefix) => mkLocate(prefix);\nfailure.locate = (x) => x;\nfunction isFailure(x) {\n return !!x && typeof x === 'object' && x[errorSym];\n}\nexports.isFailure = isFailure;\nfunction isSuccess(x) {\n return !isFailure(x);\n}\nexports.isSuccess = isSuccess;\nfunction unpack(x) {\n if (isFailure(x)) {\n throw new Error(`unpack: ${x[errorSym]}`);\n }\n return x;\n}\nexports.unpack = unpack;\nfunction unpackOr(x, def) {\n return (isFailure(x) ? def : x);\n}\nexports.unpackOr = unpackOr;\nfunction errorMessage(x) {\n return x[errorSym];\n}\nexports.errorMessage = errorMessage;\nfunction errorFrom(x) {\n return new Error(errorMessage(x));\n}\nexports.errorFrom = errorFrom;\nfunction assertSuccess(x) {\n if (isFailure(x)) {\n throw errorFrom(x);\n }\n}\nexports.assertSuccess = assertSuccess;\nfunction tryCatch(failOrBlock, maybeBlock) {\n const block = (maybeBlock !== null && maybeBlock !== void 0 ? maybeBlock : failOrBlock);\n const f = (maybeBlock ? failOrBlock : failure);\n try {\n return block();\n }\n catch (e) {\n return f(`Error: ${e.message}\\n${e.stack}`);\n }\n}\nexports.tryCatch = tryCatch;\nfunction using(value, block) {\n if (isFailure(value)) {\n return value;\n }\n return block(value);\n}\nexports.using = using;\nfunction chain(value, ...fns) {\n for (const fn of fns) {\n if (isFailure(value)) {\n return value;\n }\n value = fn(value);\n }\n return value;\n}\nexports.chain = chain;\n/* eslint-enable prettier/prettier */\n/**\n * Make a function that will prepend a prefix to error messages\n *\n * This is one way to be specific about the location where errors originate, by prefixing\n * errors as the call stack unwinds.\n *\n * A different method is to pass in a modified failure function using `failure.in(...)`,\n * to build the error message as the call stack deepens.\n */\nfunction locateFailure(prefix) {\n return (x) => (isFailure(x) ? failure(`${prefix}: ${x[errorSym]}`) : x);\n}\nexports.locateFailure = locateFailure;\nfunction liftResult(xs) {\n const failures = Array.isArray(xs) ? xs.filter(isFailure) : Object.values(xs).filter(isFailure);\n if (failures.length > 0) {\n return failure(failures.map(errorMessage).join(', '));\n }\n return xs;\n}\nexports.liftResult = liftResult;\nfunction liftUndefined(valueOrFunction) {\n if (typeof valueOrFunction === 'function') {\n return (...args) => {\n const value = valueOrFunction(...args);\n return value !== undefined ? value : failure('value is undefined');\n };\n }\n return valueOrFunction !== undefined ? valueOrFunction : failure('value is undefined');\n}\nexports.liftUndefined = liftUndefined;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVzdWx0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL3Jlc3VsdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSx5RUFBeUU7QUFDekUsTUFBTSxRQUFRLEdBQUcsTUFBTSxDQUFDLE9BQU8sQ0FBQyxDQUFDO0FBYWpDLFNBQVMsUUFBUSxDQUFDLE1BQWM7SUFDOUIsTUFBTSxHQUFHLEdBQVMsQ0FBQyxLQUFhLEVBQUUsRUFBRSxDQUFDLE9BQU8sQ0FBQyxHQUFHLE1BQU0sS0FBSyxLQUFLLEVBQUUsQ0FBQyxDQUFDO0lBQ3BFLEdBQUcsQ0FBQyxFQUFFLEdBQUcsQ0FBQyxPQUFlLEVBQUUsRUFBRSxDQUFDLFFBQVEsQ0FBQyxHQUFHLE1BQU0sS0FBSyxPQUFPLEVBQUUsQ0FBQyxDQUFDO0lBQ2hFLEdBQUcsQ0FBQyxNQUFNLEdBQUcsYUFBYSxDQUFDLE1BQU0sQ0FBQyxDQUFDO0lBQ25DLE9BQU8sR0FBRyxDQUFDO0FBQ2IsQ0FBQztBQUlELFNBQWdCLE9BQU8sQ0FBQyxLQUFhO0lBQ25DLE9BQU8sRUFBRSxDQUFDLFFBQVEsQ0FBQyxFQUFFLEtBQUssRUFBRSxDQUFDO0FBQy9CLENBQUM7QUFGRCwwQkFFQztBQUNELE9BQU8sQ0FBQyxFQUFFLEdBQUcsQ0FBQyxNQUFjLEVBQUUsRUFBRSxDQUFDLFFBQVEsQ0FBQyxNQUFNLENBQUMsQ0FBQztBQUNsRCxPQUFPLENBQUMsTUFBTSxHQUFHLENBQUksQ0FBWSxFQUFFLEVBQUUsQ0FBQyxDQUFDLENBQUM7QUFFeEMsU0FBZ0IsU0FBUyxDQUFJLENBQVk7SUFDdkMsT0FBTyxDQUFDLENBQUMsQ0FBQyxJQUFJLE9BQU8sQ0FBQyxLQUFLLFFBQVEsSUFBSyxDQUFTLENBQUMsUUFBUSxDQUFDLENBQUM7QUFDOUQsQ0FBQztBQUZELDhCQUVDO0FBRUQsU0FBZ0IsU0FBUyxDQUFJLENBQVk7SUFDdkMsT0FBTyxDQUFDLFNBQVMsQ0FBQyxDQUFDLENBQUMsQ0FBQztBQUN2QixDQUFDO0FBRkQsOEJBRUM7QUFFRCxTQUFnQixNQUFNLENBQUksQ0FBWTtJQUNwQyxJQUFJLFNBQVMsQ0FBQyxDQUFDLENBQUMsRUFBRTtRQUNoQixNQUFNLElBQUksS0FBSyxDQUFDLFdBQVcsQ0FBQyxDQUFDLFFBQVEsQ0FBQyxFQUFFLENBQUMsQ0FBQztLQUMzQztJQUNELE9BQU8sQ0FBQyxDQUFDO0FBQ1gsQ0FBQztBQUxELHdCQUtDO0FBRUQsU0FBZ0IsUUFBUSxDQUFPLENBQVksRUFBRSxHQUFNO0lBQ2pELE9BQU8sQ0FBQyxTQUFTLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFRLENBQUM7QUFDekMsQ0FBQztBQUZELDRCQUVDO0FBRUQsU0FBZ0IsWUFBWSxDQUFDLENBQVU7SUFDckMsT0FBTyxDQUFDLENBQUMsUUFBUSxDQUFDLENBQUM7QUFDckIsQ0FBQztBQUZELG9DQUVDO0FBRUQsU0FBZ0IsU0FBUyxDQUFDLENBQVU7SUFDbEMsT0FBTyxJQUFJLEtBQUssQ0FBQyxZQUFZLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQztBQUNwQyxDQUFDO0FBRkQsOEJBRUM7QUFJRCxTQUFnQixhQUFhLENBQUMsQ0FBVTtJQUN0QyxJQUFJLFNBQVMsQ0FBQyxDQUFDLENBQUMsRUFBRTtRQUNoQixNQUFNLFNBQVMsQ0FBQyxDQUFDLENBQUMsQ0FBQztLQUNwQjtBQUNILENBQUM7QUFKRCxzQ0FJQztBQUlELFNBQWdCLFFBQVEsQ0FBSSxXQUE2QixFQUFFLFVBQW9CO0lBQzdFLE1BQU0sS0FBSyxHQUFZLENBQUMsVUFBVSxhQUFWLFVBQVUsY0FBVixVQUFVLEdBQUksV0FBVyxDQUFRLENBQUM7SUFDMUQsTUFBTSxDQUFDLEdBQVMsQ0FBQyxVQUFVLENBQUMsQ0FBQyxDQUFDLFdBQVcsQ0FBQyxDQUFDLENBQUMsT0FBTyxDQUFRLENBQUM7SUFFNUQsSUFBSTtRQUNGLE9BQU8sS0FBSyxFQUFFLENBQUM7S0FDaEI7SUFBQyxPQUFPLENBQU0sRUFBRTtRQUNmLE9BQU8sQ0FBQyxDQUFDLFVBQVUsQ0FBQyxDQUFDLE9BQU8sS0FBSyxDQUFDLENBQUMsS0FBSyxFQUFFLENBQUMsQ0FBQztLQUM3QztBQUNILENBQUM7QUFURCw0QkFTQztBQUVELFNBQWdCLEtBQUssQ0FBTyxLQUFnQixFQUFFLEtBQTBCO0lBQ3RFLElBQUksU0FBUyxDQUFDLEtBQUssQ0FBQyxFQUFFO1FBQ3BCLE9BQU8sS0FBSyxDQUFDO0tBQ2Q7SUFDRCxPQUFPLEtBQUssQ0FBQyxLQUFLLENBQUMsQ0FBQztBQUN0QixDQUFDO0FBTEQsc0JBS0M7QUFZRCxTQUFnQixLQUFLLENBQUMsS0FBa0IsRUFBRSxHQUFHLEdBQW1DO0lBQzlFLEtBQUssTUFBTSxFQUFFLElBQUksR0FBRyxFQUFFO1FBQ3BCLElBQUksU0FBUyxDQUFDLEtBQUssQ0FBQyxFQUFFO1lBQ3BCLE9BQU8sS0FBSyxDQUFDO1NBQ2Q7UUFDRCxLQUFLLEdBQUcsRUFBRSxDQUFDLEtBQUssQ0FBQyxDQUFDO0tBQ25CO0lBQ0QsT0FBTyxLQUFLLENBQUM7QUFDZixDQUFDO0FBUkQsc0JBUUM7QUFDRCxxQ0FBcUM7QUFFckM7Ozs7Ozs7O0dBUUc7QUFDSCxTQUFnQixhQUFhLENBQUMsTUFBYztJQUMxQyxPQUFPLENBQUksQ0FBWSxFQUFhLEVBQUUsQ0FBQyxDQUFDLFNBQVMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsT0FBTyxDQUFDLEdBQUcsTUFBTSxLQUFLLENBQUMsQ0FBQyxRQUFRLENBQUMsRUFBRSxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDO0FBQ25HLENBQUM7QUFGRCxzQ0FFQztBQU1ELFNBQWdCLFVBQVUsQ0FDeEIsRUFBZ0Q7SUFFaEQsTUFBTSxRQUFRLEdBQUcsS0FBSyxDQUFDLE9BQU8sQ0FBQyxFQUFFLENBQUMsQ0FBQyxDQUFDLENBQUMsRUFBRSxDQUFDLE1BQU0sQ0FBQyxTQUFTLENBQUMsQ0FBQyxDQUFDLENBQUMsTUFBTSxDQUFDLE1BQU0sQ0FBQyxFQUFFLENBQUMsQ0FBQyxNQUFNLENBQUMsU0FBUyxDQUFDLENBQUM7SUFDaEcsSUFBSSxRQUFRLENBQUMsTUFBTSxHQUFHLENBQUMsRUFBRTtRQUN2QixPQUFPLE9BQU8sQ0FBQyxRQUFRLENBQUMsR0FBRyxDQUFDLFlBQVksQ0FBQyxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsQ0FBQyxDQUFDO0tBQ3ZEO0lBQ0QsT0FBTyxFQUFTLENBQUM7QUFDbkIsQ0FBQztBQVJELGdDQVFDO0FBT0QsU0FBZ0IsYUFBYSxDQUFDLGVBQW9CO0lBQ2hELElBQUksT0FBTyxlQUFlLEtBQUssVUFBVSxFQUFFO1FBQ3pDLE9BQU8sQ0FBQyxHQUFHLElBQVcsRUFBRSxFQUFFO1lBQ3hCLE1BQU0sS0FBSyxHQUFHLGVBQWUsQ0FBQyxHQUFHLElBQUksQ0FBQyxDQUFDO1lBQ3ZDLE9BQU8sS0FBSyxLQUFLLFNBQVMsQ0FBQyxDQUFDLENBQUMsS0FBSyxDQUFDLENBQUMsQ0FBQyxPQUFPLENBQUMsb0JBQW9CLENBQUMsQ0FBQztRQUNyRSxDQUFDLENBQUM7S0FDSDtJQUNELE9BQU8sZUFBZSxLQUFLLFNBQVMsQ0FBQyxDQUFDLENBQUMsZUFBZSxDQUFDLENBQUMsQ0FBQyxPQUFPLENBQUMsb0JBQW9CLENBQUMsQ0FBQztBQUN6RixDQUFDO0FBUkQsc0NBUUMiLCJzb3VyY2VzQ29udGVudCI6WyIvLyBFbnN1cmVzIHlvdSBtdXN0IHVzZSBgZmFpbCgpYCB0byBjb25zdHJ1Y3QgYW4gaW5zdGFuY2Ugb2YgdHlwZSBGYWlsdXJlXG5jb25zdCBlcnJvclN5bSA9IFN5bWJvbCgnZXJyb3InKTtcblxuZXhwb3J0IHR5cGUgUmVzdWx0PEE+ID0gQSB8IEZhaWx1cmU7XG5leHBvcnQgaW50ZXJmYWNlIEZhaWx1cmUge1xuICByZWFkb25seSBbZXJyb3JTeW1dOiBzdHJpbmc7XG59XG5cbmV4cG9ydCBpbnRlcmZhY2UgRmFpbCB7XG4gIChlcnJvcjogc3RyaW5nKTogRmFpbHVyZTtcbiAgaW4ocHJlZml4OiBzdHJpbmcpOiBGYWlsO1xuICBsb2NhdGU8QT4oeDogUmVzdWx0PEE+KTogUmVzdWx0PEE+O1xufVxuXG5mdW5jdGlvbiBta0xvY2F0ZShwcmVmaXg6IHN0cmluZyk6IEZhaWwge1xuICBjb25zdCByZXQ6IEZhaWwgPSAoZXJyb3I6IHN0cmluZykgPT4gZmFpbHVyZShgJHtwcmVmaXh9OiAke2Vycm9yfWApO1xuICByZXQuaW4gPSAocHJlZml4Mjogc3RyaW5nKSA9PiBta0xvY2F0ZShgJHtwcmVmaXh9OiAke3ByZWZpeDJ9YCk7XG4gIHJldC5sb2NhdGUgPSBsb2NhdGVGYWlsdXJlKHByZWZpeCk7XG4gIHJldHVybiByZXQ7XG59XG5cbmV4cG9ydCBpbnRlcmZhY2UgZmFpbHVyZSBleHRlbmRzIEZhaWwge31cblxuZXhwb3J0IGZ1bmN0aW9uIGZhaWx1cmUoZXJyb3I6IHN0cmluZyk6IEZhaWx1cmUge1xuICByZXR1cm4geyBbZXJyb3JTeW1dOiBlcnJvciB9O1xufVxuZmFpbHVyZS5pbiA9IChwcmVmaXg6IHN0cmluZykgPT4gbWtMb2NhdGUocHJlZml4KTtcbmZhaWx1cmUubG9jYXRlID0gPEE+KHg6IFJlc3VsdDxBPikgPT4geDtcblxuZXhwb3J0IGZ1bmN0aW9uIGlzRmFpbHVyZTxBPih4OiBSZXN1bHQ8QT4pOiB4IGlzIEZhaWx1cmUge1xuICByZXR1cm4gISF4ICYmIHR5cGVvZiB4ID09PSAnb2JqZWN0JyAmJiAoeCBhcyBhbnkpW2Vycm9yU3ltXTtcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIGlzU3VjY2VzczxBPih4OiBSZXN1bHQ8QT4pOiB4IGlzIEEge1xuICByZXR1cm4gIWlzRmFpbHVyZSh4KTtcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIHVucGFjazxBPih4OiBSZXN1bHQ8QT4pOiBBIHtcbiAgaWYgKGlzRmFpbHVyZSh4KSkge1xuICAgIHRocm93IG5ldyBFcnJvcihgdW5wYWNrOiAke3hbZXJyb3JTeW1dfWApO1xuICB9XG4gIHJldHVybiB4O1xufVxuXG5leHBvcnQgZnVuY3Rpb24gdW5wYWNrT3I8QSwgQj4oeDogUmVzdWx0PEE+LCBkZWY6IEIpOiBCIGV4dGVuZHMgQSA/IEEgOiBBIHwgQiB7XG4gIHJldHVybiAoaXNGYWlsdXJlKHgpID8gZGVmIDogeCkgYXMgYW55O1xufVxuXG5leHBvcnQgZnVuY3Rpb24gZXJyb3JNZXNzYWdlKHg6IEZhaWx1cmUpOiBzdHJpbmcge1xuICByZXR1cm4geFtlcnJvclN5bV07XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBlcnJvckZyb20oeDogRmFpbHVyZSk6IEVycm9yIHtcbiAgcmV0dXJuIG5ldyBFcnJvcihlcnJvck1lc3NhZ2UoeCkpO1xufVxuXG5leHBvcnQgZnVuY3Rpb24gYXNzZXJ0U3VjY2VzczxBPih4OiBSZXN1bHQ8QT4pOiBhc3NlcnRzIHggaXMgQTtcbmV4cG9ydCBmdW5jdGlvbiBhc3NlcnRTdWNjZXNzKHg6IEZhaWx1cmUpOiBuZXZlcjtcbmV4cG9ydCBmdW5jdGlvbiBhc3NlcnRTdWNjZXNzKHg6IEZhaWx1cmUpOiB2b2lkIHtcbiAgaWYgKGlzRmFpbHVyZSh4KSkge1xuICAgIHRocm93IGVycm9yRnJvbSh4KTtcbiAgfVxufVxuXG5leHBvcnQgZnVuY3Rpb24gdHJ5Q2F0Y2g8QT4oYmxvY2s6ICgpID0+IEEpOiBSZXN1bHQ8QT47XG5leHBvcnQgZnVuY3Rpb24gdHJ5Q2F0Y2g8QT4oZmFpbEZuOiBGYWlsLCBibG9jazogKCkgPT4gQSk6IFJlc3VsdDxBPjtcbmV4cG9ydCBmdW5jdGlvbiB0cnlDYXRjaDxBPihmYWlsT3JCbG9jazogRmFpbCB8ICgoKSA9PiBBKSwgbWF5YmVCbG9jaz86ICgpID0+IEEpOiBSZXN1bHQ8QT4ge1xuICBjb25zdCBibG9jazogKCkgPT4gQSA9IChtYXliZUJsb2NrID8/IGZhaWxPckJsb2NrKSBhcyBhbnk7XG4gIGNvbnN0IGY6IEZhaWwgPSAobWF5YmVCbG9jayA/IGZhaWxPckJsb2NrIDogZmFpbHVyZSkgYXMgYW55O1xuXG4gIHRyeSB7XG4gICAgcmV0dXJuIGJsb2NrKCk7XG4gIH0gY2F0Y2ggKGU6IGFueSkge1xuICAgIHJldHVybiBmKGBFcnJvcjogJHtlLm1lc3NhZ2V9XFxuJHtlLnN0YWNrfWApO1xuICB9XG59XG5cbmV4cG9ydCBmdW5jdGlvbiB1c2luZzxBLCBCPih2YWx1ZTogUmVzdWx0PEE+LCBibG9jazogKHg6IEEpID0+IFJlc3VsdDxCPik6IFJlc3VsdDxCPiB7XG4gIGlmIChpc0ZhaWx1cmUodmFsdWUpKSB7XG4gICAgcmV0dXJuIHZhbHVlO1xuICB9XG4gIHJldHVybiBibG9jayh2YWx1ZSk7XG59XG5cbi8qKlxuICogTGlrZSAndXNpbmcnLCBidXQgY2FuIHRha2UgYW55IG51bWJlciBvZiBmdW5jdGlvbnNcbiAqL1xuLyogZXNsaW50LWRpc2FibGUgcHJldHRpZXIvcHJldHRpZXIgKi9cbmV4cG9ydCBmdW5jdGlvbiBjaGFpbjxBLCBCPih2YWx1ZTogUmVzdWx0PEE+LCBiMDogKHg6IEEpID0+IFJlc3VsdDxCPik6IFJlc3VsdDxCPjtcbmV4cG9ydCBmdW5jdGlvbiBjaGFpbjxBLCBCLCBDPih2YWx1ZTogUmVzdWx0PEE+LCBiMDogKHg6IEEpID0+IFJlc3VsdDxCPiwgYjE6ICh4OiBCKSA9PiBSZXN1bHQ8Qz4pOiBSZXN1bHQ8Qz47XG5leHBvcnQgZnVuY3Rpb24gY2hhaW48QSwgQiwgQywgRD4odmFsdWU6IFJlc3VsdDxBPiwgYjA6ICh4OiBBKSA9PiBSZXN1bHQ8Qj4sIGIxOiAoeDogQikgPT4gUmVzdWx0PEM+LCBiMjogKHg6IEMpID0+IFJlc3VsdDxEPik6IFJlc3VsdDxEPjtcbmV4cG9ydCBmdW5jdGlvbiBjaGFpbjxBLCBCLCBDLCBELCBFPih2YWx1ZTogUmVzdWx0PEE+LCBiMDogKHg6IEEpID0+IFJlc3VsdDxCPiwgYjE6ICh4OiBCKSA9PiBSZXN1bHQ8Qz4sIGIyOiAoeDogQykgPT4gUmVzdWx0PEQ+LCBiMzogKHg6IEQpID0+IFJlc3VsdDxFPik6IFJlc3VsdDxFPjtcbmV4cG9ydCBmdW5jdGlvbiBjaGFpbjxBLCBCLCBDLCBELCBFLCBGPih2YWx1ZTogUmVzdWx0PEE+LCBiMDogKHg6IEEpID0+IFJlc3VsdDxCPiwgYjE6ICh4OiBCKSA9PiBSZXN1bHQ8Qz4sIGIyOiAoeDogQykgPT4gUmVzdWx0PEQ+LCBiMzogKHg6IEQpID0+IFJlc3VsdDxFPiwgYjQ6ICh4OiBFKSA9PiBSZXN1bHQ8Rj4pOiBSZXN1bHQ8Rj47XG5leHBvcnQgZnVuY3Rpb24gY2hhaW48QSwgQiwgQywgRCwgRSwgRiwgRz4odmFsdWU6IFJlc3VsdDxBPiwgYjA6ICh4OiBBKSA9PiBSZXN1bHQ8Qj4sIGIxOiAoeDogQikgPT4gUmVzdWx0PEM+LCBiMjogKHg6IEMpID0+IFJlc3VsdDxEPiwgYjM6ICh4OiBEKSA9PiBSZXN1bHQ8RT4sIGI0OiAoeDogRSkgPT4gUmVzdWx0PEY+LCBiNTogKHg6IEYpID0+IFJlc3VsdDxHPik6IFJlc3VsdDxHPjtcbmV4cG9ydCBmdW5jdGlvbiBjaGFpbih2YWx1ZTogUmVzdWx0PGFueT4sIC4uLmZuczogQXJyYXk8KHg6IGFueSkgPT4gUmVzdWx0PGFueT4+KTogUmVzdWx0PGFueT4ge1xuICBmb3IgKGNvbnN0IGZuIG9mIGZucykge1xuICAgIGlmIChpc0ZhaWx1cmUodmFsdWUpKSB7XG4gICAgICByZXR1cm4gdmFsdWU7XG4gICAgfVxuICAgIHZhbHVlID0gZm4odmFsdWUpO1xuICB9XG4gIHJldHVybiB2YWx1ZTtcbn1cbi8qIGVzbGludC1lbmFibGUgcHJldHRpZXIvcHJldHRpZXIgKi9cblxuLyoqXG4gKiBNYWtlIGEgZnVuY3Rpb24gdGhhdCB3aWxsIHByZXBlbmQgYSBwcmVmaXggdG8gZXJyb3IgbWVzc2FnZXNcbiAqXG4gKiBUaGlzIGlzIG9uZSB3YXkgdG8gYmUgc3BlY2lmaWMgYWJvdXQgdGhlIGxvY2F0aW9uIHdoZXJlIGVycm9ycyBvcmlnaW5hdGUsIGJ5IHByZWZpeGluZ1xuICogZXJyb3JzIGFzIHRoZSBjYWxsIHN0YWNrIHVud2luZHMuXG4gKlxuICogQSBkaWZmZXJlbnQgbWV0aG9kIGlzIHRvIHBhc3MgaW4gYSBtb2RpZmllZCBmYWlsdXJlIGZ1bmN0aW9uIHVzaW5nIGBmYWlsdXJlLmluKC4uLilgLFxuICogdG8gYnVpbGQgdGhlIGVycm9yIG1lc3NhZ2UgYXMgdGhlIGNhbGwgc3RhY2sgZGVlcGVucy5cbiAqL1xuZXhwb3J0IGZ1bmN0aW9uIGxvY2F0ZUZhaWx1cmUocHJlZml4OiBzdHJpbmcpIHtcbiAgcmV0dXJuIDxBPih4OiBSZXN1bHQ8QT4pOiBSZXN1bHQ8QT4gPT4gKGlzRmFpbHVyZSh4KSA/IGZhaWx1cmUoYCR7cHJlZml4fTogJHt4W2Vycm9yU3ltXX1gKSA6IHgpO1xufVxuXG5leHBvcnQgdHlwZSBGYWlsdXJlcyA9IEFycmF5PEZhaWx1cmU+O1xuXG5leHBvcnQgZnVuY3Rpb24gbGlmdFJlc3VsdDxBPih4czogUmVjb3JkPHN0cmluZywgUmVzdWx0PEE+Pik6IFJlc3VsdDxSZWNvcmQ8c3RyaW5nLCBBPj47XG5leHBvcnQgZnVuY3Rpb24gbGlmdFJlc3VsdDxBPih4czogQXJyYXk8UmVzdWx0PEE+Pik6IFJlc3VsdDxBcnJheTxBPj47XG5leHBvcnQgZnVuY3Rpb24gbGlmdFJlc3VsdDxBPihcbiAgeHM6IFJlY29yZDxzdHJpbmcsIFJlc3VsdDxBPj4gfCBBcnJheTxSZXN1bHQ8QT4+LFxuKTogUmVzdWx0PFJlY29yZDxzdHJpbmcsIEE+PiB8IFJlc3VsdDxBcnJheTxBPj4ge1xuICBjb25zdCBmYWlsdXJlcyA9IEFycmF5LmlzQXJyYXkoeHMpID8geHMuZmlsdGVyKGlzRmFpbHVyZSkgOiBPYmplY3QudmFsdWVzKHhzKS5maWx0ZXIoaXNGYWlsdXJlKTtcbiAgaWYgKGZhaWx1cmVzLmxlbmd0aCA+IDApIHtcbiAgICByZXR1cm4gZmFpbHVyZShmYWlsdXJlcy5tYXAoZXJyb3JNZXNzYWdlKS5qb2luKCcsICcpKTtcbiAgfVxuICByZXR1cm4geHMgYXMgYW55O1xufVxuXG4vKipcbiAqIExpZnQgYSB2YWx1ZSB0aGF0IGNhbiBiZSAndW5kZWZpbmVkJyB0byBhIHJlc3VsdCwgb3IgYSBmdW5jdGlvbiB0aGF0IGNhbiByZXR1cm4gdW5kZWZpbmVkLlxuICovXG5leHBvcnQgZnVuY3Rpb24gbGlmdFVuZGVmaW5lZDxBPih2OiBBIHwgdW5kZWZpbmVkKTogUmVzdWx0PE5vbk51bGxhYmxlPEE+PjtcbmV4cG9ydCBmdW5jdGlvbiBsaWZ0VW5kZWZpbmVkPEEsIEYgZXh0ZW5kcyAoLi4uYXJnczogYW55W10pID0+IEE+KHY6IEYpOiAoeDogUGFyYW1ldGVyczxGPikgPT4gUmVzdWx0PE5vbk51bGxhYmxlPEE+PjtcbmV4cG9ydCBmdW5jdGlvbiBsaWZ0VW5kZWZpbmVkKHZhbHVlT3JGdW5jdGlvbjogYW55KTogYW55IHtcbiAgaWYgKHR5cGVvZiB2YWx1ZU9yRnVuY3Rpb24gPT09ICdmdW5jdGlvbicpIHtcbiAgICByZXR1cm4gKC4uLmFyZ3M6IGFueVtdKSA9PiB7XG4gICAgICBjb25zdCB2YWx1ZSA9IHZhbHVlT3JGdW5jdGlvbiguLi5hcmdzKTtcbiAgICAgIHJldHVybiB2YWx1ZSAhPT0gdW5kZWZpbmVkID8gdmFsdWUgOiBmYWlsdXJlKCd2YWx1ZSBpcyB1bmRlZmluZWQnKTtcbiAgICB9O1xuICB9XG4gIHJldHVybiB2YWx1ZU9yRnVuY3Rpb24gIT09IHVuZGVmaW5lZCA/IHZhbHVlT3JGdW5jdGlvbiA6IGZhaWx1cmUoJ3ZhbHVlIGlzIHVuZGVmaW5lZCcpO1xufVxuIl19","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.sortedMap = void 0;\n/**\n * A sorted map that may contain the same key multiple times\n *\n * Stored as a sorted array of [key, value] pairs, using binary search to locate\n * entries.\n */\nvar sortedMap;\n(function (sortedMap) {\n function add(map, cmp, key, value) {\n const i = lowerBound(map, cmp, key);\n map.splice(i, 0, [key, value]);\n }\n sortedMap.add = add;\n function find(map, cmp, key) {\n const i = lowerBound(map, cmp, key);\n if (i === map.length) {\n return undefined;\n }\n const [foundKey, value] = map[i];\n return cmp(foundKey, key) === 0 ? value : undefined;\n }\n sortedMap.find = find;\n function findAll(map, cmp, key) {\n let i = lowerBound(map, cmp, key);\n const ret = [];\n while (i < map.length && cmp(map[i][0], key) === 0) {\n ret.push(map[i][1]);\n i += 1;\n }\n return ret;\n }\n sortedMap.findAll = findAll;\n /**\n * Return the index to the first element in the the sorted map\n *\n * @see https://en.cppreference.com/w/cpp/algorithm/lower_bound#Version_2\n */\n function lowerBound(map, cmp, key) {\n let first = 0;\n let count = map.length;\n while (count > 0) {\n let it = first;\n let step = Math.floor(count / 2);\n it += step;\n if (cmp(map[it][0], key) < 0) {\n first = ++it;\n count -= step + 1;\n }\n else {\n count = step;\n }\n }\n return first;\n }\n})(sortedMap = exports.sortedMap || (exports.sortedMap = {}));\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic29ydGVkLW1hcC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9zb3J0ZWQtbWFwLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUVBOzs7OztHQUtHO0FBQ0gsSUFBaUIsU0FBUyxDQXNEekI7QUF0REQsV0FBaUIsU0FBUztJQUd4QixTQUFnQixHQUFHLENBQU8sR0FBeUIsRUFBRSxHQUFrQixFQUFFLEdBQU0sRUFBRSxLQUFRO1FBQ3ZGLE1BQU0sQ0FBQyxHQUFHLFVBQVUsQ0FBQyxHQUFHLEVBQUUsR0FBRyxFQUFFLEdBQUcsQ0FBQyxDQUFDO1FBQ3BDLEdBQUcsQ0FBQyxNQUFNLENBQUMsQ0FBQyxFQUFFLENBQUMsRUFBRSxDQUFDLEdBQUcsRUFBRSxLQUFLLENBQUMsQ0FBQyxDQUFDO0lBQ2pDLENBQUM7SUFIZSxhQUFHLE1BR2xCLENBQUE7SUFFRCxTQUFnQixJQUFJLENBQU8sR0FBeUIsRUFBRSxHQUFrQixFQUFFLEdBQU07UUFDOUUsTUFBTSxDQUFDLEdBQUcsVUFBVSxDQUFDLEdBQUcsRUFBRSxHQUFHLEVBQUUsR0FBRyxDQUFDLENBQUM7UUFDcEMsSUFBSSxDQUFDLEtBQUssR0FBRyxDQUFDLE1BQU0sRUFBRTtZQUNwQixPQUFPLFNBQVMsQ0FBQztTQUNsQjtRQUVELE1BQU0sQ0FBQyxRQUFRLEVBQUUsS0FBSyxDQUFDLEdBQUcsR0FBRyxDQUFDLENBQUMsQ0FBQyxDQUFDO1FBQ2pDLE9BQU8sR0FBRyxDQUFDLFFBQVEsRUFBRSxHQUFHLENBQUMsS0FBSyxDQUFDLENBQUMsQ0FBQyxDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUMsU0FBUyxDQUFDO0lBQ3RELENBQUM7SUFSZSxjQUFJLE9BUW5CLENBQUE7SUFFRCxTQUFnQixPQUFPLENBQU8sR0FBeUIsRUFBRSxHQUFrQixFQUFFLEdBQU07UUFDakYsSUFBSSxDQUFDLEdBQUcsVUFBVSxDQUFDLEdBQUcsRUFBRSxHQUFHLEVBQUUsR0FBRyxDQUFDLENBQUM7UUFFbEMsTUFBTSxHQUFHLEdBQUcsRUFBRSxDQUFDO1FBQ2YsT0FBTyxDQUFDLEdBQUcsR0FBRyxDQUFDLE1BQU0sSUFBSSxHQUFHLENBQUMsR0FBRyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxFQUFFLEdBQUcsQ0FBQyxLQUFLLENBQUMsRUFBRTtZQUNsRCxHQUFHLENBQUMsSUFBSSxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDO1lBQ3BCLENBQUMsSUFBSSxDQUFDLENBQUM7U0FDUjtRQUVELE9BQU8sR0FBRyxDQUFDO0lBQ2IsQ0FBQztJQVZlLGlCQUFPLFVBVXRCLENBQUE7SUFFRDs7OztPQUlHO0lBQ0gsU0FBUyxVQUFVLENBQU8sR0FBeUIsRUFBRSxHQUFrQixFQUFFLEdBQU07UUFDN0UsSUFBSSxLQUFLLEdBQUcsQ0FBQyxDQUFDO1FBQ2QsSUFBSSxLQUFLLEdBQUcsR0FBRyxDQUFDLE1BQU0sQ0FBQztRQUV2QixPQUFPLEtBQUssR0FBRyxDQUFDLEVBQUU7WUFDaEIsSUFBSSxFQUFFLEdBQUcsS0FBSyxDQUFDO1lBQ2YsSUFBSSxJQUFJLEdBQUcsSUFBSSxDQUFDLEtBQUssQ0FBQyxLQUFLLEdBQUcsQ0FBQyxDQUFDLENBQUM7WUFDakMsRUFBRSxJQUFJLElBQUksQ0FBQztZQUVYLElBQUksR0FBRyxDQUFDLEdBQUcsQ0FBQyxFQUFFLENBQUMsQ0FBQyxDQUFDLENBQUMsRUFBRSxHQUFHLENBQUMsR0FBRyxDQUFDLEVBQUU7Z0JBQzVCLEtBQUssR0FBRyxFQUFFLEVBQUUsQ0FBQztnQkFDYixLQUFLLElBQUksSUFBSSxHQUFHLENBQUMsQ0FBQzthQUNuQjtpQkFBTTtnQkFDTCxLQUFLLEdBQUcsSUFBSSxDQUFDO2FBQ2Q7U0FDRjtRQUVELE9BQU8sS0FBSyxDQUFDO0lBQ2YsQ0FBQztBQUNILENBQUMsRUF0RGdCLFNBQVMsR0FBVCxpQkFBUyxLQUFULGlCQUFTLFFBc0R6QiIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCB0eXBlIFNvcnRlZE11bHRpTWFwPEEsIEI+ID0gQXJyYXk8W0EsIEJdPjtcblxuLyoqXG4gKiBBIHNvcnRlZCBtYXAgdGhhdCBtYXkgY29udGFpbiB0aGUgc2FtZSBrZXkgbXVsdGlwbGUgdGltZXNcbiAqXG4gKiBTdG9yZWQgYXMgYSBzb3J0ZWQgYXJyYXkgb2YgW2tleSwgdmFsdWVdIHBhaXJzLCB1c2luZyBiaW5hcnkgc2VhcmNoIHRvIGxvY2F0ZVxuICogZW50cmllcy5cbiAqL1xuZXhwb3J0IG5hbWVzcGFjZSBzb3J0ZWRNYXAge1xuICBleHBvcnQgdHlwZSBDb21wYXJhdG9yPEE+ID0gKGE6IEEsIGI6IEEpID0+IG51bWJlcjtcblxuICBleHBvcnQgZnVuY3Rpb24gYWRkPEEsIEI+KG1hcDogU29ydGVkTXVsdGlNYXA8QSwgQj4sIGNtcDogQ29tcGFyYXRvcjxBPiwga2V5OiBBLCB2YWx1ZTogQikge1xuICAgIGNvbnN0IGkgPSBsb3dlckJvdW5kKG1hcCwgY21wLCBrZXkpO1xuICAgIG1hcC5zcGxpY2UoaSwgMCwgW2tleSwgdmFsdWVdKTtcbiAgfVxuXG4gIGV4cG9ydCBmdW5jdGlvbiBmaW5kPEEsIEI+KG1hcDogU29ydGVkTXVsdGlNYXA8QSwgQj4sIGNtcDogQ29tcGFyYXRvcjxBPiwga2V5OiBBKTogQiB8IHVuZGVmaW5lZCB7XG4gICAgY29uc3QgaSA9IGxvd2VyQm91bmQobWFwLCBjbXAsIGtleSk7XG4gICAgaWYgKGkgPT09IG1hcC5sZW5ndGgpIHtcbiAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgfVxuXG4gICAgY29uc3QgW2ZvdW5kS2V5LCB2YWx1ZV0gPSBtYXBbaV07XG4gICAgcmV0dXJuIGNtcChmb3VuZEtleSwga2V5KSA9PT0gMCA/IHZhbHVlIDogdW5kZWZpbmVkO1xuICB9XG5cbiAgZXhwb3J0IGZ1bmN0aW9uIGZpbmRBbGw8QSwgQj4obWFwOiBTb3J0ZWRNdWx0aU1hcDxBLCBCPiwgY21wOiBDb21wYXJhdG9yPEE+LCBrZXk6IEEpOiBCW10ge1xuICAgIGxldCBpID0gbG93ZXJCb3VuZChtYXAsIGNtcCwga2V5KTtcblxuICAgIGNvbnN0IHJldCA9IFtdO1xuICAgIHdoaWxlIChpIDwgbWFwLmxlbmd0aCAmJiBjbXAobWFwW2ldWzBdLCBrZXkpID09PSAwKSB7XG4gICAgICByZXQucHVzaChtYXBbaV1bMV0pO1xuICAgICAgaSArPSAxO1xuICAgIH1cblxuICAgIHJldHVybiByZXQ7XG4gIH1cblxuICAvKipcbiAgICogUmV0dXJuIHRoZSBpbmRleCB0byB0aGUgZmlyc3QgZWxlbWVudCBpbiB0aGUgdGhlIHNvcnRlZCBtYXBcbiAgICpcbiAgICogQHNlZSBodHRwczovL2VuLmNwcHJlZmVyZW5jZS5jb20vdy9jcHAvYWxnb3JpdGhtL2xvd2VyX2JvdW5kI1ZlcnNpb25fMlxuICAgKi9cbiAgZnVuY3Rpb24gbG93ZXJCb3VuZDxBLCBCPihtYXA6IFNvcnRlZE11bHRpTWFwPEEsIEI+LCBjbXA6IENvbXBhcmF0b3I8QT4sIGtleTogQSk6IG51bWJlciB7XG4gICAgbGV0IGZpcnN0ID0gMDtcbiAgICBsZXQgY291bnQgPSBtYXAubGVuZ3RoO1xuXG4gICAgd2hpbGUgKGNvdW50ID4gMCkge1xuICAgICAgbGV0IGl0ID0gZmlyc3Q7XG4gICAgICBsZXQgc3RlcCA9IE1hdGguZmxvb3IoY291bnQgLyAyKTtcbiAgICAgIGl0ICs9IHN0ZXA7XG5cbiAgICAgIGlmIChjbXAobWFwW2l0XVswXSwga2V5KSA8IDApIHtcbiAgICAgICAgZmlyc3QgPSArK2l0O1xuICAgICAgICBjb3VudCAtPSBzdGVwICsgMTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIGNvdW50ID0gc3RlcDtcbiAgICAgIH1cbiAgICB9XG5cbiAgICByZXR1cm4gZmlyc3Q7XG4gIH1cbn1cbiJdfQ==","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// pkg/dist-src/index.js\nvar dist_src_exports = {};\n__export(dist_src_exports, {\n createTokenAuth: () => createTokenAuth\n});\nmodule.exports = __toCommonJS(dist_src_exports);\n\n// pkg/dist-src/auth.js\nvar REGEX_IS_INSTALLATION_LEGACY = /^v1\\./;\nvar REGEX_IS_INSTALLATION = /^ghs_/;\nvar REGEX_IS_USER_TO_SERVER = /^ghu_/;\nasync function auth(token) {\n const isApp = token.split(/\\./).length === 3;\n const isInstallation = REGEX_IS_INSTALLATION_LEGACY.test(token) || REGEX_IS_INSTALLATION.test(token);\n const isUserToServer = REGEX_IS_USER_TO_SERVER.test(token);\n const tokenType = isApp ? \"app\" : isInstallation ? \"installation\" : isUserToServer ? \"user-to-server\" : \"oauth\";\n return {\n type: \"token\",\n token,\n tokenType\n };\n}\n\n// pkg/dist-src/with-authorization-prefix.js\nfunction withAuthorizationPrefix(token) {\n if (token.split(/\\./).length === 3) {\n return `bearer ${token}`;\n }\n return `token ${token}`;\n}\n\n// pkg/dist-src/hook.js\nasync function hook(token, request, route, parameters) {\n const endpoint = request.endpoint.merge(\n route,\n parameters\n );\n endpoint.headers.authorization = withAuthorizationPrefix(token);\n return request(endpoint);\n}\n\n// pkg/dist-src/index.js\nvar createTokenAuth = function createTokenAuth2(token) {\n if (!token) {\n throw new Error(\"[@octokit/auth-token] No token passed to createTokenAuth\");\n }\n if (typeof token !== \"string\") {\n throw new Error(\n \"[@octokit/auth-token] Token passed to createTokenAuth is not a string\"\n );\n }\n token = token.replace(/^(token|bearer) +/i, \"\");\n return Object.assign(auth.bind(null, token), {\n hook: hook.bind(null, token)\n });\n};\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n createTokenAuth\n});\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// pkg/dist-src/index.js\nvar index_exports = {};\n__export(index_exports, {\n Octokit: () => Octokit\n});\nmodule.exports = __toCommonJS(index_exports);\nvar import_universal_user_agent = require(\"universal-user-agent\");\nvar import_before_after_hook = require(\"before-after-hook\");\nvar import_request = require(\"@octokit/request\");\nvar import_graphql = require(\"@octokit/graphql\");\nvar import_auth_token = require(\"@octokit/auth-token\");\n\n// pkg/dist-src/version.js\nvar VERSION = \"5.2.1\";\n\n// pkg/dist-src/index.js\nvar noop = () => {\n};\nvar consoleWarn = console.warn.bind(console);\nvar consoleError = console.error.bind(console);\nvar userAgentTrail = `octokit-core.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`;\nvar Octokit = class {\n static {\n this.VERSION = VERSION;\n }\n static defaults(defaults) {\n const OctokitWithDefaults = class extends this {\n constructor(...args) {\n const options = args[0] || {};\n if (typeof defaults === \"function\") {\n super(defaults(options));\n return;\n }\n super(\n Object.assign(\n {},\n defaults,\n options,\n options.userAgent && defaults.userAgent ? {\n userAgent: `${options.userAgent} ${defaults.userAgent}`\n } : null\n )\n );\n }\n };\n return OctokitWithDefaults;\n }\n static {\n this.plugins = [];\n }\n /**\n * Attach a plugin (or many) to your Octokit instance.\n *\n * @example\n * const API = Octokit.plugin(plugin1, plugin2, plugin3, ...)\n */\n static plugin(...newPlugins) {\n const currentPlugins = this.plugins;\n const NewOctokit = class extends this {\n static {\n this.plugins = currentPlugins.concat(\n newPlugins.filter((plugin) => !currentPlugins.includes(plugin))\n );\n }\n };\n return NewOctokit;\n }\n constructor(options = {}) {\n const hook = new import_before_after_hook.Collection();\n const requestDefaults = {\n baseUrl: import_request.request.endpoint.DEFAULTS.baseUrl,\n headers: {},\n request: Object.assign({}, options.request, {\n // @ts-ignore internal usage only, no need to type\n hook: hook.bind(null, \"request\")\n }),\n mediaType: {\n previews: [],\n format: \"\"\n }\n };\n requestDefaults.headers[\"user-agent\"] = options.userAgent ? `${options.userAgent} ${userAgentTrail}` : userAgentTrail;\n if (options.baseUrl) {\n requestDefaults.baseUrl = options.baseUrl;\n }\n if (options.previews) {\n requestDefaults.mediaType.previews = options.previews;\n }\n if (options.timeZone) {\n requestDefaults.headers[\"time-zone\"] = options.timeZone;\n }\n this.request = import_request.request.defaults(requestDefaults);\n this.graphql = (0, import_graphql.withCustomRequest)(this.request).defaults(requestDefaults);\n this.log = Object.assign(\n {\n debug: noop,\n info: noop,\n warn: consoleWarn,\n error: consoleError\n },\n options.log\n );\n this.hook = hook;\n if (!options.authStrategy) {\n if (!options.auth) {\n this.auth = async () => ({\n type: \"unauthenticated\"\n });\n } else {\n const auth = (0, import_auth_token.createTokenAuth)(options.auth);\n hook.wrap(\"request\", auth.hook);\n this.auth = auth;\n }\n } else {\n const { authStrategy, ...otherOptions } = options;\n const auth = authStrategy(\n Object.assign(\n {\n request: this.request,\n log: this.log,\n // we pass the current octokit instance as well as its constructor options\n // to allow for authentication strategies that return a new octokit instance\n // that shares the same internal state as the current one. The original\n // requirement for this was the \"event-octokit\" authentication strategy\n // of https://github.com/probot/octokit-auth-probot.\n octokit: this,\n octokitOptions: otherOptions\n },\n options.auth\n )\n );\n hook.wrap(\"request\", auth.hook);\n this.auth = auth;\n }\n const classConstructor = this.constructor;\n for (let i = 0; i < classConstructor.plugins.length; ++i) {\n Object.assign(this, classConstructor.plugins[i](this, options));\n }\n }\n};\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n Octokit\n});\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// pkg/dist-src/index.js\nvar dist_src_exports = {};\n__export(dist_src_exports, {\n endpoint: () => endpoint\n});\nmodule.exports = __toCommonJS(dist_src_exports);\n\n// pkg/dist-src/defaults.js\nvar import_universal_user_agent = require(\"universal-user-agent\");\n\n// pkg/dist-src/version.js\nvar VERSION = \"9.0.6\";\n\n// pkg/dist-src/defaults.js\nvar userAgent = `octokit-endpoint.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`;\nvar DEFAULTS = {\n method: \"GET\",\n baseUrl: \"https://api.github.com\",\n headers: {\n accept: \"application/vnd.github.v3+json\",\n \"user-agent\": userAgent\n },\n mediaType: {\n format: \"\"\n }\n};\n\n// pkg/dist-src/util/lowercase-keys.js\nfunction lowercaseKeys(object) {\n if (!object) {\n return {};\n }\n return Object.keys(object).reduce((newObj, key) => {\n newObj[key.toLowerCase()] = object[key];\n return newObj;\n }, {});\n}\n\n// pkg/dist-src/util/is-plain-object.js\nfunction isPlainObject(value) {\n if (typeof value !== \"object\" || value === null)\n return false;\n if (Object.prototype.toString.call(value) !== \"[object Object]\")\n return false;\n const proto = Object.getPrototypeOf(value);\n if (proto === null)\n return true;\n const Ctor = Object.prototype.hasOwnProperty.call(proto, \"constructor\") && proto.constructor;\n return typeof Ctor === \"function\" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value);\n}\n\n// pkg/dist-src/util/merge-deep.js\nfunction mergeDeep(defaults, options) {\n const result = Object.assign({}, defaults);\n Object.keys(options).forEach((key) => {\n if (isPlainObject(options[key])) {\n if (!(key in defaults))\n Object.assign(result, { [key]: options[key] });\n else\n result[key] = mergeDeep(defaults[key], options[key]);\n } else {\n Object.assign(result, { [key]: options[key] });\n }\n });\n return result;\n}\n\n// pkg/dist-src/util/remove-undefined-properties.js\nfunction removeUndefinedProperties(obj) {\n for (const key in obj) {\n if (obj[key] === void 0) {\n delete obj[key];\n }\n }\n return obj;\n}\n\n// pkg/dist-src/merge.js\nfunction merge(defaults, route, options) {\n if (typeof route === \"string\") {\n let [method, url] = route.split(\" \");\n options = Object.assign(url ? { method, url } : { url: method }, options);\n } else {\n options = Object.assign({}, route);\n }\n options.headers = lowercaseKeys(options.headers);\n removeUndefinedProperties(options);\n removeUndefinedProperties(options.headers);\n const mergedOptions = mergeDeep(defaults || {}, options);\n if (options.url === \"/graphql\") {\n if (defaults && defaults.mediaType.previews?.length) {\n mergedOptions.mediaType.previews = defaults.mediaType.previews.filter(\n (preview) => !mergedOptions.mediaType.previews.includes(preview)\n ).concat(mergedOptions.mediaType.previews);\n }\n mergedOptions.mediaType.previews = (mergedOptions.mediaType.previews || []).map((preview) => preview.replace(/-preview/, \"\"));\n }\n return mergedOptions;\n}\n\n// pkg/dist-src/util/add-query-parameters.js\nfunction addQueryParameters(url, parameters) {\n const separator = /\\?/.test(url) ? \"&\" : \"?\";\n const names = Object.keys(parameters);\n if (names.length === 0) {\n return url;\n }\n return url + separator + names.map((name) => {\n if (name === \"q\") {\n return \"q=\" + parameters.q.split(\"+\").map(encodeURIComponent).join(\"+\");\n }\n return `${name}=${encodeURIComponent(parameters[name])}`;\n }).join(\"&\");\n}\n\n// pkg/dist-src/util/extract-url-variable-names.js\nvar urlVariableRegex = /\\{[^{}}]+\\}/g;\nfunction removeNonChars(variableName) {\n return variableName.replace(/(?:^\\W+)|(?:(? a.concat(b), []);\n}\n\n// pkg/dist-src/util/omit.js\nfunction omit(object, keysToOmit) {\n const result = { __proto__: null };\n for (const key of Object.keys(object)) {\n if (keysToOmit.indexOf(key) === -1) {\n result[key] = object[key];\n }\n }\n return result;\n}\n\n// pkg/dist-src/util/url-template.js\nfunction encodeReserved(str) {\n return str.split(/(%[0-9A-Fa-f]{2})/g).map(function(part) {\n if (!/%[0-9A-Fa-f]/.test(part)) {\n part = encodeURI(part).replace(/%5B/g, \"[\").replace(/%5D/g, \"]\");\n }\n return part;\n }).join(\"\");\n}\nfunction encodeUnreserved(str) {\n return encodeURIComponent(str).replace(/[!'()*]/g, function(c) {\n return \"%\" + c.charCodeAt(0).toString(16).toUpperCase();\n });\n}\nfunction encodeValue(operator, value, key) {\n value = operator === \"+\" || operator === \"#\" ? encodeReserved(value) : encodeUnreserved(value);\n if (key) {\n return encodeUnreserved(key) + \"=\" + value;\n } else {\n return value;\n }\n}\nfunction isDefined(value) {\n return value !== void 0 && value !== null;\n}\nfunction isKeyOperator(operator) {\n return operator === \";\" || operator === \"&\" || operator === \"?\";\n}\nfunction getValues(context, operator, key, modifier) {\n var value = context[key], result = [];\n if (isDefined(value) && value !== \"\") {\n if (typeof value === \"string\" || typeof value === \"number\" || typeof value === \"boolean\") {\n value = value.toString();\n if (modifier && modifier !== \"*\") {\n value = value.substring(0, parseInt(modifier, 10));\n }\n result.push(\n encodeValue(operator, value, isKeyOperator(operator) ? key : \"\")\n );\n } else {\n if (modifier === \"*\") {\n if (Array.isArray(value)) {\n value.filter(isDefined).forEach(function(value2) {\n result.push(\n encodeValue(operator, value2, isKeyOperator(operator) ? key : \"\")\n );\n });\n } else {\n Object.keys(value).forEach(function(k) {\n if (isDefined(value[k])) {\n result.push(encodeValue(operator, value[k], k));\n }\n });\n }\n } else {\n const tmp = [];\n if (Array.isArray(value)) {\n value.filter(isDefined).forEach(function(value2) {\n tmp.push(encodeValue(operator, value2));\n });\n } else {\n Object.keys(value).forEach(function(k) {\n if (isDefined(value[k])) {\n tmp.push(encodeUnreserved(k));\n tmp.push(encodeValue(operator, value[k].toString()));\n }\n });\n }\n if (isKeyOperator(operator)) {\n result.push(encodeUnreserved(key) + \"=\" + tmp.join(\",\"));\n } else if (tmp.length !== 0) {\n result.push(tmp.join(\",\"));\n }\n }\n }\n } else {\n if (operator === \";\") {\n if (isDefined(value)) {\n result.push(encodeUnreserved(key));\n }\n } else if (value === \"\" && (operator === \"&\" || operator === \"?\")) {\n result.push(encodeUnreserved(key) + \"=\");\n } else if (value === \"\") {\n result.push(\"\");\n }\n }\n return result;\n}\nfunction parseUrl(template) {\n return {\n expand: expand.bind(null, template)\n };\n}\nfunction expand(template, context) {\n var operators = [\"+\", \"#\", \".\", \"/\", \";\", \"?\", \"&\"];\n template = template.replace(\n /\\{([^\\{\\}]+)\\}|([^\\{\\}]+)/g,\n function(_, expression, literal) {\n if (expression) {\n let operator = \"\";\n const values = [];\n if (operators.indexOf(expression.charAt(0)) !== -1) {\n operator = expression.charAt(0);\n expression = expression.substr(1);\n }\n expression.split(/,/g).forEach(function(variable) {\n var tmp = /([^:\\*]*)(?::(\\d+)|(\\*))?/.exec(variable);\n values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3]));\n });\n if (operator && operator !== \"+\") {\n var separator = \",\";\n if (operator === \"?\") {\n separator = \"&\";\n } else if (operator !== \"#\") {\n separator = operator;\n }\n return (values.length !== 0 ? operator : \"\") + values.join(separator);\n } else {\n return values.join(\",\");\n }\n } else {\n return encodeReserved(literal);\n }\n }\n );\n if (template === \"/\") {\n return template;\n } else {\n return template.replace(/\\/$/, \"\");\n }\n}\n\n// pkg/dist-src/parse.js\nfunction parse(options) {\n let method = options.method.toUpperCase();\n let url = (options.url || \"/\").replace(/:([a-z]\\w+)/g, \"{$1}\");\n let headers = Object.assign({}, options.headers);\n let body;\n let parameters = omit(options, [\n \"method\",\n \"baseUrl\",\n \"url\",\n \"headers\",\n \"request\",\n \"mediaType\"\n ]);\n const urlVariableNames = extractUrlVariableNames(url);\n url = parseUrl(url).expand(parameters);\n if (!/^http/.test(url)) {\n url = options.baseUrl + url;\n }\n const omittedParameters = Object.keys(options).filter((option) => urlVariableNames.includes(option)).concat(\"baseUrl\");\n const remainingParameters = omit(parameters, omittedParameters);\n const isBinaryRequest = /application\\/octet-stream/i.test(headers.accept);\n if (!isBinaryRequest) {\n if (options.mediaType.format) {\n headers.accept = headers.accept.split(/,/).map(\n (format) => format.replace(\n /application\\/vnd(\\.\\w+)(\\.v3)?(\\.\\w+)?(\\+json)?$/,\n `application/vnd$1$2.${options.mediaType.format}`\n )\n ).join(\",\");\n }\n if (url.endsWith(\"/graphql\")) {\n if (options.mediaType.previews?.length) {\n const previewsFromAcceptHeader = headers.accept.match(/(? {\n const format = options.mediaType.format ? `.${options.mediaType.format}` : \"+json\";\n return `application/vnd.github.${preview}-preview${format}`;\n }).join(\",\");\n }\n }\n }\n if ([\"GET\", \"HEAD\"].includes(method)) {\n url = addQueryParameters(url, remainingParameters);\n } else {\n if (\"data\" in remainingParameters) {\n body = remainingParameters.data;\n } else {\n if (Object.keys(remainingParameters).length) {\n body = remainingParameters;\n }\n }\n }\n if (!headers[\"content-type\"] && typeof body !== \"undefined\") {\n headers[\"content-type\"] = \"application/json; charset=utf-8\";\n }\n if ([\"PATCH\", \"PUT\"].includes(method) && typeof body === \"undefined\") {\n body = \"\";\n }\n return Object.assign(\n { method, url, headers },\n typeof body !== \"undefined\" ? { body } : null,\n options.request ? { request: options.request } : null\n );\n}\n\n// pkg/dist-src/endpoint-with-defaults.js\nfunction endpointWithDefaults(defaults, route, options) {\n return parse(merge(defaults, route, options));\n}\n\n// pkg/dist-src/with-defaults.js\nfunction withDefaults(oldDefaults, newDefaults) {\n const DEFAULTS2 = merge(oldDefaults, newDefaults);\n const endpoint2 = endpointWithDefaults.bind(null, DEFAULTS2);\n return Object.assign(endpoint2, {\n DEFAULTS: DEFAULTS2,\n defaults: withDefaults.bind(null, DEFAULTS2),\n merge: merge.bind(null, DEFAULTS2),\n parse\n });\n}\n\n// pkg/dist-src/index.js\nvar endpoint = withDefaults(null, DEFAULTS);\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n endpoint\n});\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// pkg/dist-src/index.js\nvar index_exports = {};\n__export(index_exports, {\n GraphqlResponseError: () => GraphqlResponseError,\n graphql: () => graphql2,\n withCustomRequest: () => withCustomRequest\n});\nmodule.exports = __toCommonJS(index_exports);\nvar import_request3 = require(\"@octokit/request\");\nvar import_universal_user_agent = require(\"universal-user-agent\");\n\n// pkg/dist-src/version.js\nvar VERSION = \"7.1.1\";\n\n// pkg/dist-src/with-defaults.js\nvar import_request2 = require(\"@octokit/request\");\n\n// pkg/dist-src/graphql.js\nvar import_request = require(\"@octokit/request\");\n\n// pkg/dist-src/error.js\nfunction _buildMessageForResponseErrors(data) {\n return `Request failed due to following response errors:\n` + data.errors.map((e) => ` - ${e.message}`).join(\"\\n\");\n}\nvar GraphqlResponseError = class extends Error {\n constructor(request2, headers, response) {\n super(_buildMessageForResponseErrors(response));\n this.request = request2;\n this.headers = headers;\n this.response = response;\n this.name = \"GraphqlResponseError\";\n this.errors = response.errors;\n this.data = response.data;\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n }\n};\n\n// pkg/dist-src/graphql.js\nvar NON_VARIABLE_OPTIONS = [\n \"method\",\n \"baseUrl\",\n \"url\",\n \"headers\",\n \"request\",\n \"query\",\n \"mediaType\"\n];\nvar FORBIDDEN_VARIABLE_OPTIONS = [\"query\", \"method\", \"url\"];\nvar GHES_V3_SUFFIX_REGEX = /\\/api\\/v3\\/?$/;\nfunction graphql(request2, query, options) {\n if (options) {\n if (typeof query === \"string\" && \"query\" in options) {\n return Promise.reject(\n new Error(`[@octokit/graphql] \"query\" cannot be used as variable name`)\n );\n }\n for (const key in options) {\n if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key)) continue;\n return Promise.reject(\n new Error(\n `[@octokit/graphql] \"${key}\" cannot be used as variable name`\n )\n );\n }\n }\n const parsedOptions = typeof query === \"string\" ? Object.assign({ query }, options) : query;\n const requestOptions = Object.keys(\n parsedOptions\n ).reduce((result, key) => {\n if (NON_VARIABLE_OPTIONS.includes(key)) {\n result[key] = parsedOptions[key];\n return result;\n }\n if (!result.variables) {\n result.variables = {};\n }\n result.variables[key] = parsedOptions[key];\n return result;\n }, {});\n const baseUrl = parsedOptions.baseUrl || request2.endpoint.DEFAULTS.baseUrl;\n if (GHES_V3_SUFFIX_REGEX.test(baseUrl)) {\n requestOptions.url = baseUrl.replace(GHES_V3_SUFFIX_REGEX, \"/api/graphql\");\n }\n return request2(requestOptions).then((response) => {\n if (response.data.errors) {\n const headers = {};\n for (const key of Object.keys(response.headers)) {\n headers[key] = response.headers[key];\n }\n throw new GraphqlResponseError(\n requestOptions,\n headers,\n response.data\n );\n }\n return response.data.data;\n });\n}\n\n// pkg/dist-src/with-defaults.js\nfunction withDefaults(request2, newDefaults) {\n const newRequest = request2.defaults(newDefaults);\n const newApi = (query, options) => {\n return graphql(newRequest, query, options);\n };\n return Object.assign(newApi, {\n defaults: withDefaults.bind(null, newRequest),\n endpoint: newRequest.endpoint\n });\n}\n\n// pkg/dist-src/index.js\nvar graphql2 = withDefaults(import_request3.request, {\n headers: {\n \"user-agent\": `octokit-graphql.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`\n },\n method: \"POST\",\n url: \"/graphql\"\n});\nfunction withCustomRequest(customRequest) {\n return withDefaults(customRequest, {\n method: \"POST\",\n url: \"/graphql\"\n });\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n GraphqlResponseError,\n graphql,\n withCustomRequest\n});\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// pkg/dist-src/index.js\nvar dist_src_exports = {};\n__export(dist_src_exports, {\n composePaginateRest: () => composePaginateRest,\n isPaginatingEndpoint: () => isPaginatingEndpoint,\n paginateRest: () => paginateRest,\n paginatingEndpoints: () => paginatingEndpoints\n});\nmodule.exports = __toCommonJS(dist_src_exports);\n\n// pkg/dist-src/version.js\nvar VERSION = \"9.2.2\";\n\n// pkg/dist-src/normalize-paginated-list-response.js\nfunction normalizePaginatedListResponse(response) {\n if (!response.data) {\n return {\n ...response,\n data: []\n };\n }\n const responseNeedsNormalization = \"total_count\" in response.data && !(\"url\" in response.data);\n if (!responseNeedsNormalization)\n return response;\n const incompleteResults = response.data.incomplete_results;\n const repositorySelection = response.data.repository_selection;\n const totalCount = response.data.total_count;\n delete response.data.incomplete_results;\n delete response.data.repository_selection;\n delete response.data.total_count;\n const namespaceKey = Object.keys(response.data)[0];\n const data = response.data[namespaceKey];\n response.data = data;\n if (typeof incompleteResults !== \"undefined\") {\n response.data.incomplete_results = incompleteResults;\n }\n if (typeof repositorySelection !== \"undefined\") {\n response.data.repository_selection = repositorySelection;\n }\n response.data.total_count = totalCount;\n return response;\n}\n\n// pkg/dist-src/iterator.js\nfunction iterator(octokit, route, parameters) {\n const options = typeof route === \"function\" ? route.endpoint(parameters) : octokit.request.endpoint(route, parameters);\n const requestMethod = typeof route === \"function\" ? route : octokit.request;\n const method = options.method;\n const headers = options.headers;\n let url = options.url;\n return {\n [Symbol.asyncIterator]: () => ({\n async next() {\n if (!url)\n return { done: true };\n try {\n const response = await requestMethod({ method, url, headers });\n const normalizedResponse = normalizePaginatedListResponse(response);\n url = ((normalizedResponse.headers.link || \"\").match(\n /<([^<>]+)>;\\s*rel=\"next\"/\n ) || [])[1];\n return { value: normalizedResponse };\n } catch (error) {\n if (error.status !== 409)\n throw error;\n url = \"\";\n return {\n value: {\n status: 200,\n headers: {},\n data: []\n }\n };\n }\n }\n })\n };\n}\n\n// pkg/dist-src/paginate.js\nfunction paginate(octokit, route, parameters, mapFn) {\n if (typeof parameters === \"function\") {\n mapFn = parameters;\n parameters = void 0;\n }\n return gather(\n octokit,\n [],\n iterator(octokit, route, parameters)[Symbol.asyncIterator](),\n mapFn\n );\n}\nfunction gather(octokit, results, iterator2, mapFn) {\n return iterator2.next().then((result) => {\n if (result.done) {\n return results;\n }\n let earlyExit = false;\n function done() {\n earlyExit = true;\n }\n results = results.concat(\n mapFn ? mapFn(result.value, done) : result.value.data\n );\n if (earlyExit) {\n return results;\n }\n return gather(octokit, results, iterator2, mapFn);\n });\n}\n\n// pkg/dist-src/compose-paginate.js\nvar composePaginateRest = Object.assign(paginate, {\n iterator\n});\n\n// pkg/dist-src/generated/paginating-endpoints.js\nvar paginatingEndpoints = [\n \"GET /advisories\",\n \"GET /app/hook/deliveries\",\n \"GET /app/installation-requests\",\n \"GET /app/installations\",\n \"GET /assignments/{assignment_id}/accepted_assignments\",\n \"GET /classrooms\",\n \"GET /classrooms/{classroom_id}/assignments\",\n \"GET /enterprises/{enterprise}/dependabot/alerts\",\n \"GET /enterprises/{enterprise}/secret-scanning/alerts\",\n \"GET /events\",\n \"GET /gists\",\n \"GET /gists/public\",\n \"GET /gists/starred\",\n \"GET /gists/{gist_id}/comments\",\n \"GET /gists/{gist_id}/commits\",\n \"GET /gists/{gist_id}/forks\",\n \"GET /installation/repositories\",\n \"GET /issues\",\n \"GET /licenses\",\n \"GET /marketplace_listing/plans\",\n \"GET /marketplace_listing/plans/{plan_id}/accounts\",\n \"GET /marketplace_listing/stubbed/plans\",\n \"GET /marketplace_listing/stubbed/plans/{plan_id}/accounts\",\n \"GET /networks/{owner}/{repo}/events\",\n \"GET /notifications\",\n \"GET /organizations\",\n \"GET /orgs/{org}/actions/cache/usage-by-repository\",\n \"GET /orgs/{org}/actions/permissions/repositories\",\n \"GET /orgs/{org}/actions/runners\",\n \"GET /orgs/{org}/actions/secrets\",\n \"GET /orgs/{org}/actions/secrets/{secret_name}/repositories\",\n \"GET /orgs/{org}/actions/variables\",\n \"GET /orgs/{org}/actions/variables/{name}/repositories\",\n \"GET /orgs/{org}/blocks\",\n \"GET /orgs/{org}/code-scanning/alerts\",\n \"GET /orgs/{org}/codespaces\",\n \"GET /orgs/{org}/codespaces/secrets\",\n \"GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories\",\n \"GET /orgs/{org}/copilot/billing/seats\",\n \"GET /orgs/{org}/dependabot/alerts\",\n \"GET /orgs/{org}/dependabot/secrets\",\n \"GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories\",\n \"GET /orgs/{org}/events\",\n \"GET /orgs/{org}/failed_invitations\",\n \"GET /orgs/{org}/hooks\",\n \"GET /orgs/{org}/hooks/{hook_id}/deliveries\",\n \"GET /orgs/{org}/installations\",\n \"GET /orgs/{org}/invitations\",\n \"GET /orgs/{org}/invitations/{invitation_id}/teams\",\n \"GET /orgs/{org}/issues\",\n \"GET /orgs/{org}/members\",\n \"GET /orgs/{org}/members/{username}/codespaces\",\n \"GET /orgs/{org}/migrations\",\n \"GET /orgs/{org}/migrations/{migration_id}/repositories\",\n \"GET /orgs/{org}/organization-roles/{role_id}/teams\",\n \"GET /orgs/{org}/organization-roles/{role_id}/users\",\n \"GET /orgs/{org}/outside_collaborators\",\n \"GET /orgs/{org}/packages\",\n \"GET /orgs/{org}/packages/{package_type}/{package_name}/versions\",\n \"GET /orgs/{org}/personal-access-token-requests\",\n \"GET /orgs/{org}/personal-access-token-requests/{pat_request_id}/repositories\",\n \"GET /orgs/{org}/personal-access-tokens\",\n \"GET /orgs/{org}/personal-access-tokens/{pat_id}/repositories\",\n \"GET /orgs/{org}/projects\",\n \"GET /orgs/{org}/properties/values\",\n \"GET /orgs/{org}/public_members\",\n \"GET /orgs/{org}/repos\",\n \"GET /orgs/{org}/rulesets\",\n \"GET /orgs/{org}/rulesets/rule-suites\",\n \"GET /orgs/{org}/secret-scanning/alerts\",\n \"GET /orgs/{org}/security-advisories\",\n \"GET /orgs/{org}/teams\",\n \"GET /orgs/{org}/teams/{team_slug}/discussions\",\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments\",\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions\",\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions\",\n \"GET /orgs/{org}/teams/{team_slug}/invitations\",\n \"GET /orgs/{org}/teams/{team_slug}/members\",\n \"GET /orgs/{org}/teams/{team_slug}/projects\",\n \"GET /orgs/{org}/teams/{team_slug}/repos\",\n \"GET /orgs/{org}/teams/{team_slug}/teams\",\n \"GET /projects/columns/{column_id}/cards\",\n \"GET /projects/{project_id}/collaborators\",\n \"GET /projects/{project_id}/columns\",\n \"GET /repos/{owner}/{repo}/actions/artifacts\",\n \"GET /repos/{owner}/{repo}/actions/caches\",\n \"GET /repos/{owner}/{repo}/actions/organization-secrets\",\n \"GET /repos/{owner}/{repo}/actions/organization-variables\",\n \"GET /repos/{owner}/{repo}/actions/runners\",\n \"GET /repos/{owner}/{repo}/actions/runs\",\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts\",\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs\",\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs\",\n \"GET /repos/{owner}/{repo}/actions/secrets\",\n \"GET /repos/{owner}/{repo}/actions/variables\",\n \"GET /repos/{owner}/{repo}/actions/workflows\",\n \"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs\",\n \"GET /repos/{owner}/{repo}/activity\",\n \"GET /repos/{owner}/{repo}/assignees\",\n \"GET /repos/{owner}/{repo}/branches\",\n \"GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations\",\n \"GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs\",\n \"GET /repos/{owner}/{repo}/code-scanning/alerts\",\n \"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances\",\n \"GET /repos/{owner}/{repo}/code-scanning/analyses\",\n \"GET /repos/{owner}/{repo}/codespaces\",\n \"GET /repos/{owner}/{repo}/codespaces/devcontainers\",\n \"GET /repos/{owner}/{repo}/codespaces/secrets\",\n \"GET /repos/{owner}/{repo}/collaborators\",\n \"GET /repos/{owner}/{repo}/comments\",\n \"GET /repos/{owner}/{repo}/comments/{comment_id}/reactions\",\n \"GET /repos/{owner}/{repo}/commits\",\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/comments\",\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls\",\n \"GET /repos/{owner}/{repo}/commits/{ref}/check-runs\",\n \"GET /repos/{owner}/{repo}/commits/{ref}/check-suites\",\n \"GET /repos/{owner}/{repo}/commits/{ref}/status\",\n \"GET /repos/{owner}/{repo}/commits/{ref}/statuses\",\n \"GET /repos/{owner}/{repo}/contributors\",\n \"GET /repos/{owner}/{repo}/dependabot/alerts\",\n \"GET /repos/{owner}/{repo}/dependabot/secrets\",\n \"GET /repos/{owner}/{repo}/deployments\",\n \"GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses\",\n \"GET /repos/{owner}/{repo}/environments\",\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies\",\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps\",\n \"GET /repos/{owner}/{repo}/events\",\n \"GET /repos/{owner}/{repo}/forks\",\n \"GET /repos/{owner}/{repo}/hooks\",\n \"GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries\",\n \"GET /repos/{owner}/{repo}/invitations\",\n \"GET /repos/{owner}/{repo}/issues\",\n \"GET /repos/{owner}/{repo}/issues/comments\",\n \"GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions\",\n \"GET /repos/{owner}/{repo}/issues/events\",\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/comments\",\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/events\",\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/labels\",\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/reactions\",\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/timeline\",\n \"GET /repos/{owner}/{repo}/keys\",\n \"GET /repos/{owner}/{repo}/labels\",\n \"GET /repos/{owner}/{repo}/milestones\",\n \"GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels\",\n \"GET /repos/{owner}/{repo}/notifications\",\n \"GET /repos/{owner}/{repo}/pages/builds\",\n \"GET /repos/{owner}/{repo}/projects\",\n \"GET /repos/{owner}/{repo}/pulls\",\n \"GET /repos/{owner}/{repo}/pulls/comments\",\n \"GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/comments\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/commits\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/files\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments\",\n \"GET /repos/{owner}/{repo}/releases\",\n \"GET /repos/{owner}/{repo}/releases/{release_id}/assets\",\n \"GET /repos/{owner}/{repo}/releases/{release_id}/reactions\",\n \"GET /repos/{owner}/{repo}/rules/branches/{branch}\",\n \"GET /repos/{owner}/{repo}/rulesets\",\n \"GET /repos/{owner}/{repo}/rulesets/rule-suites\",\n \"GET /repos/{owner}/{repo}/secret-scanning/alerts\",\n \"GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations\",\n \"GET /repos/{owner}/{repo}/security-advisories\",\n \"GET /repos/{owner}/{repo}/stargazers\",\n \"GET /repos/{owner}/{repo}/subscribers\",\n \"GET /repos/{owner}/{repo}/tags\",\n \"GET /repos/{owner}/{repo}/teams\",\n \"GET /repos/{owner}/{repo}/topics\",\n \"GET /repositories\",\n \"GET /repositories/{repository_id}/environments/{environment_name}/secrets\",\n \"GET /repositories/{repository_id}/environments/{environment_name}/variables\",\n \"GET /search/code\",\n \"GET /search/commits\",\n \"GET /search/issues\",\n \"GET /search/labels\",\n \"GET /search/repositories\",\n \"GET /search/topics\",\n \"GET /search/users\",\n \"GET /teams/{team_id}/discussions\",\n \"GET /teams/{team_id}/discussions/{discussion_number}/comments\",\n \"GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions\",\n \"GET /teams/{team_id}/discussions/{discussion_number}/reactions\",\n \"GET /teams/{team_id}/invitations\",\n \"GET /teams/{team_id}/members\",\n \"GET /teams/{team_id}/projects\",\n \"GET /teams/{team_id}/repos\",\n \"GET /teams/{team_id}/teams\",\n \"GET /user/blocks\",\n \"GET /user/codespaces\",\n \"GET /user/codespaces/secrets\",\n \"GET /user/emails\",\n \"GET /user/followers\",\n \"GET /user/following\",\n \"GET /user/gpg_keys\",\n \"GET /user/installations\",\n \"GET /user/installations/{installation_id}/repositories\",\n \"GET /user/issues\",\n \"GET /user/keys\",\n \"GET /user/marketplace_purchases\",\n \"GET /user/marketplace_purchases/stubbed\",\n \"GET /user/memberships/orgs\",\n \"GET /user/migrations\",\n \"GET /user/migrations/{migration_id}/repositories\",\n \"GET /user/orgs\",\n \"GET /user/packages\",\n \"GET /user/packages/{package_type}/{package_name}/versions\",\n \"GET /user/public_emails\",\n \"GET /user/repos\",\n \"GET /user/repository_invitations\",\n \"GET /user/social_accounts\",\n \"GET /user/ssh_signing_keys\",\n \"GET /user/starred\",\n \"GET /user/subscriptions\",\n \"GET /user/teams\",\n \"GET /users\",\n \"GET /users/{username}/events\",\n \"GET /users/{username}/events/orgs/{org}\",\n \"GET /users/{username}/events/public\",\n \"GET /users/{username}/followers\",\n \"GET /users/{username}/following\",\n \"GET /users/{username}/gists\",\n \"GET /users/{username}/gpg_keys\",\n \"GET /users/{username}/keys\",\n \"GET /users/{username}/orgs\",\n \"GET /users/{username}/packages\",\n \"GET /users/{username}/projects\",\n \"GET /users/{username}/received_events\",\n \"GET /users/{username}/received_events/public\",\n \"GET /users/{username}/repos\",\n \"GET /users/{username}/social_accounts\",\n \"GET /users/{username}/ssh_signing_keys\",\n \"GET /users/{username}/starred\",\n \"GET /users/{username}/subscriptions\"\n];\n\n// pkg/dist-src/paginating-endpoints.js\nfunction isPaginatingEndpoint(arg) {\n if (typeof arg === \"string\") {\n return paginatingEndpoints.includes(arg);\n } else {\n return false;\n }\n}\n\n// pkg/dist-src/index.js\nfunction paginateRest(octokit) {\n return {\n paginate: Object.assign(paginate.bind(null, octokit), {\n iterator: iterator.bind(null, octokit)\n })\n };\n}\npaginateRest.VERSION = VERSION;\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n composePaginateRest,\n isPaginatingEndpoint,\n paginateRest,\n paginatingEndpoints\n});\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// pkg/dist-src/index.js\nvar dist_src_exports = {};\n__export(dist_src_exports, {\n legacyRestEndpointMethods: () => legacyRestEndpointMethods,\n restEndpointMethods: () => restEndpointMethods\n});\nmodule.exports = __toCommonJS(dist_src_exports);\n\n// pkg/dist-src/version.js\nvar VERSION = \"10.4.1\";\n\n// pkg/dist-src/generated/endpoints.js\nvar Endpoints = {\n actions: {\n addCustomLabelsToSelfHostedRunnerForOrg: [\n \"POST /orgs/{org}/actions/runners/{runner_id}/labels\"\n ],\n addCustomLabelsToSelfHostedRunnerForRepo: [\n \"POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels\"\n ],\n addSelectedRepoToOrgSecret: [\n \"PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}\"\n ],\n addSelectedRepoToOrgVariable: [\n \"PUT /orgs/{org}/actions/variables/{name}/repositories/{repository_id}\"\n ],\n approveWorkflowRun: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve\"\n ],\n cancelWorkflowRun: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel\"\n ],\n createEnvironmentVariable: [\n \"POST /repositories/{repository_id}/environments/{environment_name}/variables\"\n ],\n createOrUpdateEnvironmentSecret: [\n \"PUT /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}\"\n ],\n createOrUpdateOrgSecret: [\"PUT /orgs/{org}/actions/secrets/{secret_name}\"],\n createOrUpdateRepoSecret: [\n \"PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}\"\n ],\n createOrgVariable: [\"POST /orgs/{org}/actions/variables\"],\n createRegistrationTokenForOrg: [\n \"POST /orgs/{org}/actions/runners/registration-token\"\n ],\n createRegistrationTokenForRepo: [\n \"POST /repos/{owner}/{repo}/actions/runners/registration-token\"\n ],\n createRemoveTokenForOrg: [\"POST /orgs/{org}/actions/runners/remove-token\"],\n createRemoveTokenForRepo: [\n \"POST /repos/{owner}/{repo}/actions/runners/remove-token\"\n ],\n createRepoVariable: [\"POST /repos/{owner}/{repo}/actions/variables\"],\n createWorkflowDispatch: [\n \"POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches\"\n ],\n deleteActionsCacheById: [\n \"DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}\"\n ],\n deleteActionsCacheByKey: [\n \"DELETE /repos/{owner}/{repo}/actions/caches{?key,ref}\"\n ],\n deleteArtifact: [\n \"DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}\"\n ],\n deleteEnvironmentSecret: [\n \"DELETE /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}\"\n ],\n deleteEnvironmentVariable: [\n \"DELETE /repositories/{repository_id}/environments/{environment_name}/variables/{name}\"\n ],\n deleteOrgSecret: [\"DELETE /orgs/{org}/actions/secrets/{secret_name}\"],\n deleteOrgVariable: [\"DELETE /orgs/{org}/actions/variables/{name}\"],\n deleteRepoSecret: [\n \"DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}\"\n ],\n deleteRepoVariable: [\n \"DELETE /repos/{owner}/{repo}/actions/variables/{name}\"\n ],\n deleteSelfHostedRunnerFromOrg: [\n \"DELETE /orgs/{org}/actions/runners/{runner_id}\"\n ],\n deleteSelfHostedRunnerFromRepo: [\n \"DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}\"\n ],\n deleteWorkflowRun: [\"DELETE /repos/{owner}/{repo}/actions/runs/{run_id}\"],\n deleteWorkflowRunLogs: [\n \"DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs\"\n ],\n disableSelectedRepositoryGithubActionsOrganization: [\n \"DELETE /orgs/{org}/actions/permissions/repositories/{repository_id}\"\n ],\n disableWorkflow: [\n \"PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable\"\n ],\n downloadArtifact: [\n \"GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}\"\n ],\n downloadJobLogsForWorkflowRun: [\n \"GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs\"\n ],\n downloadWorkflowRunAttemptLogs: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs\"\n ],\n downloadWorkflowRunLogs: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs\"\n ],\n enableSelectedRepositoryGithubActionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions/repositories/{repository_id}\"\n ],\n enableWorkflow: [\n \"PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable\"\n ],\n forceCancelWorkflowRun: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/force-cancel\"\n ],\n generateRunnerJitconfigForOrg: [\n \"POST /orgs/{org}/actions/runners/generate-jitconfig\"\n ],\n generateRunnerJitconfigForRepo: [\n \"POST /repos/{owner}/{repo}/actions/runners/generate-jitconfig\"\n ],\n getActionsCacheList: [\"GET /repos/{owner}/{repo}/actions/caches\"],\n getActionsCacheUsage: [\"GET /repos/{owner}/{repo}/actions/cache/usage\"],\n getActionsCacheUsageByRepoForOrg: [\n \"GET /orgs/{org}/actions/cache/usage-by-repository\"\n ],\n getActionsCacheUsageForOrg: [\"GET /orgs/{org}/actions/cache/usage\"],\n getAllowedActionsOrganization: [\n \"GET /orgs/{org}/actions/permissions/selected-actions\"\n ],\n getAllowedActionsRepository: [\n \"GET /repos/{owner}/{repo}/actions/permissions/selected-actions\"\n ],\n getArtifact: [\"GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}\"],\n getCustomOidcSubClaimForRepo: [\n \"GET /repos/{owner}/{repo}/actions/oidc/customization/sub\"\n ],\n getEnvironmentPublicKey: [\n \"GET /repositories/{repository_id}/environments/{environment_name}/secrets/public-key\"\n ],\n getEnvironmentSecret: [\n \"GET /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}\"\n ],\n getEnvironmentVariable: [\n \"GET /repositories/{repository_id}/environments/{environment_name}/variables/{name}\"\n ],\n getGithubActionsDefaultWorkflowPermissionsOrganization: [\n \"GET /orgs/{org}/actions/permissions/workflow\"\n ],\n getGithubActionsDefaultWorkflowPermissionsRepository: [\n \"GET /repos/{owner}/{repo}/actions/permissions/workflow\"\n ],\n getGithubActionsPermissionsOrganization: [\n \"GET /orgs/{org}/actions/permissions\"\n ],\n getGithubActionsPermissionsRepository: [\n \"GET /repos/{owner}/{repo}/actions/permissions\"\n ],\n getJobForWorkflowRun: [\"GET /repos/{owner}/{repo}/actions/jobs/{job_id}\"],\n getOrgPublicKey: [\"GET /orgs/{org}/actions/secrets/public-key\"],\n getOrgSecret: [\"GET /orgs/{org}/actions/secrets/{secret_name}\"],\n getOrgVariable: [\"GET /orgs/{org}/actions/variables/{name}\"],\n getPendingDeploymentsForRun: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments\"\n ],\n getRepoPermissions: [\n \"GET /repos/{owner}/{repo}/actions/permissions\",\n {},\n { renamed: [\"actions\", \"getGithubActionsPermissionsRepository\"] }\n ],\n getRepoPublicKey: [\"GET /repos/{owner}/{repo}/actions/secrets/public-key\"],\n getRepoSecret: [\"GET /repos/{owner}/{repo}/actions/secrets/{secret_name}\"],\n getRepoVariable: [\"GET /repos/{owner}/{repo}/actions/variables/{name}\"],\n getReviewsForRun: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals\"\n ],\n getSelfHostedRunnerForOrg: [\"GET /orgs/{org}/actions/runners/{runner_id}\"],\n getSelfHostedRunnerForRepo: [\n \"GET /repos/{owner}/{repo}/actions/runners/{runner_id}\"\n ],\n getWorkflow: [\"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}\"],\n getWorkflowAccessToRepository: [\n \"GET /repos/{owner}/{repo}/actions/permissions/access\"\n ],\n getWorkflowRun: [\"GET /repos/{owner}/{repo}/actions/runs/{run_id}\"],\n getWorkflowRunAttempt: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}\"\n ],\n getWorkflowRunUsage: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing\"\n ],\n getWorkflowUsage: [\n \"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing\"\n ],\n listArtifactsForRepo: [\"GET /repos/{owner}/{repo}/actions/artifacts\"],\n listEnvironmentSecrets: [\n \"GET /repositories/{repository_id}/environments/{environment_name}/secrets\"\n ],\n listEnvironmentVariables: [\n \"GET /repositories/{repository_id}/environments/{environment_name}/variables\"\n ],\n listJobsForWorkflowRun: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs\"\n ],\n listJobsForWorkflowRunAttempt: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs\"\n ],\n listLabelsForSelfHostedRunnerForOrg: [\n \"GET /orgs/{org}/actions/runners/{runner_id}/labels\"\n ],\n listLabelsForSelfHostedRunnerForRepo: [\n \"GET /repos/{owner}/{repo}/actions/runners/{runner_id}/labels\"\n ],\n listOrgSecrets: [\"GET /orgs/{org}/actions/secrets\"],\n listOrgVariables: [\"GET /orgs/{org}/actions/variables\"],\n listRepoOrganizationSecrets: [\n \"GET /repos/{owner}/{repo}/actions/organization-secrets\"\n ],\n listRepoOrganizationVariables: [\n \"GET /repos/{owner}/{repo}/actions/organization-variables\"\n ],\n listRepoSecrets: [\"GET /repos/{owner}/{repo}/actions/secrets\"],\n listRepoVariables: [\"GET /repos/{owner}/{repo}/actions/variables\"],\n listRepoWorkflows: [\"GET /repos/{owner}/{repo}/actions/workflows\"],\n listRunnerApplicationsForOrg: [\"GET /orgs/{org}/actions/runners/downloads\"],\n listRunnerApplicationsForRepo: [\n \"GET /repos/{owner}/{repo}/actions/runners/downloads\"\n ],\n listSelectedReposForOrgSecret: [\n \"GET /orgs/{org}/actions/secrets/{secret_name}/repositories\"\n ],\n listSelectedReposForOrgVariable: [\n \"GET /orgs/{org}/actions/variables/{name}/repositories\"\n ],\n listSelectedRepositoriesEnabledGithubActionsOrganization: [\n \"GET /orgs/{org}/actions/permissions/repositories\"\n ],\n listSelfHostedRunnersForOrg: [\"GET /orgs/{org}/actions/runners\"],\n listSelfHostedRunnersForRepo: [\"GET /repos/{owner}/{repo}/actions/runners\"],\n listWorkflowRunArtifacts: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts\"\n ],\n listWorkflowRuns: [\n \"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs\"\n ],\n listWorkflowRunsForRepo: [\"GET /repos/{owner}/{repo}/actions/runs\"],\n reRunJobForWorkflowRun: [\n \"POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun\"\n ],\n reRunWorkflow: [\"POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun\"],\n reRunWorkflowFailedJobs: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs\"\n ],\n removeAllCustomLabelsFromSelfHostedRunnerForOrg: [\n \"DELETE /orgs/{org}/actions/runners/{runner_id}/labels\"\n ],\n removeAllCustomLabelsFromSelfHostedRunnerForRepo: [\n \"DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels\"\n ],\n removeCustomLabelFromSelfHostedRunnerForOrg: [\n \"DELETE /orgs/{org}/actions/runners/{runner_id}/labels/{name}\"\n ],\n removeCustomLabelFromSelfHostedRunnerForRepo: [\n \"DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}\"\n ],\n removeSelectedRepoFromOrgSecret: [\n \"DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}\"\n ],\n removeSelectedRepoFromOrgVariable: [\n \"DELETE /orgs/{org}/actions/variables/{name}/repositories/{repository_id}\"\n ],\n reviewCustomGatesForRun: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule\"\n ],\n reviewPendingDeploymentsForRun: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments\"\n ],\n setAllowedActionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions/selected-actions\"\n ],\n setAllowedActionsRepository: [\n \"PUT /repos/{owner}/{repo}/actions/permissions/selected-actions\"\n ],\n setCustomLabelsForSelfHostedRunnerForOrg: [\n \"PUT /orgs/{org}/actions/runners/{runner_id}/labels\"\n ],\n setCustomLabelsForSelfHostedRunnerForRepo: [\n \"PUT /repos/{owner}/{repo}/actions/runners/{runner_id}/labels\"\n ],\n setCustomOidcSubClaimForRepo: [\n \"PUT /repos/{owner}/{repo}/actions/oidc/customization/sub\"\n ],\n setGithubActionsDefaultWorkflowPermissionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions/workflow\"\n ],\n setGithubActionsDefaultWorkflowPermissionsRepository: [\n \"PUT /repos/{owner}/{repo}/actions/permissions/workflow\"\n ],\n setGithubActionsPermissionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions\"\n ],\n setGithubActionsPermissionsRepository: [\n \"PUT /repos/{owner}/{repo}/actions/permissions\"\n ],\n setSelectedReposForOrgSecret: [\n \"PUT /orgs/{org}/actions/secrets/{secret_name}/repositories\"\n ],\n setSelectedReposForOrgVariable: [\n \"PUT /orgs/{org}/actions/variables/{name}/repositories\"\n ],\n setSelectedRepositoriesEnabledGithubActionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions/repositories\"\n ],\n setWorkflowAccessToRepository: [\n \"PUT /repos/{owner}/{repo}/actions/permissions/access\"\n ],\n updateEnvironmentVariable: [\n \"PATCH /repositories/{repository_id}/environments/{environment_name}/variables/{name}\"\n ],\n updateOrgVariable: [\"PATCH /orgs/{org}/actions/variables/{name}\"],\n updateRepoVariable: [\n \"PATCH /repos/{owner}/{repo}/actions/variables/{name}\"\n ]\n },\n activity: {\n checkRepoIsStarredByAuthenticatedUser: [\"GET /user/starred/{owner}/{repo}\"],\n deleteRepoSubscription: [\"DELETE /repos/{owner}/{repo}/subscription\"],\n deleteThreadSubscription: [\n \"DELETE /notifications/threads/{thread_id}/subscription\"\n ],\n getFeeds: [\"GET /feeds\"],\n getRepoSubscription: [\"GET /repos/{owner}/{repo}/subscription\"],\n getThread: [\"GET /notifications/threads/{thread_id}\"],\n getThreadSubscriptionForAuthenticatedUser: [\n \"GET /notifications/threads/{thread_id}/subscription\"\n ],\n listEventsForAuthenticatedUser: [\"GET /users/{username}/events\"],\n listNotificationsForAuthenticatedUser: [\"GET /notifications\"],\n listOrgEventsForAuthenticatedUser: [\n \"GET /users/{username}/events/orgs/{org}\"\n ],\n listPublicEvents: [\"GET /events\"],\n listPublicEventsForRepoNetwork: [\"GET /networks/{owner}/{repo}/events\"],\n listPublicEventsForUser: [\"GET /users/{username}/events/public\"],\n listPublicOrgEvents: [\"GET /orgs/{org}/events\"],\n listReceivedEventsForUser: [\"GET /users/{username}/received_events\"],\n listReceivedPublicEventsForUser: [\n \"GET /users/{username}/received_events/public\"\n ],\n listRepoEvents: [\"GET /repos/{owner}/{repo}/events\"],\n listRepoNotificationsForAuthenticatedUser: [\n \"GET /repos/{owner}/{repo}/notifications\"\n ],\n listReposStarredByAuthenticatedUser: [\"GET /user/starred\"],\n listReposStarredByUser: [\"GET /users/{username}/starred\"],\n listReposWatchedByUser: [\"GET /users/{username}/subscriptions\"],\n listStargazersForRepo: [\"GET /repos/{owner}/{repo}/stargazers\"],\n listWatchedReposForAuthenticatedUser: [\"GET /user/subscriptions\"],\n listWatchersForRepo: [\"GET /repos/{owner}/{repo}/subscribers\"],\n markNotificationsAsRead: [\"PUT /notifications\"],\n markRepoNotificationsAsRead: [\"PUT /repos/{owner}/{repo}/notifications\"],\n markThreadAsDone: [\"DELETE /notifications/threads/{thread_id}\"],\n markThreadAsRead: [\"PATCH /notifications/threads/{thread_id}\"],\n setRepoSubscription: [\"PUT /repos/{owner}/{repo}/subscription\"],\n setThreadSubscription: [\n \"PUT /notifications/threads/{thread_id}/subscription\"\n ],\n starRepoForAuthenticatedUser: [\"PUT /user/starred/{owner}/{repo}\"],\n unstarRepoForAuthenticatedUser: [\"DELETE /user/starred/{owner}/{repo}\"]\n },\n apps: {\n addRepoToInstallation: [\n \"PUT /user/installations/{installation_id}/repositories/{repository_id}\",\n {},\n { renamed: [\"apps\", \"addRepoToInstallationForAuthenticatedUser\"] }\n ],\n addRepoToInstallationForAuthenticatedUser: [\n \"PUT /user/installations/{installation_id}/repositories/{repository_id}\"\n ],\n checkToken: [\"POST /applications/{client_id}/token\"],\n createFromManifest: [\"POST /app-manifests/{code}/conversions\"],\n createInstallationAccessToken: [\n \"POST /app/installations/{installation_id}/access_tokens\"\n ],\n deleteAuthorization: [\"DELETE /applications/{client_id}/grant\"],\n deleteInstallation: [\"DELETE /app/installations/{installation_id}\"],\n deleteToken: [\"DELETE /applications/{client_id}/token\"],\n getAuthenticated: [\"GET /app\"],\n getBySlug: [\"GET /apps/{app_slug}\"],\n getInstallation: [\"GET /app/installations/{installation_id}\"],\n getOrgInstallation: [\"GET /orgs/{org}/installation\"],\n getRepoInstallation: [\"GET /repos/{owner}/{repo}/installation\"],\n getSubscriptionPlanForAccount: [\n \"GET /marketplace_listing/accounts/{account_id}\"\n ],\n getSubscriptionPlanForAccountStubbed: [\n \"GET /marketplace_listing/stubbed/accounts/{account_id}\"\n ],\n getUserInstallation: [\"GET /users/{username}/installation\"],\n getWebhookConfigForApp: [\"GET /app/hook/config\"],\n getWebhookDelivery: [\"GET /app/hook/deliveries/{delivery_id}\"],\n listAccountsForPlan: [\"GET /marketplace_listing/plans/{plan_id}/accounts\"],\n listAccountsForPlanStubbed: [\n \"GET /marketplace_listing/stubbed/plans/{plan_id}/accounts\"\n ],\n listInstallationReposForAuthenticatedUser: [\n \"GET /user/installations/{installation_id}/repositories\"\n ],\n listInstallationRequestsForAuthenticatedApp: [\n \"GET /app/installation-requests\"\n ],\n listInstallations: [\"GET /app/installations\"],\n listInstallationsForAuthenticatedUser: [\"GET /user/installations\"],\n listPlans: [\"GET /marketplace_listing/plans\"],\n listPlansStubbed: [\"GET /marketplace_listing/stubbed/plans\"],\n listReposAccessibleToInstallation: [\"GET /installation/repositories\"],\n listSubscriptionsForAuthenticatedUser: [\"GET /user/marketplace_purchases\"],\n listSubscriptionsForAuthenticatedUserStubbed: [\n \"GET /user/marketplace_purchases/stubbed\"\n ],\n listWebhookDeliveries: [\"GET /app/hook/deliveries\"],\n redeliverWebhookDelivery: [\n \"POST /app/hook/deliveries/{delivery_id}/attempts\"\n ],\n removeRepoFromInstallation: [\n \"DELETE /user/installations/{installation_id}/repositories/{repository_id}\",\n {},\n { renamed: [\"apps\", \"removeRepoFromInstallationForAuthenticatedUser\"] }\n ],\n removeRepoFromInstallationForAuthenticatedUser: [\n \"DELETE /user/installations/{installation_id}/repositories/{repository_id}\"\n ],\n resetToken: [\"PATCH /applications/{client_id}/token\"],\n revokeInstallationAccessToken: [\"DELETE /installation/token\"],\n scopeToken: [\"POST /applications/{client_id}/token/scoped\"],\n suspendInstallation: [\"PUT /app/installations/{installation_id}/suspended\"],\n unsuspendInstallation: [\n \"DELETE /app/installations/{installation_id}/suspended\"\n ],\n updateWebhookConfigForApp: [\"PATCH /app/hook/config\"]\n },\n billing: {\n getGithubActionsBillingOrg: [\"GET /orgs/{org}/settings/billing/actions\"],\n getGithubActionsBillingUser: [\n \"GET /users/{username}/settings/billing/actions\"\n ],\n getGithubPackagesBillingOrg: [\"GET /orgs/{org}/settings/billing/packages\"],\n getGithubPackagesBillingUser: [\n \"GET /users/{username}/settings/billing/packages\"\n ],\n getSharedStorageBillingOrg: [\n \"GET /orgs/{org}/settings/billing/shared-storage\"\n ],\n getSharedStorageBillingUser: [\n \"GET /users/{username}/settings/billing/shared-storage\"\n ]\n },\n checks: {\n create: [\"POST /repos/{owner}/{repo}/check-runs\"],\n createSuite: [\"POST /repos/{owner}/{repo}/check-suites\"],\n get: [\"GET /repos/{owner}/{repo}/check-runs/{check_run_id}\"],\n getSuite: [\"GET /repos/{owner}/{repo}/check-suites/{check_suite_id}\"],\n listAnnotations: [\n \"GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations\"\n ],\n listForRef: [\"GET /repos/{owner}/{repo}/commits/{ref}/check-runs\"],\n listForSuite: [\n \"GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs\"\n ],\n listSuitesForRef: [\"GET /repos/{owner}/{repo}/commits/{ref}/check-suites\"],\n rerequestRun: [\n \"POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest\"\n ],\n rerequestSuite: [\n \"POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest\"\n ],\n setSuitesPreferences: [\n \"PATCH /repos/{owner}/{repo}/check-suites/preferences\"\n ],\n update: [\"PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}\"]\n },\n codeScanning: {\n deleteAnalysis: [\n \"DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}{?confirm_delete}\"\n ],\n getAlert: [\n \"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}\",\n {},\n { renamedParameters: { alert_id: \"alert_number\" } }\n ],\n getAnalysis: [\n \"GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}\"\n ],\n getCodeqlDatabase: [\n \"GET /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}\"\n ],\n getDefaultSetup: [\"GET /repos/{owner}/{repo}/code-scanning/default-setup\"],\n getSarif: [\"GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}\"],\n listAlertInstances: [\n \"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances\"\n ],\n listAlertsForOrg: [\"GET /orgs/{org}/code-scanning/alerts\"],\n listAlertsForRepo: [\"GET /repos/{owner}/{repo}/code-scanning/alerts\"],\n listAlertsInstances: [\n \"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances\",\n {},\n { renamed: [\"codeScanning\", \"listAlertInstances\"] }\n ],\n listCodeqlDatabases: [\n \"GET /repos/{owner}/{repo}/code-scanning/codeql/databases\"\n ],\n listRecentAnalyses: [\"GET /repos/{owner}/{repo}/code-scanning/analyses\"],\n updateAlert: [\n \"PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}\"\n ],\n updateDefaultSetup: [\n \"PATCH /repos/{owner}/{repo}/code-scanning/default-setup\"\n ],\n uploadSarif: [\"POST /repos/{owner}/{repo}/code-scanning/sarifs\"]\n },\n codesOfConduct: {\n getAllCodesOfConduct: [\"GET /codes_of_conduct\"],\n getConductCode: [\"GET /codes_of_conduct/{key}\"]\n },\n codespaces: {\n addRepositoryForSecretForAuthenticatedUser: [\n \"PUT /user/codespaces/secrets/{secret_name}/repositories/{repository_id}\"\n ],\n addSelectedRepoToOrgSecret: [\n \"PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}\"\n ],\n checkPermissionsForDevcontainer: [\n \"GET /repos/{owner}/{repo}/codespaces/permissions_check\"\n ],\n codespaceMachinesForAuthenticatedUser: [\n \"GET /user/codespaces/{codespace_name}/machines\"\n ],\n createForAuthenticatedUser: [\"POST /user/codespaces\"],\n createOrUpdateOrgSecret: [\n \"PUT /orgs/{org}/codespaces/secrets/{secret_name}\"\n ],\n createOrUpdateRepoSecret: [\n \"PUT /repos/{owner}/{repo}/codespaces/secrets/{secret_name}\"\n ],\n createOrUpdateSecretForAuthenticatedUser: [\n \"PUT /user/codespaces/secrets/{secret_name}\"\n ],\n createWithPrForAuthenticatedUser: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/codespaces\"\n ],\n createWithRepoForAuthenticatedUser: [\n \"POST /repos/{owner}/{repo}/codespaces\"\n ],\n deleteForAuthenticatedUser: [\"DELETE /user/codespaces/{codespace_name}\"],\n deleteFromOrganization: [\n \"DELETE /orgs/{org}/members/{username}/codespaces/{codespace_name}\"\n ],\n deleteOrgSecret: [\"DELETE /orgs/{org}/codespaces/secrets/{secret_name}\"],\n deleteRepoSecret: [\n \"DELETE /repos/{owner}/{repo}/codespaces/secrets/{secret_name}\"\n ],\n deleteSecretForAuthenticatedUser: [\n \"DELETE /user/codespaces/secrets/{secret_name}\"\n ],\n exportForAuthenticatedUser: [\n \"POST /user/codespaces/{codespace_name}/exports\"\n ],\n getCodespacesForUserInOrg: [\n \"GET /orgs/{org}/members/{username}/codespaces\"\n ],\n getExportDetailsForAuthenticatedUser: [\n \"GET /user/codespaces/{codespace_name}/exports/{export_id}\"\n ],\n getForAuthenticatedUser: [\"GET /user/codespaces/{codespace_name}\"],\n getOrgPublicKey: [\"GET /orgs/{org}/codespaces/secrets/public-key\"],\n getOrgSecret: [\"GET /orgs/{org}/codespaces/secrets/{secret_name}\"],\n getPublicKeyForAuthenticatedUser: [\n \"GET /user/codespaces/secrets/public-key\"\n ],\n getRepoPublicKey: [\n \"GET /repos/{owner}/{repo}/codespaces/secrets/public-key\"\n ],\n getRepoSecret: [\n \"GET /repos/{owner}/{repo}/codespaces/secrets/{secret_name}\"\n ],\n getSecretForAuthenticatedUser: [\n \"GET /user/codespaces/secrets/{secret_name}\"\n ],\n listDevcontainersInRepositoryForAuthenticatedUser: [\n \"GET /repos/{owner}/{repo}/codespaces/devcontainers\"\n ],\n listForAuthenticatedUser: [\"GET /user/codespaces\"],\n listInOrganization: [\n \"GET /orgs/{org}/codespaces\",\n {},\n { renamedParameters: { org_id: \"org\" } }\n ],\n listInRepositoryForAuthenticatedUser: [\n \"GET /repos/{owner}/{repo}/codespaces\"\n ],\n listOrgSecrets: [\"GET /orgs/{org}/codespaces/secrets\"],\n listRepoSecrets: [\"GET /repos/{owner}/{repo}/codespaces/secrets\"],\n listRepositoriesForSecretForAuthenticatedUser: [\n \"GET /user/codespaces/secrets/{secret_name}/repositories\"\n ],\n listSecretsForAuthenticatedUser: [\"GET /user/codespaces/secrets\"],\n listSelectedReposForOrgSecret: [\n \"GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories\"\n ],\n preFlightWithRepoForAuthenticatedUser: [\n \"GET /repos/{owner}/{repo}/codespaces/new\"\n ],\n publishForAuthenticatedUser: [\n \"POST /user/codespaces/{codespace_name}/publish\"\n ],\n removeRepositoryForSecretForAuthenticatedUser: [\n \"DELETE /user/codespaces/secrets/{secret_name}/repositories/{repository_id}\"\n ],\n removeSelectedRepoFromOrgSecret: [\n \"DELETE /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}\"\n ],\n repoMachinesForAuthenticatedUser: [\n \"GET /repos/{owner}/{repo}/codespaces/machines\"\n ],\n setRepositoriesForSecretForAuthenticatedUser: [\n \"PUT /user/codespaces/secrets/{secret_name}/repositories\"\n ],\n setSelectedReposForOrgSecret: [\n \"PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories\"\n ],\n startForAuthenticatedUser: [\"POST /user/codespaces/{codespace_name}/start\"],\n stopForAuthenticatedUser: [\"POST /user/codespaces/{codespace_name}/stop\"],\n stopInOrganization: [\n \"POST /orgs/{org}/members/{username}/codespaces/{codespace_name}/stop\"\n ],\n updateForAuthenticatedUser: [\"PATCH /user/codespaces/{codespace_name}\"]\n },\n copilot: {\n addCopilotSeatsForTeams: [\n \"POST /orgs/{org}/copilot/billing/selected_teams\"\n ],\n addCopilotSeatsForUsers: [\n \"POST /orgs/{org}/copilot/billing/selected_users\"\n ],\n cancelCopilotSeatAssignmentForTeams: [\n \"DELETE /orgs/{org}/copilot/billing/selected_teams\"\n ],\n cancelCopilotSeatAssignmentForUsers: [\n \"DELETE /orgs/{org}/copilot/billing/selected_users\"\n ],\n getCopilotOrganizationDetails: [\"GET /orgs/{org}/copilot/billing\"],\n getCopilotSeatDetailsForUser: [\n \"GET /orgs/{org}/members/{username}/copilot\"\n ],\n listCopilotSeats: [\"GET /orgs/{org}/copilot/billing/seats\"]\n },\n dependabot: {\n addSelectedRepoToOrgSecret: [\n \"PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}\"\n ],\n createOrUpdateOrgSecret: [\n \"PUT /orgs/{org}/dependabot/secrets/{secret_name}\"\n ],\n createOrUpdateRepoSecret: [\n \"PUT /repos/{owner}/{repo}/dependabot/secrets/{secret_name}\"\n ],\n deleteOrgSecret: [\"DELETE /orgs/{org}/dependabot/secrets/{secret_name}\"],\n deleteRepoSecret: [\n \"DELETE /repos/{owner}/{repo}/dependabot/secrets/{secret_name}\"\n ],\n getAlert: [\"GET /repos/{owner}/{repo}/dependabot/alerts/{alert_number}\"],\n getOrgPublicKey: [\"GET /orgs/{org}/dependabot/secrets/public-key\"],\n getOrgSecret: [\"GET /orgs/{org}/dependabot/secrets/{secret_name}\"],\n getRepoPublicKey: [\n \"GET /repos/{owner}/{repo}/dependabot/secrets/public-key\"\n ],\n getRepoSecret: [\n \"GET /repos/{owner}/{repo}/dependabot/secrets/{secret_name}\"\n ],\n listAlertsForEnterprise: [\n \"GET /enterprises/{enterprise}/dependabot/alerts\"\n ],\n listAlertsForOrg: [\"GET /orgs/{org}/dependabot/alerts\"],\n listAlertsForRepo: [\"GET /repos/{owner}/{repo}/dependabot/alerts\"],\n listOrgSecrets: [\"GET /orgs/{org}/dependabot/secrets\"],\n listRepoSecrets: [\"GET /repos/{owner}/{repo}/dependabot/secrets\"],\n listSelectedReposForOrgSecret: [\n \"GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories\"\n ],\n removeSelectedRepoFromOrgSecret: [\n \"DELETE /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}\"\n ],\n setSelectedReposForOrgSecret: [\n \"PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories\"\n ],\n updateAlert: [\n \"PATCH /repos/{owner}/{repo}/dependabot/alerts/{alert_number}\"\n ]\n },\n dependencyGraph: {\n createRepositorySnapshot: [\n \"POST /repos/{owner}/{repo}/dependency-graph/snapshots\"\n ],\n diffRange: [\n \"GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead}\"\n ],\n exportSbom: [\"GET /repos/{owner}/{repo}/dependency-graph/sbom\"]\n },\n emojis: { get: [\"GET /emojis\"] },\n gists: {\n checkIsStarred: [\"GET /gists/{gist_id}/star\"],\n create: [\"POST /gists\"],\n createComment: [\"POST /gists/{gist_id}/comments\"],\n delete: [\"DELETE /gists/{gist_id}\"],\n deleteComment: [\"DELETE /gists/{gist_id}/comments/{comment_id}\"],\n fork: [\"POST /gists/{gist_id}/forks\"],\n get: [\"GET /gists/{gist_id}\"],\n getComment: [\"GET /gists/{gist_id}/comments/{comment_id}\"],\n getRevision: [\"GET /gists/{gist_id}/{sha}\"],\n list: [\"GET /gists\"],\n listComments: [\"GET /gists/{gist_id}/comments\"],\n listCommits: [\"GET /gists/{gist_id}/commits\"],\n listForUser: [\"GET /users/{username}/gists\"],\n listForks: [\"GET /gists/{gist_id}/forks\"],\n listPublic: [\"GET /gists/public\"],\n listStarred: [\"GET /gists/starred\"],\n star: [\"PUT /gists/{gist_id}/star\"],\n unstar: [\"DELETE /gists/{gist_id}/star\"],\n update: [\"PATCH /gists/{gist_id}\"],\n updateComment: [\"PATCH /gists/{gist_id}/comments/{comment_id}\"]\n },\n git: {\n createBlob: [\"POST /repos/{owner}/{repo}/git/blobs\"],\n createCommit: [\"POST /repos/{owner}/{repo}/git/commits\"],\n createRef: [\"POST /repos/{owner}/{repo}/git/refs\"],\n createTag: [\"POST /repos/{owner}/{repo}/git/tags\"],\n createTree: [\"POST /repos/{owner}/{repo}/git/trees\"],\n deleteRef: [\"DELETE /repos/{owner}/{repo}/git/refs/{ref}\"],\n getBlob: [\"GET /repos/{owner}/{repo}/git/blobs/{file_sha}\"],\n getCommit: [\"GET /repos/{owner}/{repo}/git/commits/{commit_sha}\"],\n getRef: [\"GET /repos/{owner}/{repo}/git/ref/{ref}\"],\n getTag: [\"GET /repos/{owner}/{repo}/git/tags/{tag_sha}\"],\n getTree: [\"GET /repos/{owner}/{repo}/git/trees/{tree_sha}\"],\n listMatchingRefs: [\"GET /repos/{owner}/{repo}/git/matching-refs/{ref}\"],\n updateRef: [\"PATCH /repos/{owner}/{repo}/git/refs/{ref}\"]\n },\n gitignore: {\n getAllTemplates: [\"GET /gitignore/templates\"],\n getTemplate: [\"GET /gitignore/templates/{name}\"]\n },\n interactions: {\n getRestrictionsForAuthenticatedUser: [\"GET /user/interaction-limits\"],\n getRestrictionsForOrg: [\"GET /orgs/{org}/interaction-limits\"],\n getRestrictionsForRepo: [\"GET /repos/{owner}/{repo}/interaction-limits\"],\n getRestrictionsForYourPublicRepos: [\n \"GET /user/interaction-limits\",\n {},\n { renamed: [\"interactions\", \"getRestrictionsForAuthenticatedUser\"] }\n ],\n removeRestrictionsForAuthenticatedUser: [\"DELETE /user/interaction-limits\"],\n removeRestrictionsForOrg: [\"DELETE /orgs/{org}/interaction-limits\"],\n removeRestrictionsForRepo: [\n \"DELETE /repos/{owner}/{repo}/interaction-limits\"\n ],\n removeRestrictionsForYourPublicRepos: [\n \"DELETE /user/interaction-limits\",\n {},\n { renamed: [\"interactions\", \"removeRestrictionsForAuthenticatedUser\"] }\n ],\n setRestrictionsForAuthenticatedUser: [\"PUT /user/interaction-limits\"],\n setRestrictionsForOrg: [\"PUT /orgs/{org}/interaction-limits\"],\n setRestrictionsForRepo: [\"PUT /repos/{owner}/{repo}/interaction-limits\"],\n setRestrictionsForYourPublicRepos: [\n \"PUT /user/interaction-limits\",\n {},\n { renamed: [\"interactions\", \"setRestrictionsForAuthenticatedUser\"] }\n ]\n },\n issues: {\n addAssignees: [\n \"POST /repos/{owner}/{repo}/issues/{issue_number}/assignees\"\n ],\n addLabels: [\"POST /repos/{owner}/{repo}/issues/{issue_number}/labels\"],\n checkUserCanBeAssigned: [\"GET /repos/{owner}/{repo}/assignees/{assignee}\"],\n checkUserCanBeAssignedToIssue: [\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/assignees/{assignee}\"\n ],\n create: [\"POST /repos/{owner}/{repo}/issues\"],\n createComment: [\n \"POST /repos/{owner}/{repo}/issues/{issue_number}/comments\"\n ],\n createLabel: [\"POST /repos/{owner}/{repo}/labels\"],\n createMilestone: [\"POST /repos/{owner}/{repo}/milestones\"],\n deleteComment: [\n \"DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}\"\n ],\n deleteLabel: [\"DELETE /repos/{owner}/{repo}/labels/{name}\"],\n deleteMilestone: [\n \"DELETE /repos/{owner}/{repo}/milestones/{milestone_number}\"\n ],\n get: [\"GET /repos/{owner}/{repo}/issues/{issue_number}\"],\n getComment: [\"GET /repos/{owner}/{repo}/issues/comments/{comment_id}\"],\n getEvent: [\"GET /repos/{owner}/{repo}/issues/events/{event_id}\"],\n getLabel: [\"GET /repos/{owner}/{repo}/labels/{name}\"],\n getMilestone: [\"GET /repos/{owner}/{repo}/milestones/{milestone_number}\"],\n list: [\"GET /issues\"],\n listAssignees: [\"GET /repos/{owner}/{repo}/assignees\"],\n listComments: [\"GET /repos/{owner}/{repo}/issues/{issue_number}/comments\"],\n listCommentsForRepo: [\"GET /repos/{owner}/{repo}/issues/comments\"],\n listEvents: [\"GET /repos/{owner}/{repo}/issues/{issue_number}/events\"],\n listEventsForRepo: [\"GET /repos/{owner}/{repo}/issues/events\"],\n listEventsForTimeline: [\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/timeline\"\n ],\n listForAuthenticatedUser: [\"GET /user/issues\"],\n listForOrg: [\"GET /orgs/{org}/issues\"],\n listForRepo: [\"GET /repos/{owner}/{repo}/issues\"],\n listLabelsForMilestone: [\n \"GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels\"\n ],\n listLabelsForRepo: [\"GET /repos/{owner}/{repo}/labels\"],\n listLabelsOnIssue: [\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/labels\"\n ],\n listMilestones: [\"GET /repos/{owner}/{repo}/milestones\"],\n lock: [\"PUT /repos/{owner}/{repo}/issues/{issue_number}/lock\"],\n removeAllLabels: [\n \"DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels\"\n ],\n removeAssignees: [\n \"DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees\"\n ],\n removeLabel: [\n \"DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}\"\n ],\n setLabels: [\"PUT /repos/{owner}/{repo}/issues/{issue_number}/labels\"],\n unlock: [\"DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock\"],\n update: [\"PATCH /repos/{owner}/{repo}/issues/{issue_number}\"],\n updateComment: [\"PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}\"],\n updateLabel: [\"PATCH /repos/{owner}/{repo}/labels/{name}\"],\n updateMilestone: [\n \"PATCH /repos/{owner}/{repo}/milestones/{milestone_number}\"\n ]\n },\n licenses: {\n get: [\"GET /licenses/{license}\"],\n getAllCommonlyUsed: [\"GET /licenses\"],\n getForRepo: [\"GET /repos/{owner}/{repo}/license\"]\n },\n markdown: {\n render: [\"POST /markdown\"],\n renderRaw: [\n \"POST /markdown/raw\",\n { headers: { \"content-type\": \"text/plain; charset=utf-8\" } }\n ]\n },\n meta: {\n get: [\"GET /meta\"],\n getAllVersions: [\"GET /versions\"],\n getOctocat: [\"GET /octocat\"],\n getZen: [\"GET /zen\"],\n root: [\"GET /\"]\n },\n migrations: {\n cancelImport: [\n \"DELETE /repos/{owner}/{repo}/import\",\n {},\n {\n deprecated: \"octokit.rest.migrations.cancelImport() is deprecated, see https://docs.github.com/rest/migrations/source-imports#cancel-an-import\"\n }\n ],\n deleteArchiveForAuthenticatedUser: [\n \"DELETE /user/migrations/{migration_id}/archive\"\n ],\n deleteArchiveForOrg: [\n \"DELETE /orgs/{org}/migrations/{migration_id}/archive\"\n ],\n downloadArchiveForOrg: [\n \"GET /orgs/{org}/migrations/{migration_id}/archive\"\n ],\n getArchiveForAuthenticatedUser: [\n \"GET /user/migrations/{migration_id}/archive\"\n ],\n getCommitAuthors: [\n \"GET /repos/{owner}/{repo}/import/authors\",\n {},\n {\n deprecated: \"octokit.rest.migrations.getCommitAuthors() is deprecated, see https://docs.github.com/rest/migrations/source-imports#get-commit-authors\"\n }\n ],\n getImportStatus: [\n \"GET /repos/{owner}/{repo}/import\",\n {},\n {\n deprecated: \"octokit.rest.migrations.getImportStatus() is deprecated, see https://docs.github.com/rest/migrations/source-imports#get-an-import-status\"\n }\n ],\n getLargeFiles: [\n \"GET /repos/{owner}/{repo}/import/large_files\",\n {},\n {\n deprecated: \"octokit.rest.migrations.getLargeFiles() is deprecated, see https://docs.github.com/rest/migrations/source-imports#get-large-files\"\n }\n ],\n getStatusForAuthenticatedUser: [\"GET /user/migrations/{migration_id}\"],\n getStatusForOrg: [\"GET /orgs/{org}/migrations/{migration_id}\"],\n listForAuthenticatedUser: [\"GET /user/migrations\"],\n listForOrg: [\"GET /orgs/{org}/migrations\"],\n listReposForAuthenticatedUser: [\n \"GET /user/migrations/{migration_id}/repositories\"\n ],\n listReposForOrg: [\"GET /orgs/{org}/migrations/{migration_id}/repositories\"],\n listReposForUser: [\n \"GET /user/migrations/{migration_id}/repositories\",\n {},\n { renamed: [\"migrations\", \"listReposForAuthenticatedUser\"] }\n ],\n mapCommitAuthor: [\n \"PATCH /repos/{owner}/{repo}/import/authors/{author_id}\",\n {},\n {\n deprecated: \"octokit.rest.migrations.mapCommitAuthor() is deprecated, see https://docs.github.com/rest/migrations/source-imports#map-a-commit-author\"\n }\n ],\n setLfsPreference: [\n \"PATCH /repos/{owner}/{repo}/import/lfs\",\n {},\n {\n deprecated: \"octokit.rest.migrations.setLfsPreference() is deprecated, see https://docs.github.com/rest/migrations/source-imports#update-git-lfs-preference\"\n }\n ],\n startForAuthenticatedUser: [\"POST /user/migrations\"],\n startForOrg: [\"POST /orgs/{org}/migrations\"],\n startImport: [\n \"PUT /repos/{owner}/{repo}/import\",\n {},\n {\n deprecated: \"octokit.rest.migrations.startImport() is deprecated, see https://docs.github.com/rest/migrations/source-imports#start-an-import\"\n }\n ],\n unlockRepoForAuthenticatedUser: [\n \"DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock\"\n ],\n unlockRepoForOrg: [\n \"DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock\"\n ],\n updateImport: [\n \"PATCH /repos/{owner}/{repo}/import\",\n {},\n {\n deprecated: \"octokit.rest.migrations.updateImport() is deprecated, see https://docs.github.com/rest/migrations/source-imports#update-an-import\"\n }\n ]\n },\n oidc: {\n getOidcCustomSubTemplateForOrg: [\n \"GET /orgs/{org}/actions/oidc/customization/sub\"\n ],\n updateOidcCustomSubTemplateForOrg: [\n \"PUT /orgs/{org}/actions/oidc/customization/sub\"\n ]\n },\n orgs: {\n addSecurityManagerTeam: [\n \"PUT /orgs/{org}/security-managers/teams/{team_slug}\"\n ],\n assignTeamToOrgRole: [\n \"PUT /orgs/{org}/organization-roles/teams/{team_slug}/{role_id}\"\n ],\n assignUserToOrgRole: [\n \"PUT /orgs/{org}/organization-roles/users/{username}/{role_id}\"\n ],\n blockUser: [\"PUT /orgs/{org}/blocks/{username}\"],\n cancelInvitation: [\"DELETE /orgs/{org}/invitations/{invitation_id}\"],\n checkBlockedUser: [\"GET /orgs/{org}/blocks/{username}\"],\n checkMembershipForUser: [\"GET /orgs/{org}/members/{username}\"],\n checkPublicMembershipForUser: [\"GET /orgs/{org}/public_members/{username}\"],\n convertMemberToOutsideCollaborator: [\n \"PUT /orgs/{org}/outside_collaborators/{username}\"\n ],\n createCustomOrganizationRole: [\"POST /orgs/{org}/organization-roles\"],\n createInvitation: [\"POST /orgs/{org}/invitations\"],\n createOrUpdateCustomProperties: [\"PATCH /orgs/{org}/properties/schema\"],\n createOrUpdateCustomPropertiesValuesForRepos: [\n \"PATCH /orgs/{org}/properties/values\"\n ],\n createOrUpdateCustomProperty: [\n \"PUT /orgs/{org}/properties/schema/{custom_property_name}\"\n ],\n createWebhook: [\"POST /orgs/{org}/hooks\"],\n delete: [\"DELETE /orgs/{org}\"],\n deleteCustomOrganizationRole: [\n \"DELETE /orgs/{org}/organization-roles/{role_id}\"\n ],\n deleteWebhook: [\"DELETE /orgs/{org}/hooks/{hook_id}\"],\n enableOrDisableSecurityProductOnAllOrgRepos: [\n \"POST /orgs/{org}/{security_product}/{enablement}\"\n ],\n get: [\"GET /orgs/{org}\"],\n getAllCustomProperties: [\"GET /orgs/{org}/properties/schema\"],\n getCustomProperty: [\n \"GET /orgs/{org}/properties/schema/{custom_property_name}\"\n ],\n getMembershipForAuthenticatedUser: [\"GET /user/memberships/orgs/{org}\"],\n getMembershipForUser: [\"GET /orgs/{org}/memberships/{username}\"],\n getOrgRole: [\"GET /orgs/{org}/organization-roles/{role_id}\"],\n getWebhook: [\"GET /orgs/{org}/hooks/{hook_id}\"],\n getWebhookConfigForOrg: [\"GET /orgs/{org}/hooks/{hook_id}/config\"],\n getWebhookDelivery: [\n \"GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}\"\n ],\n list: [\"GET /organizations\"],\n listAppInstallations: [\"GET /orgs/{org}/installations\"],\n listBlockedUsers: [\"GET /orgs/{org}/blocks\"],\n listCustomPropertiesValuesForRepos: [\"GET /orgs/{org}/properties/values\"],\n listFailedInvitations: [\"GET /orgs/{org}/failed_invitations\"],\n listForAuthenticatedUser: [\"GET /user/orgs\"],\n listForUser: [\"GET /users/{username}/orgs\"],\n listInvitationTeams: [\"GET /orgs/{org}/invitations/{invitation_id}/teams\"],\n listMembers: [\"GET /orgs/{org}/members\"],\n listMembershipsForAuthenticatedUser: [\"GET /user/memberships/orgs\"],\n listOrgRoleTeams: [\"GET /orgs/{org}/organization-roles/{role_id}/teams\"],\n listOrgRoleUsers: [\"GET /orgs/{org}/organization-roles/{role_id}/users\"],\n listOrgRoles: [\"GET /orgs/{org}/organization-roles\"],\n listOrganizationFineGrainedPermissions: [\n \"GET /orgs/{org}/organization-fine-grained-permissions\"\n ],\n listOutsideCollaborators: [\"GET /orgs/{org}/outside_collaborators\"],\n listPatGrantRepositories: [\n \"GET /orgs/{org}/personal-access-tokens/{pat_id}/repositories\"\n ],\n listPatGrantRequestRepositories: [\n \"GET /orgs/{org}/personal-access-token-requests/{pat_request_id}/repositories\"\n ],\n listPatGrantRequests: [\"GET /orgs/{org}/personal-access-token-requests\"],\n listPatGrants: [\"GET /orgs/{org}/personal-access-tokens\"],\n listPendingInvitations: [\"GET /orgs/{org}/invitations\"],\n listPublicMembers: [\"GET /orgs/{org}/public_members\"],\n listSecurityManagerTeams: [\"GET /orgs/{org}/security-managers\"],\n listWebhookDeliveries: [\"GET /orgs/{org}/hooks/{hook_id}/deliveries\"],\n listWebhooks: [\"GET /orgs/{org}/hooks\"],\n patchCustomOrganizationRole: [\n \"PATCH /orgs/{org}/organization-roles/{role_id}\"\n ],\n pingWebhook: [\"POST /orgs/{org}/hooks/{hook_id}/pings\"],\n redeliverWebhookDelivery: [\n \"POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts\"\n ],\n removeCustomProperty: [\n \"DELETE /orgs/{org}/properties/schema/{custom_property_name}\"\n ],\n removeMember: [\"DELETE /orgs/{org}/members/{username}\"],\n removeMembershipForUser: [\"DELETE /orgs/{org}/memberships/{username}\"],\n removeOutsideCollaborator: [\n \"DELETE /orgs/{org}/outside_collaborators/{username}\"\n ],\n removePublicMembershipForAuthenticatedUser: [\n \"DELETE /orgs/{org}/public_members/{username}\"\n ],\n removeSecurityManagerTeam: [\n \"DELETE /orgs/{org}/security-managers/teams/{team_slug}\"\n ],\n reviewPatGrantRequest: [\n \"POST /orgs/{org}/personal-access-token-requests/{pat_request_id}\"\n ],\n reviewPatGrantRequestsInBulk: [\n \"POST /orgs/{org}/personal-access-token-requests\"\n ],\n revokeAllOrgRolesTeam: [\n \"DELETE /orgs/{org}/organization-roles/teams/{team_slug}\"\n ],\n revokeAllOrgRolesUser: [\n \"DELETE /orgs/{org}/organization-roles/users/{username}\"\n ],\n revokeOrgRoleTeam: [\n \"DELETE /orgs/{org}/organization-roles/teams/{team_slug}/{role_id}\"\n ],\n revokeOrgRoleUser: [\n \"DELETE /orgs/{org}/organization-roles/users/{username}/{role_id}\"\n ],\n setMembershipForUser: [\"PUT /orgs/{org}/memberships/{username}\"],\n setPublicMembershipForAuthenticatedUser: [\n \"PUT /orgs/{org}/public_members/{username}\"\n ],\n unblockUser: [\"DELETE /orgs/{org}/blocks/{username}\"],\n update: [\"PATCH /orgs/{org}\"],\n updateMembershipForAuthenticatedUser: [\n \"PATCH /user/memberships/orgs/{org}\"\n ],\n updatePatAccess: [\"POST /orgs/{org}/personal-access-tokens/{pat_id}\"],\n updatePatAccesses: [\"POST /orgs/{org}/personal-access-tokens\"],\n updateWebhook: [\"PATCH /orgs/{org}/hooks/{hook_id}\"],\n updateWebhookConfigForOrg: [\"PATCH /orgs/{org}/hooks/{hook_id}/config\"]\n },\n packages: {\n deletePackageForAuthenticatedUser: [\n \"DELETE /user/packages/{package_type}/{package_name}\"\n ],\n deletePackageForOrg: [\n \"DELETE /orgs/{org}/packages/{package_type}/{package_name}\"\n ],\n deletePackageForUser: [\n \"DELETE /users/{username}/packages/{package_type}/{package_name}\"\n ],\n deletePackageVersionForAuthenticatedUser: [\n \"DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}\"\n ],\n deletePackageVersionForOrg: [\n \"DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}\"\n ],\n deletePackageVersionForUser: [\n \"DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}\"\n ],\n getAllPackageVersionsForAPackageOwnedByAnOrg: [\n \"GET /orgs/{org}/packages/{package_type}/{package_name}/versions\",\n {},\n { renamed: [\"packages\", \"getAllPackageVersionsForPackageOwnedByOrg\"] }\n ],\n getAllPackageVersionsForAPackageOwnedByTheAuthenticatedUser: [\n \"GET /user/packages/{package_type}/{package_name}/versions\",\n {},\n {\n renamed: [\n \"packages\",\n \"getAllPackageVersionsForPackageOwnedByAuthenticatedUser\"\n ]\n }\n ],\n getAllPackageVersionsForPackageOwnedByAuthenticatedUser: [\n \"GET /user/packages/{package_type}/{package_name}/versions\"\n ],\n getAllPackageVersionsForPackageOwnedByOrg: [\n \"GET /orgs/{org}/packages/{package_type}/{package_name}/versions\"\n ],\n getAllPackageVersionsForPackageOwnedByUser: [\n \"GET /users/{username}/packages/{package_type}/{package_name}/versions\"\n ],\n getPackageForAuthenticatedUser: [\n \"GET /user/packages/{package_type}/{package_name}\"\n ],\n getPackageForOrganization: [\n \"GET /orgs/{org}/packages/{package_type}/{package_name}\"\n ],\n getPackageForUser: [\n \"GET /users/{username}/packages/{package_type}/{package_name}\"\n ],\n getPackageVersionForAuthenticatedUser: [\n \"GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}\"\n ],\n getPackageVersionForOrganization: [\n \"GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}\"\n ],\n getPackageVersionForUser: [\n \"GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}\"\n ],\n listDockerMigrationConflictingPackagesForAuthenticatedUser: [\n \"GET /user/docker/conflicts\"\n ],\n listDockerMigrationConflictingPackagesForOrganization: [\n \"GET /orgs/{org}/docker/conflicts\"\n ],\n listDockerMigrationConflictingPackagesForUser: [\n \"GET /users/{username}/docker/conflicts\"\n ],\n listPackagesForAuthenticatedUser: [\"GET /user/packages\"],\n listPackagesForOrganization: [\"GET /orgs/{org}/packages\"],\n listPackagesForUser: [\"GET /users/{username}/packages\"],\n restorePackageForAuthenticatedUser: [\n \"POST /user/packages/{package_type}/{package_name}/restore{?token}\"\n ],\n restorePackageForOrg: [\n \"POST /orgs/{org}/packages/{package_type}/{package_name}/restore{?token}\"\n ],\n restorePackageForUser: [\n \"POST /users/{username}/packages/{package_type}/{package_name}/restore{?token}\"\n ],\n restorePackageVersionForAuthenticatedUser: [\n \"POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore\"\n ],\n restorePackageVersionForOrg: [\n \"POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore\"\n ],\n restorePackageVersionForUser: [\n \"POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore\"\n ]\n },\n projects: {\n addCollaborator: [\"PUT /projects/{project_id}/collaborators/{username}\"],\n createCard: [\"POST /projects/columns/{column_id}/cards\"],\n createColumn: [\"POST /projects/{project_id}/columns\"],\n createForAuthenticatedUser: [\"POST /user/projects\"],\n createForOrg: [\"POST /orgs/{org}/projects\"],\n createForRepo: [\"POST /repos/{owner}/{repo}/projects\"],\n delete: [\"DELETE /projects/{project_id}\"],\n deleteCard: [\"DELETE /projects/columns/cards/{card_id}\"],\n deleteColumn: [\"DELETE /projects/columns/{column_id}\"],\n get: [\"GET /projects/{project_id}\"],\n getCard: [\"GET /projects/columns/cards/{card_id}\"],\n getColumn: [\"GET /projects/columns/{column_id}\"],\n getPermissionForUser: [\n \"GET /projects/{project_id}/collaborators/{username}/permission\"\n ],\n listCards: [\"GET /projects/columns/{column_id}/cards\"],\n listCollaborators: [\"GET /projects/{project_id}/collaborators\"],\n listColumns: [\"GET /projects/{project_id}/columns\"],\n listForOrg: [\"GET /orgs/{org}/projects\"],\n listForRepo: [\"GET /repos/{owner}/{repo}/projects\"],\n listForUser: [\"GET /users/{username}/projects\"],\n moveCard: [\"POST /projects/columns/cards/{card_id}/moves\"],\n moveColumn: [\"POST /projects/columns/{column_id}/moves\"],\n removeCollaborator: [\n \"DELETE /projects/{project_id}/collaborators/{username}\"\n ],\n update: [\"PATCH /projects/{project_id}\"],\n updateCard: [\"PATCH /projects/columns/cards/{card_id}\"],\n updateColumn: [\"PATCH /projects/columns/{column_id}\"]\n },\n pulls: {\n checkIfMerged: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/merge\"],\n create: [\"POST /repos/{owner}/{repo}/pulls\"],\n createReplyForReviewComment: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies\"\n ],\n createReview: [\"POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews\"],\n createReviewComment: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/comments\"\n ],\n deletePendingReview: [\n \"DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}\"\n ],\n deleteReviewComment: [\n \"DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}\"\n ],\n dismissReview: [\n \"PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals\"\n ],\n get: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}\"],\n getReview: [\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}\"\n ],\n getReviewComment: [\"GET /repos/{owner}/{repo}/pulls/comments/{comment_id}\"],\n list: [\"GET /repos/{owner}/{repo}/pulls\"],\n listCommentsForReview: [\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments\"\n ],\n listCommits: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/commits\"],\n listFiles: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/files\"],\n listRequestedReviewers: [\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers\"\n ],\n listReviewComments: [\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/comments\"\n ],\n listReviewCommentsForRepo: [\"GET /repos/{owner}/{repo}/pulls/comments\"],\n listReviews: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews\"],\n merge: [\"PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge\"],\n removeRequestedReviewers: [\n \"DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers\"\n ],\n requestReviewers: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers\"\n ],\n submitReview: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events\"\n ],\n update: [\"PATCH /repos/{owner}/{repo}/pulls/{pull_number}\"],\n updateBranch: [\n \"PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch\"\n ],\n updateReview: [\n \"PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}\"\n ],\n updateReviewComment: [\n \"PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}\"\n ]\n },\n rateLimit: { get: [\"GET /rate_limit\"] },\n reactions: {\n createForCommitComment: [\n \"POST /repos/{owner}/{repo}/comments/{comment_id}/reactions\"\n ],\n createForIssue: [\n \"POST /repos/{owner}/{repo}/issues/{issue_number}/reactions\"\n ],\n createForIssueComment: [\n \"POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions\"\n ],\n createForPullRequestReviewComment: [\n \"POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions\"\n ],\n createForRelease: [\n \"POST /repos/{owner}/{repo}/releases/{release_id}/reactions\"\n ],\n createForTeamDiscussionCommentInOrg: [\n \"POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions\"\n ],\n createForTeamDiscussionInOrg: [\n \"POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions\"\n ],\n deleteForCommitComment: [\n \"DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}\"\n ],\n deleteForIssue: [\n \"DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}\"\n ],\n deleteForIssueComment: [\n \"DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}\"\n ],\n deleteForPullRequestComment: [\n \"DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}\"\n ],\n deleteForRelease: [\n \"DELETE /repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}\"\n ],\n deleteForTeamDiscussion: [\n \"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}\"\n ],\n deleteForTeamDiscussionComment: [\n \"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}\"\n ],\n listForCommitComment: [\n \"GET /repos/{owner}/{repo}/comments/{comment_id}/reactions\"\n ],\n listForIssue: [\"GET /repos/{owner}/{repo}/issues/{issue_number}/reactions\"],\n listForIssueComment: [\n \"GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions\"\n ],\n listForPullRequestReviewComment: [\n \"GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions\"\n ],\n listForRelease: [\n \"GET /repos/{owner}/{repo}/releases/{release_id}/reactions\"\n ],\n listForTeamDiscussionCommentInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions\"\n ],\n listForTeamDiscussionInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions\"\n ]\n },\n repos: {\n acceptInvitation: [\n \"PATCH /user/repository_invitations/{invitation_id}\",\n {},\n { renamed: [\"repos\", \"acceptInvitationForAuthenticatedUser\"] }\n ],\n acceptInvitationForAuthenticatedUser: [\n \"PATCH /user/repository_invitations/{invitation_id}\"\n ],\n addAppAccessRestrictions: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps\",\n {},\n { mapToData: \"apps\" }\n ],\n addCollaborator: [\"PUT /repos/{owner}/{repo}/collaborators/{username}\"],\n addStatusCheckContexts: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts\",\n {},\n { mapToData: \"contexts\" }\n ],\n addTeamAccessRestrictions: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams\",\n {},\n { mapToData: \"teams\" }\n ],\n addUserAccessRestrictions: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users\",\n {},\n { mapToData: \"users\" }\n ],\n cancelPagesDeployment: [\n \"POST /repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}/cancel\"\n ],\n checkAutomatedSecurityFixes: [\n \"GET /repos/{owner}/{repo}/automated-security-fixes\"\n ],\n checkCollaborator: [\"GET /repos/{owner}/{repo}/collaborators/{username}\"],\n checkVulnerabilityAlerts: [\n \"GET /repos/{owner}/{repo}/vulnerability-alerts\"\n ],\n codeownersErrors: [\"GET /repos/{owner}/{repo}/codeowners/errors\"],\n compareCommits: [\"GET /repos/{owner}/{repo}/compare/{base}...{head}\"],\n compareCommitsWithBasehead: [\n \"GET /repos/{owner}/{repo}/compare/{basehead}\"\n ],\n createAutolink: [\"POST /repos/{owner}/{repo}/autolinks\"],\n createCommitComment: [\n \"POST /repos/{owner}/{repo}/commits/{commit_sha}/comments\"\n ],\n createCommitSignatureProtection: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures\"\n ],\n createCommitStatus: [\"POST /repos/{owner}/{repo}/statuses/{sha}\"],\n createDeployKey: [\"POST /repos/{owner}/{repo}/keys\"],\n createDeployment: [\"POST /repos/{owner}/{repo}/deployments\"],\n createDeploymentBranchPolicy: [\n \"POST /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies\"\n ],\n createDeploymentProtectionRule: [\n \"POST /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules\"\n ],\n createDeploymentStatus: [\n \"POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses\"\n ],\n createDispatchEvent: [\"POST /repos/{owner}/{repo}/dispatches\"],\n createForAuthenticatedUser: [\"POST /user/repos\"],\n createFork: [\"POST /repos/{owner}/{repo}/forks\"],\n createInOrg: [\"POST /orgs/{org}/repos\"],\n createOrUpdateCustomPropertiesValues: [\n \"PATCH /repos/{owner}/{repo}/properties/values\"\n ],\n createOrUpdateEnvironment: [\n \"PUT /repos/{owner}/{repo}/environments/{environment_name}\"\n ],\n createOrUpdateFileContents: [\"PUT /repos/{owner}/{repo}/contents/{path}\"],\n createOrgRuleset: [\"POST /orgs/{org}/rulesets\"],\n createPagesDeployment: [\"POST /repos/{owner}/{repo}/pages/deployments\"],\n createPagesSite: [\"POST /repos/{owner}/{repo}/pages\"],\n createRelease: [\"POST /repos/{owner}/{repo}/releases\"],\n createRepoRuleset: [\"POST /repos/{owner}/{repo}/rulesets\"],\n createTagProtection: [\"POST /repos/{owner}/{repo}/tags/protection\"],\n createUsingTemplate: [\n \"POST /repos/{template_owner}/{template_repo}/generate\"\n ],\n createWebhook: [\"POST /repos/{owner}/{repo}/hooks\"],\n declineInvitation: [\n \"DELETE /user/repository_invitations/{invitation_id}\",\n {},\n { renamed: [\"repos\", \"declineInvitationForAuthenticatedUser\"] }\n ],\n declineInvitationForAuthenticatedUser: [\n \"DELETE /user/repository_invitations/{invitation_id}\"\n ],\n delete: [\"DELETE /repos/{owner}/{repo}\"],\n deleteAccessRestrictions: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions\"\n ],\n deleteAdminBranchProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins\"\n ],\n deleteAnEnvironment: [\n \"DELETE /repos/{owner}/{repo}/environments/{environment_name}\"\n ],\n deleteAutolink: [\"DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}\"],\n deleteBranchProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection\"\n ],\n deleteCommitComment: [\"DELETE /repos/{owner}/{repo}/comments/{comment_id}\"],\n deleteCommitSignatureProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures\"\n ],\n deleteDeployKey: [\"DELETE /repos/{owner}/{repo}/keys/{key_id}\"],\n deleteDeployment: [\n \"DELETE /repos/{owner}/{repo}/deployments/{deployment_id}\"\n ],\n deleteDeploymentBranchPolicy: [\n \"DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}\"\n ],\n deleteFile: [\"DELETE /repos/{owner}/{repo}/contents/{path}\"],\n deleteInvitation: [\n \"DELETE /repos/{owner}/{repo}/invitations/{invitation_id}\"\n ],\n deleteOrgRuleset: [\"DELETE /orgs/{org}/rulesets/{ruleset_id}\"],\n deletePagesSite: [\"DELETE /repos/{owner}/{repo}/pages\"],\n deletePullRequestReviewProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews\"\n ],\n deleteRelease: [\"DELETE /repos/{owner}/{repo}/releases/{release_id}\"],\n deleteReleaseAsset: [\n \"DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}\"\n ],\n deleteRepoRuleset: [\"DELETE /repos/{owner}/{repo}/rulesets/{ruleset_id}\"],\n deleteTagProtection: [\n \"DELETE /repos/{owner}/{repo}/tags/protection/{tag_protection_id}\"\n ],\n deleteWebhook: [\"DELETE /repos/{owner}/{repo}/hooks/{hook_id}\"],\n disableAutomatedSecurityFixes: [\n \"DELETE /repos/{owner}/{repo}/automated-security-fixes\"\n ],\n disableDeploymentProtectionRule: [\n \"DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}\"\n ],\n disablePrivateVulnerabilityReporting: [\n \"DELETE /repos/{owner}/{repo}/private-vulnerability-reporting\"\n ],\n disableVulnerabilityAlerts: [\n \"DELETE /repos/{owner}/{repo}/vulnerability-alerts\"\n ],\n downloadArchive: [\n \"GET /repos/{owner}/{repo}/zipball/{ref}\",\n {},\n { renamed: [\"repos\", \"downloadZipballArchive\"] }\n ],\n downloadTarballArchive: [\"GET /repos/{owner}/{repo}/tarball/{ref}\"],\n downloadZipballArchive: [\"GET /repos/{owner}/{repo}/zipball/{ref}\"],\n enableAutomatedSecurityFixes: [\n \"PUT /repos/{owner}/{repo}/automated-security-fixes\"\n ],\n enablePrivateVulnerabilityReporting: [\n \"PUT /repos/{owner}/{repo}/private-vulnerability-reporting\"\n ],\n enableVulnerabilityAlerts: [\n \"PUT /repos/{owner}/{repo}/vulnerability-alerts\"\n ],\n generateReleaseNotes: [\n \"POST /repos/{owner}/{repo}/releases/generate-notes\"\n ],\n get: [\"GET /repos/{owner}/{repo}\"],\n getAccessRestrictions: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions\"\n ],\n getAdminBranchProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins\"\n ],\n getAllDeploymentProtectionRules: [\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules\"\n ],\n getAllEnvironments: [\"GET /repos/{owner}/{repo}/environments\"],\n getAllStatusCheckContexts: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts\"\n ],\n getAllTopics: [\"GET /repos/{owner}/{repo}/topics\"],\n getAppsWithAccessToProtectedBranch: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps\"\n ],\n getAutolink: [\"GET /repos/{owner}/{repo}/autolinks/{autolink_id}\"],\n getBranch: [\"GET /repos/{owner}/{repo}/branches/{branch}\"],\n getBranchProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection\"\n ],\n getBranchRules: [\"GET /repos/{owner}/{repo}/rules/branches/{branch}\"],\n getClones: [\"GET /repos/{owner}/{repo}/traffic/clones\"],\n getCodeFrequencyStats: [\"GET /repos/{owner}/{repo}/stats/code_frequency\"],\n getCollaboratorPermissionLevel: [\n \"GET /repos/{owner}/{repo}/collaborators/{username}/permission\"\n ],\n getCombinedStatusForRef: [\"GET /repos/{owner}/{repo}/commits/{ref}/status\"],\n getCommit: [\"GET /repos/{owner}/{repo}/commits/{ref}\"],\n getCommitActivityStats: [\"GET /repos/{owner}/{repo}/stats/commit_activity\"],\n getCommitComment: [\"GET /repos/{owner}/{repo}/comments/{comment_id}\"],\n getCommitSignatureProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures\"\n ],\n getCommunityProfileMetrics: [\"GET /repos/{owner}/{repo}/community/profile\"],\n getContent: [\"GET /repos/{owner}/{repo}/contents/{path}\"],\n getContributorsStats: [\"GET /repos/{owner}/{repo}/stats/contributors\"],\n getCustomDeploymentProtectionRule: [\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}\"\n ],\n getCustomPropertiesValues: [\"GET /repos/{owner}/{repo}/properties/values\"],\n getDeployKey: [\"GET /repos/{owner}/{repo}/keys/{key_id}\"],\n getDeployment: [\"GET /repos/{owner}/{repo}/deployments/{deployment_id}\"],\n getDeploymentBranchPolicy: [\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}\"\n ],\n getDeploymentStatus: [\n \"GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}\"\n ],\n getEnvironment: [\n \"GET /repos/{owner}/{repo}/environments/{environment_name}\"\n ],\n getLatestPagesBuild: [\"GET /repos/{owner}/{repo}/pages/builds/latest\"],\n getLatestRelease: [\"GET /repos/{owner}/{repo}/releases/latest\"],\n getOrgRuleSuite: [\"GET /orgs/{org}/rulesets/rule-suites/{rule_suite_id}\"],\n getOrgRuleSuites: [\"GET /orgs/{org}/rulesets/rule-suites\"],\n getOrgRuleset: [\"GET /orgs/{org}/rulesets/{ruleset_id}\"],\n getOrgRulesets: [\"GET /orgs/{org}/rulesets\"],\n getPages: [\"GET /repos/{owner}/{repo}/pages\"],\n getPagesBuild: [\"GET /repos/{owner}/{repo}/pages/builds/{build_id}\"],\n getPagesDeployment: [\n \"GET /repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}\"\n ],\n getPagesHealthCheck: [\"GET /repos/{owner}/{repo}/pages/health\"],\n getParticipationStats: [\"GET /repos/{owner}/{repo}/stats/participation\"],\n getPullRequestReviewProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews\"\n ],\n getPunchCardStats: [\"GET /repos/{owner}/{repo}/stats/punch_card\"],\n getReadme: [\"GET /repos/{owner}/{repo}/readme\"],\n getReadmeInDirectory: [\"GET /repos/{owner}/{repo}/readme/{dir}\"],\n getRelease: [\"GET /repos/{owner}/{repo}/releases/{release_id}\"],\n getReleaseAsset: [\"GET /repos/{owner}/{repo}/releases/assets/{asset_id}\"],\n getReleaseByTag: [\"GET /repos/{owner}/{repo}/releases/tags/{tag}\"],\n getRepoRuleSuite: [\n \"GET /repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id}\"\n ],\n getRepoRuleSuites: [\"GET /repos/{owner}/{repo}/rulesets/rule-suites\"],\n getRepoRuleset: [\"GET /repos/{owner}/{repo}/rulesets/{ruleset_id}\"],\n getRepoRulesets: [\"GET /repos/{owner}/{repo}/rulesets\"],\n getStatusChecksProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks\"\n ],\n getTeamsWithAccessToProtectedBranch: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams\"\n ],\n getTopPaths: [\"GET /repos/{owner}/{repo}/traffic/popular/paths\"],\n getTopReferrers: [\"GET /repos/{owner}/{repo}/traffic/popular/referrers\"],\n getUsersWithAccessToProtectedBranch: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users\"\n ],\n getViews: [\"GET /repos/{owner}/{repo}/traffic/views\"],\n getWebhook: [\"GET /repos/{owner}/{repo}/hooks/{hook_id}\"],\n getWebhookConfigForRepo: [\n \"GET /repos/{owner}/{repo}/hooks/{hook_id}/config\"\n ],\n getWebhookDelivery: [\n \"GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}\"\n ],\n listActivities: [\"GET /repos/{owner}/{repo}/activity\"],\n listAutolinks: [\"GET /repos/{owner}/{repo}/autolinks\"],\n listBranches: [\"GET /repos/{owner}/{repo}/branches\"],\n listBranchesForHeadCommit: [\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head\"\n ],\n listCollaborators: [\"GET /repos/{owner}/{repo}/collaborators\"],\n listCommentsForCommit: [\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/comments\"\n ],\n listCommitCommentsForRepo: [\"GET /repos/{owner}/{repo}/comments\"],\n listCommitStatusesForRef: [\n \"GET /repos/{owner}/{repo}/commits/{ref}/statuses\"\n ],\n listCommits: [\"GET /repos/{owner}/{repo}/commits\"],\n listContributors: [\"GET /repos/{owner}/{repo}/contributors\"],\n listCustomDeploymentRuleIntegrations: [\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps\"\n ],\n listDeployKeys: [\"GET /repos/{owner}/{repo}/keys\"],\n listDeploymentBranchPolicies: [\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies\"\n ],\n listDeploymentStatuses: [\n \"GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses\"\n ],\n listDeployments: [\"GET /repos/{owner}/{repo}/deployments\"],\n listForAuthenticatedUser: [\"GET /user/repos\"],\n listForOrg: [\"GET /orgs/{org}/repos\"],\n listForUser: [\"GET /users/{username}/repos\"],\n listForks: [\"GET /repos/{owner}/{repo}/forks\"],\n listInvitations: [\"GET /repos/{owner}/{repo}/invitations\"],\n listInvitationsForAuthenticatedUser: [\"GET /user/repository_invitations\"],\n listLanguages: [\"GET /repos/{owner}/{repo}/languages\"],\n listPagesBuilds: [\"GET /repos/{owner}/{repo}/pages/builds\"],\n listPublic: [\"GET /repositories\"],\n listPullRequestsAssociatedWithCommit: [\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls\"\n ],\n listReleaseAssets: [\n \"GET /repos/{owner}/{repo}/releases/{release_id}/assets\"\n ],\n listReleases: [\"GET /repos/{owner}/{repo}/releases\"],\n listTagProtection: [\"GET /repos/{owner}/{repo}/tags/protection\"],\n listTags: [\"GET /repos/{owner}/{repo}/tags\"],\n listTeams: [\"GET /repos/{owner}/{repo}/teams\"],\n listWebhookDeliveries: [\n \"GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries\"\n ],\n listWebhooks: [\"GET /repos/{owner}/{repo}/hooks\"],\n merge: [\"POST /repos/{owner}/{repo}/merges\"],\n mergeUpstream: [\"POST /repos/{owner}/{repo}/merge-upstream\"],\n pingWebhook: [\"POST /repos/{owner}/{repo}/hooks/{hook_id}/pings\"],\n redeliverWebhookDelivery: [\n \"POST /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts\"\n ],\n removeAppAccessRestrictions: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps\",\n {},\n { mapToData: \"apps\" }\n ],\n removeCollaborator: [\n \"DELETE /repos/{owner}/{repo}/collaborators/{username}\"\n ],\n removeStatusCheckContexts: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts\",\n {},\n { mapToData: \"contexts\" }\n ],\n removeStatusCheckProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks\"\n ],\n removeTeamAccessRestrictions: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams\",\n {},\n { mapToData: \"teams\" }\n ],\n removeUserAccessRestrictions: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users\",\n {},\n { mapToData: \"users\" }\n ],\n renameBranch: [\"POST /repos/{owner}/{repo}/branches/{branch}/rename\"],\n replaceAllTopics: [\"PUT /repos/{owner}/{repo}/topics\"],\n requestPagesBuild: [\"POST /repos/{owner}/{repo}/pages/builds\"],\n setAdminBranchProtection: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins\"\n ],\n setAppAccessRestrictions: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps\",\n {},\n { mapToData: \"apps\" }\n ],\n setStatusCheckContexts: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts\",\n {},\n { mapToData: \"contexts\" }\n ],\n setTeamAccessRestrictions: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams\",\n {},\n { mapToData: \"teams\" }\n ],\n setUserAccessRestrictions: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users\",\n {},\n { mapToData: \"users\" }\n ],\n testPushWebhook: [\"POST /repos/{owner}/{repo}/hooks/{hook_id}/tests\"],\n transfer: [\"POST /repos/{owner}/{repo}/transfer\"],\n update: [\"PATCH /repos/{owner}/{repo}\"],\n updateBranchProtection: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection\"\n ],\n updateCommitComment: [\"PATCH /repos/{owner}/{repo}/comments/{comment_id}\"],\n updateDeploymentBranchPolicy: [\n \"PUT /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}\"\n ],\n updateInformationAboutPagesSite: [\"PUT /repos/{owner}/{repo}/pages\"],\n updateInvitation: [\n \"PATCH /repos/{owner}/{repo}/invitations/{invitation_id}\"\n ],\n updateOrgRuleset: [\"PUT /orgs/{org}/rulesets/{ruleset_id}\"],\n updatePullRequestReviewProtection: [\n \"PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews\"\n ],\n updateRelease: [\"PATCH /repos/{owner}/{repo}/releases/{release_id}\"],\n updateReleaseAsset: [\n \"PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}\"\n ],\n updateRepoRuleset: [\"PUT /repos/{owner}/{repo}/rulesets/{ruleset_id}\"],\n updateStatusCheckPotection: [\n \"PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks\",\n {},\n { renamed: [\"repos\", \"updateStatusCheckProtection\"] }\n ],\n updateStatusCheckProtection: [\n \"PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks\"\n ],\n updateWebhook: [\"PATCH /repos/{owner}/{repo}/hooks/{hook_id}\"],\n updateWebhookConfigForRepo: [\n \"PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config\"\n ],\n uploadReleaseAsset: [\n \"POST /repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}\",\n { baseUrl: \"https://uploads.github.com\" }\n ]\n },\n search: {\n code: [\"GET /search/code\"],\n commits: [\"GET /search/commits\"],\n issuesAndPullRequests: [\"GET /search/issues\"],\n labels: [\"GET /search/labels\"],\n repos: [\"GET /search/repositories\"],\n topics: [\"GET /search/topics\"],\n users: [\"GET /search/users\"]\n },\n secretScanning: {\n getAlert: [\n \"GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}\"\n ],\n listAlertsForEnterprise: [\n \"GET /enterprises/{enterprise}/secret-scanning/alerts\"\n ],\n listAlertsForOrg: [\"GET /orgs/{org}/secret-scanning/alerts\"],\n listAlertsForRepo: [\"GET /repos/{owner}/{repo}/secret-scanning/alerts\"],\n listLocationsForAlert: [\n \"GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations\"\n ],\n updateAlert: [\n \"PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}\"\n ]\n },\n securityAdvisories: {\n createFork: [\n \"POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/forks\"\n ],\n createPrivateVulnerabilityReport: [\n \"POST /repos/{owner}/{repo}/security-advisories/reports\"\n ],\n createRepositoryAdvisory: [\n \"POST /repos/{owner}/{repo}/security-advisories\"\n ],\n createRepositoryAdvisoryCveRequest: [\n \"POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/cve\"\n ],\n getGlobalAdvisory: [\"GET /advisories/{ghsa_id}\"],\n getRepositoryAdvisory: [\n \"GET /repos/{owner}/{repo}/security-advisories/{ghsa_id}\"\n ],\n listGlobalAdvisories: [\"GET /advisories\"],\n listOrgRepositoryAdvisories: [\"GET /orgs/{org}/security-advisories\"],\n listRepositoryAdvisories: [\"GET /repos/{owner}/{repo}/security-advisories\"],\n updateRepositoryAdvisory: [\n \"PATCH /repos/{owner}/{repo}/security-advisories/{ghsa_id}\"\n ]\n },\n teams: {\n addOrUpdateMembershipForUserInOrg: [\n \"PUT /orgs/{org}/teams/{team_slug}/memberships/{username}\"\n ],\n addOrUpdateProjectPermissionsInOrg: [\n \"PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}\"\n ],\n addOrUpdateRepoPermissionsInOrg: [\n \"PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}\"\n ],\n checkPermissionsForProjectInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/projects/{project_id}\"\n ],\n checkPermissionsForRepoInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}\"\n ],\n create: [\"POST /orgs/{org}/teams\"],\n createDiscussionCommentInOrg: [\n \"POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments\"\n ],\n createDiscussionInOrg: [\"POST /orgs/{org}/teams/{team_slug}/discussions\"],\n deleteDiscussionCommentInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}\"\n ],\n deleteDiscussionInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}\"\n ],\n deleteInOrg: [\"DELETE /orgs/{org}/teams/{team_slug}\"],\n getByName: [\"GET /orgs/{org}/teams/{team_slug}\"],\n getDiscussionCommentInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}\"\n ],\n getDiscussionInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}\"\n ],\n getMembershipForUserInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/memberships/{username}\"\n ],\n list: [\"GET /orgs/{org}/teams\"],\n listChildInOrg: [\"GET /orgs/{org}/teams/{team_slug}/teams\"],\n listDiscussionCommentsInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments\"\n ],\n listDiscussionsInOrg: [\"GET /orgs/{org}/teams/{team_slug}/discussions\"],\n listForAuthenticatedUser: [\"GET /user/teams\"],\n listMembersInOrg: [\"GET /orgs/{org}/teams/{team_slug}/members\"],\n listPendingInvitationsInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/invitations\"\n ],\n listProjectsInOrg: [\"GET /orgs/{org}/teams/{team_slug}/projects\"],\n listReposInOrg: [\"GET /orgs/{org}/teams/{team_slug}/repos\"],\n removeMembershipForUserInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}\"\n ],\n removeProjectInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}\"\n ],\n removeRepoInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}\"\n ],\n updateDiscussionCommentInOrg: [\n \"PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}\"\n ],\n updateDiscussionInOrg: [\n \"PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}\"\n ],\n updateInOrg: [\"PATCH /orgs/{org}/teams/{team_slug}\"]\n },\n users: {\n addEmailForAuthenticated: [\n \"POST /user/emails\",\n {},\n { renamed: [\"users\", \"addEmailForAuthenticatedUser\"] }\n ],\n addEmailForAuthenticatedUser: [\"POST /user/emails\"],\n addSocialAccountForAuthenticatedUser: [\"POST /user/social_accounts\"],\n block: [\"PUT /user/blocks/{username}\"],\n checkBlocked: [\"GET /user/blocks/{username}\"],\n checkFollowingForUser: [\"GET /users/{username}/following/{target_user}\"],\n checkPersonIsFollowedByAuthenticated: [\"GET /user/following/{username}\"],\n createGpgKeyForAuthenticated: [\n \"POST /user/gpg_keys\",\n {},\n { renamed: [\"users\", \"createGpgKeyForAuthenticatedUser\"] }\n ],\n createGpgKeyForAuthenticatedUser: [\"POST /user/gpg_keys\"],\n createPublicSshKeyForAuthenticated: [\n \"POST /user/keys\",\n {},\n { renamed: [\"users\", \"createPublicSshKeyForAuthenticatedUser\"] }\n ],\n createPublicSshKeyForAuthenticatedUser: [\"POST /user/keys\"],\n createSshSigningKeyForAuthenticatedUser: [\"POST /user/ssh_signing_keys\"],\n deleteEmailForAuthenticated: [\n \"DELETE /user/emails\",\n {},\n { renamed: [\"users\", \"deleteEmailForAuthenticatedUser\"] }\n ],\n deleteEmailForAuthenticatedUser: [\"DELETE /user/emails\"],\n deleteGpgKeyForAuthenticated: [\n \"DELETE /user/gpg_keys/{gpg_key_id}\",\n {},\n { renamed: [\"users\", \"deleteGpgKeyForAuthenticatedUser\"] }\n ],\n deleteGpgKeyForAuthenticatedUser: [\"DELETE /user/gpg_keys/{gpg_key_id}\"],\n deletePublicSshKeyForAuthenticated: [\n \"DELETE /user/keys/{key_id}\",\n {},\n { renamed: [\"users\", \"deletePublicSshKeyForAuthenticatedUser\"] }\n ],\n deletePublicSshKeyForAuthenticatedUser: [\"DELETE /user/keys/{key_id}\"],\n deleteSocialAccountForAuthenticatedUser: [\"DELETE /user/social_accounts\"],\n deleteSshSigningKeyForAuthenticatedUser: [\n \"DELETE /user/ssh_signing_keys/{ssh_signing_key_id}\"\n ],\n follow: [\"PUT /user/following/{username}\"],\n getAuthenticated: [\"GET /user\"],\n getByUsername: [\"GET /users/{username}\"],\n getContextForUser: [\"GET /users/{username}/hovercard\"],\n getGpgKeyForAuthenticated: [\n \"GET /user/gpg_keys/{gpg_key_id}\",\n {},\n { renamed: [\"users\", \"getGpgKeyForAuthenticatedUser\"] }\n ],\n getGpgKeyForAuthenticatedUser: [\"GET /user/gpg_keys/{gpg_key_id}\"],\n getPublicSshKeyForAuthenticated: [\n \"GET /user/keys/{key_id}\",\n {},\n { renamed: [\"users\", \"getPublicSshKeyForAuthenticatedUser\"] }\n ],\n getPublicSshKeyForAuthenticatedUser: [\"GET /user/keys/{key_id}\"],\n getSshSigningKeyForAuthenticatedUser: [\n \"GET /user/ssh_signing_keys/{ssh_signing_key_id}\"\n ],\n list: [\"GET /users\"],\n listBlockedByAuthenticated: [\n \"GET /user/blocks\",\n {},\n { renamed: [\"users\", \"listBlockedByAuthenticatedUser\"] }\n ],\n listBlockedByAuthenticatedUser: [\"GET /user/blocks\"],\n listEmailsForAuthenticated: [\n \"GET /user/emails\",\n {},\n { renamed: [\"users\", \"listEmailsForAuthenticatedUser\"] }\n ],\n listEmailsForAuthenticatedUser: [\"GET /user/emails\"],\n listFollowedByAuthenticated: [\n \"GET /user/following\",\n {},\n { renamed: [\"users\", \"listFollowedByAuthenticatedUser\"] }\n ],\n listFollowedByAuthenticatedUser: [\"GET /user/following\"],\n listFollowersForAuthenticatedUser: [\"GET /user/followers\"],\n listFollowersForUser: [\"GET /users/{username}/followers\"],\n listFollowingForUser: [\"GET /users/{username}/following\"],\n listGpgKeysForAuthenticated: [\n \"GET /user/gpg_keys\",\n {},\n { renamed: [\"users\", \"listGpgKeysForAuthenticatedUser\"] }\n ],\n listGpgKeysForAuthenticatedUser: [\"GET /user/gpg_keys\"],\n listGpgKeysForUser: [\"GET /users/{username}/gpg_keys\"],\n listPublicEmailsForAuthenticated: [\n \"GET /user/public_emails\",\n {},\n { renamed: [\"users\", \"listPublicEmailsForAuthenticatedUser\"] }\n ],\n listPublicEmailsForAuthenticatedUser: [\"GET /user/public_emails\"],\n listPublicKeysForUser: [\"GET /users/{username}/keys\"],\n listPublicSshKeysForAuthenticated: [\n \"GET /user/keys\",\n {},\n { renamed: [\"users\", \"listPublicSshKeysForAuthenticatedUser\"] }\n ],\n listPublicSshKeysForAuthenticatedUser: [\"GET /user/keys\"],\n listSocialAccountsForAuthenticatedUser: [\"GET /user/social_accounts\"],\n listSocialAccountsForUser: [\"GET /users/{username}/social_accounts\"],\n listSshSigningKeysForAuthenticatedUser: [\"GET /user/ssh_signing_keys\"],\n listSshSigningKeysForUser: [\"GET /users/{username}/ssh_signing_keys\"],\n setPrimaryEmailVisibilityForAuthenticated: [\n \"PATCH /user/email/visibility\",\n {},\n { renamed: [\"users\", \"setPrimaryEmailVisibilityForAuthenticatedUser\"] }\n ],\n setPrimaryEmailVisibilityForAuthenticatedUser: [\n \"PATCH /user/email/visibility\"\n ],\n unblock: [\"DELETE /user/blocks/{username}\"],\n unfollow: [\"DELETE /user/following/{username}\"],\n updateAuthenticated: [\"PATCH /user\"]\n }\n};\nvar endpoints_default = Endpoints;\n\n// pkg/dist-src/endpoints-to-methods.js\nvar endpointMethodsMap = /* @__PURE__ */ new Map();\nfor (const [scope, endpoints] of Object.entries(endpoints_default)) {\n for (const [methodName, endpoint] of Object.entries(endpoints)) {\n const [route, defaults, decorations] = endpoint;\n const [method, url] = route.split(/ /);\n const endpointDefaults = Object.assign(\n {\n method,\n url\n },\n defaults\n );\n if (!endpointMethodsMap.has(scope)) {\n endpointMethodsMap.set(scope, /* @__PURE__ */ new Map());\n }\n endpointMethodsMap.get(scope).set(methodName, {\n scope,\n methodName,\n endpointDefaults,\n decorations\n });\n }\n}\nvar handler = {\n has({ scope }, methodName) {\n return endpointMethodsMap.get(scope).has(methodName);\n },\n getOwnPropertyDescriptor(target, methodName) {\n return {\n value: this.get(target, methodName),\n // ensures method is in the cache\n configurable: true,\n writable: true,\n enumerable: true\n };\n },\n defineProperty(target, methodName, descriptor) {\n Object.defineProperty(target.cache, methodName, descriptor);\n return true;\n },\n deleteProperty(target, methodName) {\n delete target.cache[methodName];\n return true;\n },\n ownKeys({ scope }) {\n return [...endpointMethodsMap.get(scope).keys()];\n },\n set(target, methodName, value) {\n return target.cache[methodName] = value;\n },\n get({ octokit, scope, cache }, methodName) {\n if (cache[methodName]) {\n return cache[methodName];\n }\n const method = endpointMethodsMap.get(scope).get(methodName);\n if (!method) {\n return void 0;\n }\n const { endpointDefaults, decorations } = method;\n if (decorations) {\n cache[methodName] = decorate(\n octokit,\n scope,\n methodName,\n endpointDefaults,\n decorations\n );\n } else {\n cache[methodName] = octokit.request.defaults(endpointDefaults);\n }\n return cache[methodName];\n }\n};\nfunction endpointsToMethods(octokit) {\n const newMethods = {};\n for (const scope of endpointMethodsMap.keys()) {\n newMethods[scope] = new Proxy({ octokit, scope, cache: {} }, handler);\n }\n return newMethods;\n}\nfunction decorate(octokit, scope, methodName, defaults, decorations) {\n const requestWithDefaults = octokit.request.defaults(defaults);\n function withDecorations(...args) {\n let options = requestWithDefaults.endpoint.merge(...args);\n if (decorations.mapToData) {\n options = Object.assign({}, options, {\n data: options[decorations.mapToData],\n [decorations.mapToData]: void 0\n });\n return requestWithDefaults(options);\n }\n if (decorations.renamed) {\n const [newScope, newMethodName] = decorations.renamed;\n octokit.log.warn(\n `octokit.${scope}.${methodName}() has been renamed to octokit.${newScope}.${newMethodName}()`\n );\n }\n if (decorations.deprecated) {\n octokit.log.warn(decorations.deprecated);\n }\n if (decorations.renamedParameters) {\n const options2 = requestWithDefaults.endpoint.merge(...args);\n for (const [name, alias] of Object.entries(\n decorations.renamedParameters\n )) {\n if (name in options2) {\n octokit.log.warn(\n `\"${name}\" parameter is deprecated for \"octokit.${scope}.${methodName}()\". Use \"${alias}\" instead`\n );\n if (!(alias in options2)) {\n options2[alias] = options2[name];\n }\n delete options2[name];\n }\n }\n return requestWithDefaults(options2);\n }\n return requestWithDefaults(...args);\n }\n return Object.assign(withDecorations, requestWithDefaults);\n}\n\n// pkg/dist-src/index.js\nfunction restEndpointMethods(octokit) {\n const api = endpointsToMethods(octokit);\n return {\n rest: api\n };\n}\nrestEndpointMethods.VERSION = VERSION;\nfunction legacyRestEndpointMethods(octokit) {\n const api = endpointsToMethods(octokit);\n return {\n ...api,\n rest: api\n };\n}\nlegacyRestEndpointMethods.VERSION = VERSION;\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n legacyRestEndpointMethods,\n restEndpointMethods\n});\n","\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// pkg/dist-src/index.js\nvar dist_src_exports = {};\n__export(dist_src_exports, {\n RequestError: () => RequestError\n});\nmodule.exports = __toCommonJS(dist_src_exports);\nvar import_deprecation = require(\"deprecation\");\nvar import_once = __toESM(require(\"once\"));\nvar logOnceCode = (0, import_once.default)((deprecation) => console.warn(deprecation));\nvar logOnceHeaders = (0, import_once.default)((deprecation) => console.warn(deprecation));\nvar RequestError = class extends Error {\n constructor(message, statusCode, options) {\n super(message);\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n this.name = \"HttpError\";\n this.status = statusCode;\n let headers;\n if (\"headers\" in options && typeof options.headers !== \"undefined\") {\n headers = options.headers;\n }\n if (\"response\" in options) {\n this.response = options.response;\n headers = options.response.headers;\n }\n const requestCopy = Object.assign({}, options.request);\n if (options.request.headers.authorization) {\n requestCopy.headers = Object.assign({}, options.request.headers, {\n authorization: options.request.headers.authorization.replace(\n /(? {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// pkg/dist-src/index.js\nvar dist_src_exports = {};\n__export(dist_src_exports, {\n request: () => request\n});\nmodule.exports = __toCommonJS(dist_src_exports);\nvar import_endpoint = require(\"@octokit/endpoint\");\nvar import_universal_user_agent = require(\"universal-user-agent\");\n\n// pkg/dist-src/version.js\nvar VERSION = \"8.4.1\";\n\n// pkg/dist-src/is-plain-object.js\nfunction isPlainObject(value) {\n if (typeof value !== \"object\" || value === null)\n return false;\n if (Object.prototype.toString.call(value) !== \"[object Object]\")\n return false;\n const proto = Object.getPrototypeOf(value);\n if (proto === null)\n return true;\n const Ctor = Object.prototype.hasOwnProperty.call(proto, \"constructor\") && proto.constructor;\n return typeof Ctor === \"function\" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value);\n}\n\n// pkg/dist-src/fetch-wrapper.js\nvar import_request_error = require(\"@octokit/request-error\");\n\n// pkg/dist-src/get-buffer-response.js\nfunction getBufferResponse(response) {\n return response.arrayBuffer();\n}\n\n// pkg/dist-src/fetch-wrapper.js\nfunction fetchWrapper(requestOptions) {\n var _a, _b, _c, _d;\n const log = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console;\n const parseSuccessResponseBody = ((_a = requestOptions.request) == null ? void 0 : _a.parseSuccessResponseBody) !== false;\n if (isPlainObject(requestOptions.body) || Array.isArray(requestOptions.body)) {\n requestOptions.body = JSON.stringify(requestOptions.body);\n }\n let headers = {};\n let status;\n let url;\n let { fetch } = globalThis;\n if ((_b = requestOptions.request) == null ? void 0 : _b.fetch) {\n fetch = requestOptions.request.fetch;\n }\n if (!fetch) {\n throw new Error(\n \"fetch is not set. Please pass a fetch implementation as new Octokit({ request: { fetch }}). Learn more at https://github.com/octokit/octokit.js/#fetch-missing\"\n );\n }\n return fetch(requestOptions.url, {\n method: requestOptions.method,\n body: requestOptions.body,\n redirect: (_c = requestOptions.request) == null ? void 0 : _c.redirect,\n headers: requestOptions.headers,\n signal: (_d = requestOptions.request) == null ? void 0 : _d.signal,\n // duplex must be set if request.body is ReadableStream or Async Iterables.\n // See https://fetch.spec.whatwg.org/#dom-requestinit-duplex.\n ...requestOptions.body && { duplex: \"half\" }\n }).then(async (response) => {\n url = response.url;\n status = response.status;\n for (const keyAndValue of response.headers) {\n headers[keyAndValue[0]] = keyAndValue[1];\n }\n if (\"deprecation\" in headers) {\n const matches = headers.link && headers.link.match(/<([^<>]+)>; rel=\"deprecation\"/);\n const deprecationLink = matches && matches.pop();\n log.warn(\n `[@octokit/request] \"${requestOptions.method} ${requestOptions.url}\" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : \"\"}`\n );\n }\n if (status === 204 || status === 205) {\n return;\n }\n if (requestOptions.method === \"HEAD\") {\n if (status < 400) {\n return;\n }\n throw new import_request_error.RequestError(response.statusText, status, {\n response: {\n url,\n status,\n headers,\n data: void 0\n },\n request: requestOptions\n });\n }\n if (status === 304) {\n throw new import_request_error.RequestError(\"Not modified\", status, {\n response: {\n url,\n status,\n headers,\n data: await getResponseData(response)\n },\n request: requestOptions\n });\n }\n if (status >= 400) {\n const data = await getResponseData(response);\n const error = new import_request_error.RequestError(toErrorMessage(data), status, {\n response: {\n url,\n status,\n headers,\n data\n },\n request: requestOptions\n });\n throw error;\n }\n return parseSuccessResponseBody ? await getResponseData(response) : response.body;\n }).then((data) => {\n return {\n status,\n url,\n headers,\n data\n };\n }).catch((error) => {\n if (error instanceof import_request_error.RequestError)\n throw error;\n else if (error.name === \"AbortError\")\n throw error;\n let message = error.message;\n if (error.name === \"TypeError\" && \"cause\" in error) {\n if (error.cause instanceof Error) {\n message = error.cause.message;\n } else if (typeof error.cause === \"string\") {\n message = error.cause;\n }\n }\n throw new import_request_error.RequestError(message, 500, {\n request: requestOptions\n });\n });\n}\nasync function getResponseData(response) {\n const contentType = response.headers.get(\"content-type\");\n if (/application\\/json/.test(contentType)) {\n return response.json().catch(() => response.text()).catch(() => \"\");\n }\n if (!contentType || /^text\\/|charset=utf-8$/.test(contentType)) {\n return response.text();\n }\n return getBufferResponse(response);\n}\nfunction toErrorMessage(data) {\n if (typeof data === \"string\")\n return data;\n let suffix;\n if (\"documentation_url\" in data) {\n suffix = ` - ${data.documentation_url}`;\n } else {\n suffix = \"\";\n }\n if (\"message\" in data) {\n if (Array.isArray(data.errors)) {\n return `${data.message}: ${data.errors.map(JSON.stringify).join(\", \")}${suffix}`;\n }\n return `${data.message}${suffix}`;\n }\n return `Unknown error: ${JSON.stringify(data)}`;\n}\n\n// pkg/dist-src/with-defaults.js\nfunction withDefaults(oldEndpoint, newDefaults) {\n const endpoint2 = oldEndpoint.defaults(newDefaults);\n const newApi = function(route, parameters) {\n const endpointOptions = endpoint2.merge(route, parameters);\n if (!endpointOptions.request || !endpointOptions.request.hook) {\n return fetchWrapper(endpoint2.parse(endpointOptions));\n }\n const request2 = (route2, parameters2) => {\n return fetchWrapper(\n endpoint2.parse(endpoint2.merge(route2, parameters2))\n );\n };\n Object.assign(request2, {\n endpoint: endpoint2,\n defaults: withDefaults.bind(null, endpoint2)\n });\n return endpointOptions.request.hook(request2, endpointOptions);\n };\n return Object.assign(newApi, {\n endpoint: endpoint2,\n defaults: withDefaults.bind(null, endpoint2)\n });\n}\n\n// pkg/dist-src/index.js\nvar request = withDefaults(import_endpoint.endpoint, {\n headers: {\n \"user-agent\": `octokit-request.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`\n }\n});\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n request\n});\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n CONFIG_USE_DUALSTACK_ENDPOINT: () => CONFIG_USE_DUALSTACK_ENDPOINT,\n CONFIG_USE_FIPS_ENDPOINT: () => CONFIG_USE_FIPS_ENDPOINT,\n DEFAULT_USE_DUALSTACK_ENDPOINT: () => DEFAULT_USE_DUALSTACK_ENDPOINT,\n DEFAULT_USE_FIPS_ENDPOINT: () => DEFAULT_USE_FIPS_ENDPOINT,\n ENV_USE_DUALSTACK_ENDPOINT: () => ENV_USE_DUALSTACK_ENDPOINT,\n ENV_USE_FIPS_ENDPOINT: () => ENV_USE_FIPS_ENDPOINT,\n NODE_REGION_CONFIG_FILE_OPTIONS: () => NODE_REGION_CONFIG_FILE_OPTIONS,\n NODE_REGION_CONFIG_OPTIONS: () => NODE_REGION_CONFIG_OPTIONS,\n NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS: () => NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,\n NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS: () => NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,\n REGION_ENV_NAME: () => REGION_ENV_NAME,\n REGION_INI_NAME: () => REGION_INI_NAME,\n getRegionInfo: () => getRegionInfo,\n resolveCustomEndpointsConfig: () => resolveCustomEndpointsConfig,\n resolveEndpointsConfig: () => resolveEndpointsConfig,\n resolveRegionConfig: () => resolveRegionConfig\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/endpointsConfig/NodeUseDualstackEndpointConfigOptions.ts\nvar import_util_config_provider = require(\"@smithy/util-config-provider\");\nvar ENV_USE_DUALSTACK_ENDPOINT = \"AWS_USE_DUALSTACK_ENDPOINT\";\nvar CONFIG_USE_DUALSTACK_ENDPOINT = \"use_dualstack_endpoint\";\nvar DEFAULT_USE_DUALSTACK_ENDPOINT = false;\nvar NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => (0, import_util_config_provider.booleanSelector)(env, ENV_USE_DUALSTACK_ENDPOINT, import_util_config_provider.SelectorType.ENV),\n configFileSelector: (profile) => (0, import_util_config_provider.booleanSelector)(profile, CONFIG_USE_DUALSTACK_ENDPOINT, import_util_config_provider.SelectorType.CONFIG),\n default: false\n};\n\n// src/endpointsConfig/NodeUseFipsEndpointConfigOptions.ts\n\nvar ENV_USE_FIPS_ENDPOINT = \"AWS_USE_FIPS_ENDPOINT\";\nvar CONFIG_USE_FIPS_ENDPOINT = \"use_fips_endpoint\";\nvar DEFAULT_USE_FIPS_ENDPOINT = false;\nvar NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => (0, import_util_config_provider.booleanSelector)(env, ENV_USE_FIPS_ENDPOINT, import_util_config_provider.SelectorType.ENV),\n configFileSelector: (profile) => (0, import_util_config_provider.booleanSelector)(profile, CONFIG_USE_FIPS_ENDPOINT, import_util_config_provider.SelectorType.CONFIG),\n default: false\n};\n\n// src/endpointsConfig/resolveCustomEndpointsConfig.ts\nvar import_util_middleware = require(\"@smithy/util-middleware\");\nvar resolveCustomEndpointsConfig = /* @__PURE__ */ __name((input) => {\n const { tls, endpoint, urlParser, useDualstackEndpoint } = input;\n return Object.assign(input, {\n tls: tls ?? true,\n endpoint: (0, import_util_middleware.normalizeProvider)(typeof endpoint === \"string\" ? urlParser(endpoint) : endpoint),\n isCustomEndpoint: true,\n useDualstackEndpoint: (0, import_util_middleware.normalizeProvider)(useDualstackEndpoint ?? false)\n });\n}, \"resolveCustomEndpointsConfig\");\n\n// src/endpointsConfig/resolveEndpointsConfig.ts\n\n\n// src/endpointsConfig/utils/getEndpointFromRegion.ts\nvar getEndpointFromRegion = /* @__PURE__ */ __name(async (input) => {\n const { tls = true } = input;\n const region = await input.region();\n const dnsHostRegex = new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/);\n if (!dnsHostRegex.test(region)) {\n throw new Error(\"Invalid region in client config\");\n }\n const useDualstackEndpoint = await input.useDualstackEndpoint();\n const useFipsEndpoint = await input.useFipsEndpoint();\n const { hostname } = await input.regionInfoProvider(region, { useDualstackEndpoint, useFipsEndpoint }) ?? {};\n if (!hostname) {\n throw new Error(\"Cannot resolve hostname from client config\");\n }\n return input.urlParser(`${tls ? \"https:\" : \"http:\"}//${hostname}`);\n}, \"getEndpointFromRegion\");\n\n// src/endpointsConfig/resolveEndpointsConfig.ts\nvar resolveEndpointsConfig = /* @__PURE__ */ __name((input) => {\n const useDualstackEndpoint = (0, import_util_middleware.normalizeProvider)(input.useDualstackEndpoint ?? false);\n const { endpoint, useFipsEndpoint, urlParser, tls } = input;\n return Object.assign(input, {\n tls: tls ?? true,\n endpoint: endpoint ? (0, import_util_middleware.normalizeProvider)(typeof endpoint === \"string\" ? urlParser(endpoint) : endpoint) : () => getEndpointFromRegion({ ...input, useDualstackEndpoint, useFipsEndpoint }),\n isCustomEndpoint: !!endpoint,\n useDualstackEndpoint\n });\n}, \"resolveEndpointsConfig\");\n\n// src/regionConfig/config.ts\nvar REGION_ENV_NAME = \"AWS_REGION\";\nvar REGION_INI_NAME = \"region\";\nvar NODE_REGION_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => env[REGION_ENV_NAME],\n configFileSelector: (profile) => profile[REGION_INI_NAME],\n default: () => {\n throw new Error(\"Region is missing\");\n }\n};\nvar NODE_REGION_CONFIG_FILE_OPTIONS = {\n preferredFile: \"credentials\"\n};\n\n// src/regionConfig/isFipsRegion.ts\nvar isFipsRegion = /* @__PURE__ */ __name((region) => typeof region === \"string\" && (region.startsWith(\"fips-\") || region.endsWith(\"-fips\")), \"isFipsRegion\");\n\n// src/regionConfig/getRealRegion.ts\nvar getRealRegion = /* @__PURE__ */ __name((region) => isFipsRegion(region) ? [\"fips-aws-global\", \"aws-fips\"].includes(region) ? \"us-east-1\" : region.replace(/fips-(dkr-|prod-)?|-fips/, \"\") : region, \"getRealRegion\");\n\n// src/regionConfig/resolveRegionConfig.ts\nvar resolveRegionConfig = /* @__PURE__ */ __name((input) => {\n const { region, useFipsEndpoint } = input;\n if (!region) {\n throw new Error(\"Region is missing\");\n }\n return Object.assign(input, {\n region: async () => {\n if (typeof region === \"string\") {\n return getRealRegion(region);\n }\n const providedRegion = await region();\n return getRealRegion(providedRegion);\n },\n useFipsEndpoint: async () => {\n const providedRegion = typeof region === \"string\" ? region : await region();\n if (isFipsRegion(providedRegion)) {\n return true;\n }\n return typeof useFipsEndpoint !== \"function\" ? Promise.resolve(!!useFipsEndpoint) : useFipsEndpoint();\n }\n });\n}, \"resolveRegionConfig\");\n\n// src/regionInfo/getHostnameFromVariants.ts\nvar getHostnameFromVariants = /* @__PURE__ */ __name((variants = [], { useFipsEndpoint, useDualstackEndpoint }) => variants.find(\n ({ tags }) => useFipsEndpoint === tags.includes(\"fips\") && useDualstackEndpoint === tags.includes(\"dualstack\")\n)?.hostname, \"getHostnameFromVariants\");\n\n// src/regionInfo/getResolvedHostname.ts\nvar getResolvedHostname = /* @__PURE__ */ __name((resolvedRegion, { regionHostname, partitionHostname }) => regionHostname ? regionHostname : partitionHostname ? partitionHostname.replace(\"{region}\", resolvedRegion) : void 0, \"getResolvedHostname\");\n\n// src/regionInfo/getResolvedPartition.ts\nvar getResolvedPartition = /* @__PURE__ */ __name((region, { partitionHash }) => Object.keys(partitionHash || {}).find((key) => partitionHash[key].regions.includes(region)) ?? \"aws\", \"getResolvedPartition\");\n\n// src/regionInfo/getResolvedSigningRegion.ts\nvar getResolvedSigningRegion = /* @__PURE__ */ __name((hostname, { signingRegion, regionRegex, useFipsEndpoint }) => {\n if (signingRegion) {\n return signingRegion;\n } else if (useFipsEndpoint) {\n const regionRegexJs = regionRegex.replace(\"\\\\\\\\\", \"\\\\\").replace(/^\\^/g, \"\\\\.\").replace(/\\$$/g, \"\\\\.\");\n const regionRegexmatchArray = hostname.match(regionRegexJs);\n if (regionRegexmatchArray) {\n return regionRegexmatchArray[0].slice(1, -1);\n }\n }\n}, \"getResolvedSigningRegion\");\n\n// src/regionInfo/getRegionInfo.ts\nvar getRegionInfo = /* @__PURE__ */ __name((region, {\n useFipsEndpoint = false,\n useDualstackEndpoint = false,\n signingService,\n regionHash,\n partitionHash\n}) => {\n const partition = getResolvedPartition(region, { partitionHash });\n const resolvedRegion = region in regionHash ? region : partitionHash[partition]?.endpoint ?? region;\n const hostnameOptions = { useFipsEndpoint, useDualstackEndpoint };\n const regionHostname = getHostnameFromVariants(regionHash[resolvedRegion]?.variants, hostnameOptions);\n const partitionHostname = getHostnameFromVariants(partitionHash[partition]?.variants, hostnameOptions);\n const hostname = getResolvedHostname(resolvedRegion, { regionHostname, partitionHostname });\n if (hostname === void 0) {\n throw new Error(`Endpoint resolution failed for: ${{ resolvedRegion, useFipsEndpoint, useDualstackEndpoint }}`);\n }\n const signingRegion = getResolvedSigningRegion(hostname, {\n signingRegion: regionHash[resolvedRegion]?.signingRegion,\n regionRegex: partitionHash[partition].regionRegex,\n useFipsEndpoint\n });\n return {\n partition,\n signingService,\n hostname,\n ...signingRegion && { signingRegion },\n ...regionHash[resolvedRegion]?.signingService && {\n signingService: regionHash[resolvedRegion].signingService\n }\n };\n}, \"getRegionInfo\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n ENV_USE_DUALSTACK_ENDPOINT,\n CONFIG_USE_DUALSTACK_ENDPOINT,\n DEFAULT_USE_DUALSTACK_ENDPOINT,\n NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,\n ENV_USE_FIPS_ENDPOINT,\n CONFIG_USE_FIPS_ENDPOINT,\n DEFAULT_USE_FIPS_ENDPOINT,\n NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,\n resolveCustomEndpointsConfig,\n resolveEndpointsConfig,\n REGION_ENV_NAME,\n REGION_INI_NAME,\n NODE_REGION_CONFIG_OPTIONS,\n NODE_REGION_CONFIG_FILE_OPTIONS,\n resolveRegionConfig,\n getRegionInfo\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n DefaultIdentityProviderConfig: () => DefaultIdentityProviderConfig,\n EXPIRATION_MS: () => EXPIRATION_MS,\n HttpApiKeyAuthSigner: () => HttpApiKeyAuthSigner,\n HttpBearerAuthSigner: () => HttpBearerAuthSigner,\n NoAuthSigner: () => NoAuthSigner,\n createIsIdentityExpiredFunction: () => createIsIdentityExpiredFunction,\n createPaginator: () => createPaginator,\n doesIdentityRequireRefresh: () => doesIdentityRequireRefresh,\n getHttpAuthSchemeEndpointRuleSetPlugin: () => getHttpAuthSchemeEndpointRuleSetPlugin,\n getHttpAuthSchemePlugin: () => getHttpAuthSchemePlugin,\n getHttpSigningPlugin: () => getHttpSigningPlugin,\n getSmithyContext: () => getSmithyContext,\n httpAuthSchemeEndpointRuleSetMiddlewareOptions: () => httpAuthSchemeEndpointRuleSetMiddlewareOptions,\n httpAuthSchemeMiddleware: () => httpAuthSchemeMiddleware,\n httpAuthSchemeMiddlewareOptions: () => httpAuthSchemeMiddlewareOptions,\n httpSigningMiddleware: () => httpSigningMiddleware,\n httpSigningMiddlewareOptions: () => httpSigningMiddlewareOptions,\n isIdentityExpired: () => isIdentityExpired,\n memoizeIdentityProvider: () => memoizeIdentityProvider,\n normalizeProvider: () => normalizeProvider,\n requestBuilder: () => import_protocols.requestBuilder,\n setFeature: () => setFeature\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/getSmithyContext.ts\nvar import_types = require(\"@smithy/types\");\nvar getSmithyContext = /* @__PURE__ */ __name((context) => context[import_types.SMITHY_CONTEXT_KEY] || (context[import_types.SMITHY_CONTEXT_KEY] = {}), \"getSmithyContext\");\n\n// src/middleware-http-auth-scheme/httpAuthSchemeMiddleware.ts\nvar import_util_middleware = require(\"@smithy/util-middleware\");\n\n// src/middleware-http-auth-scheme/resolveAuthOptions.ts\nvar resolveAuthOptions = /* @__PURE__ */ __name((candidateAuthOptions, authSchemePreference) => {\n if (!authSchemePreference || authSchemePreference.length === 0) {\n return candidateAuthOptions;\n }\n const preferredAuthOptions = [];\n for (const preferredSchemeName of authSchemePreference) {\n for (const candidateAuthOption of candidateAuthOptions) {\n const candidateAuthSchemeName = candidateAuthOption.schemeId.split(\"#\")[1];\n if (candidateAuthSchemeName === preferredSchemeName) {\n preferredAuthOptions.push(candidateAuthOption);\n }\n }\n }\n for (const candidateAuthOption of candidateAuthOptions) {\n if (!preferredAuthOptions.find(({ schemeId }) => schemeId === candidateAuthOption.schemeId)) {\n preferredAuthOptions.push(candidateAuthOption);\n }\n }\n return preferredAuthOptions;\n}, \"resolveAuthOptions\");\n\n// src/middleware-http-auth-scheme/httpAuthSchemeMiddleware.ts\nfunction convertHttpAuthSchemesToMap(httpAuthSchemes) {\n const map = /* @__PURE__ */ new Map();\n for (const scheme of httpAuthSchemes) {\n map.set(scheme.schemeId, scheme);\n }\n return map;\n}\n__name(convertHttpAuthSchemesToMap, \"convertHttpAuthSchemesToMap\");\nvar httpAuthSchemeMiddleware = /* @__PURE__ */ __name((config, mwOptions) => (next, context) => async (args) => {\n const options = config.httpAuthSchemeProvider(\n await mwOptions.httpAuthSchemeParametersProvider(config, context, args.input)\n );\n const authSchemePreference = config.authSchemePreference ? await config.authSchemePreference() : [];\n const resolvedOptions = resolveAuthOptions(options, authSchemePreference);\n const authSchemes = convertHttpAuthSchemesToMap(config.httpAuthSchemes);\n const smithyContext = (0, import_util_middleware.getSmithyContext)(context);\n const failureReasons = [];\n for (const option of resolvedOptions) {\n const scheme = authSchemes.get(option.schemeId);\n if (!scheme) {\n failureReasons.push(`HttpAuthScheme \\`${option.schemeId}\\` was not enabled for this service.`);\n continue;\n }\n const identityProvider = scheme.identityProvider(await mwOptions.identityProviderConfigProvider(config));\n if (!identityProvider) {\n failureReasons.push(`HttpAuthScheme \\`${option.schemeId}\\` did not have an IdentityProvider configured.`);\n continue;\n }\n const { identityProperties = {}, signingProperties = {} } = option.propertiesExtractor?.(config, context) || {};\n option.identityProperties = Object.assign(option.identityProperties || {}, identityProperties);\n option.signingProperties = Object.assign(option.signingProperties || {}, signingProperties);\n smithyContext.selectedHttpAuthScheme = {\n httpAuthOption: option,\n identity: await identityProvider(option.identityProperties),\n signer: scheme.signer\n };\n break;\n }\n if (!smithyContext.selectedHttpAuthScheme) {\n throw new Error(failureReasons.join(\"\\n\"));\n }\n return next(args);\n}, \"httpAuthSchemeMiddleware\");\n\n// src/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.ts\nvar httpAuthSchemeEndpointRuleSetMiddlewareOptions = {\n step: \"serialize\",\n tags: [\"HTTP_AUTH_SCHEME\"],\n name: \"httpAuthSchemeMiddleware\",\n override: true,\n relation: \"before\",\n toMiddleware: \"endpointV2Middleware\"\n};\nvar getHttpAuthSchemeEndpointRuleSetPlugin = /* @__PURE__ */ __name((config, {\n httpAuthSchemeParametersProvider,\n identityProviderConfigProvider\n}) => ({\n applyToStack: (clientStack) => {\n clientStack.addRelativeTo(\n httpAuthSchemeMiddleware(config, {\n httpAuthSchemeParametersProvider,\n identityProviderConfigProvider\n }),\n httpAuthSchemeEndpointRuleSetMiddlewareOptions\n );\n }\n}), \"getHttpAuthSchemeEndpointRuleSetPlugin\");\n\n// src/middleware-http-auth-scheme/getHttpAuthSchemePlugin.ts\nvar import_middleware_serde = require(\"@smithy/middleware-serde\");\nvar httpAuthSchemeMiddlewareOptions = {\n step: \"serialize\",\n tags: [\"HTTP_AUTH_SCHEME\"],\n name: \"httpAuthSchemeMiddleware\",\n override: true,\n relation: \"before\",\n toMiddleware: import_middleware_serde.serializerMiddlewareOption.name\n};\nvar getHttpAuthSchemePlugin = /* @__PURE__ */ __name((config, {\n httpAuthSchemeParametersProvider,\n identityProviderConfigProvider\n}) => ({\n applyToStack: (clientStack) => {\n clientStack.addRelativeTo(\n httpAuthSchemeMiddleware(config, {\n httpAuthSchemeParametersProvider,\n identityProviderConfigProvider\n }),\n httpAuthSchemeMiddlewareOptions\n );\n }\n}), \"getHttpAuthSchemePlugin\");\n\n// src/middleware-http-signing/httpSigningMiddleware.ts\nvar import_protocol_http = require(\"@smithy/protocol-http\");\n\nvar defaultErrorHandler = /* @__PURE__ */ __name((signingProperties) => (error) => {\n throw error;\n}, \"defaultErrorHandler\");\nvar defaultSuccessHandler = /* @__PURE__ */ __name((httpResponse, signingProperties) => {\n}, \"defaultSuccessHandler\");\nvar httpSigningMiddleware = /* @__PURE__ */ __name((config) => (next, context) => async (args) => {\n if (!import_protocol_http.HttpRequest.isInstance(args.request)) {\n return next(args);\n }\n const smithyContext = (0, import_util_middleware.getSmithyContext)(context);\n const scheme = smithyContext.selectedHttpAuthScheme;\n if (!scheme) {\n throw new Error(`No HttpAuthScheme was selected: unable to sign request`);\n }\n const {\n httpAuthOption: { signingProperties = {} },\n identity,\n signer\n } = scheme;\n const output = await next({\n ...args,\n request: await signer.sign(args.request, identity, signingProperties)\n }).catch((signer.errorHandler || defaultErrorHandler)(signingProperties));\n (signer.successHandler || defaultSuccessHandler)(output.response, signingProperties);\n return output;\n}, \"httpSigningMiddleware\");\n\n// src/middleware-http-signing/getHttpSigningMiddleware.ts\nvar httpSigningMiddlewareOptions = {\n step: \"finalizeRequest\",\n tags: [\"HTTP_SIGNING\"],\n name: \"httpSigningMiddleware\",\n aliases: [\"apiKeyMiddleware\", \"tokenMiddleware\", \"awsAuthMiddleware\"],\n override: true,\n relation: \"after\",\n toMiddleware: \"retryMiddleware\"\n};\nvar getHttpSigningPlugin = /* @__PURE__ */ __name((config) => ({\n applyToStack: (clientStack) => {\n clientStack.addRelativeTo(httpSigningMiddleware(config), httpSigningMiddlewareOptions);\n }\n}), \"getHttpSigningPlugin\");\n\n// src/normalizeProvider.ts\nvar normalizeProvider = /* @__PURE__ */ __name((input) => {\n if (typeof input === \"function\")\n return input;\n const promisified = Promise.resolve(input);\n return () => promisified;\n}, \"normalizeProvider\");\n\n// src/pagination/createPaginator.ts\nvar makePagedClientRequest = /* @__PURE__ */ __name(async (CommandCtor, client, input, withCommand = (_) => _, ...args) => {\n let command = new CommandCtor(input);\n command = withCommand(command) ?? command;\n return await client.send(command, ...args);\n}, \"makePagedClientRequest\");\nfunction createPaginator(ClientCtor, CommandCtor, inputTokenName, outputTokenName, pageSizeTokenName) {\n return /* @__PURE__ */ __name(async function* paginateOperation(config, input, ...additionalArguments) {\n const _input = input;\n let token = config.startingToken ?? _input[inputTokenName];\n let hasNext = true;\n let page;\n while (hasNext) {\n _input[inputTokenName] = token;\n if (pageSizeTokenName) {\n _input[pageSizeTokenName] = _input[pageSizeTokenName] ?? config.pageSize;\n }\n if (config.client instanceof ClientCtor) {\n page = await makePagedClientRequest(\n CommandCtor,\n config.client,\n input,\n config.withCommand,\n ...additionalArguments\n );\n } else {\n throw new Error(`Invalid client, expected instance of ${ClientCtor.name}`);\n }\n yield page;\n const prevToken = token;\n token = get(page, outputTokenName);\n hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));\n }\n return void 0;\n }, \"paginateOperation\");\n}\n__name(createPaginator, \"createPaginator\");\nvar get = /* @__PURE__ */ __name((fromObject, path) => {\n let cursor = fromObject;\n const pathComponents = path.split(\".\");\n for (const step of pathComponents) {\n if (!cursor || typeof cursor !== \"object\") {\n return void 0;\n }\n cursor = cursor[step];\n }\n return cursor;\n}, \"get\");\n\n// src/protocols/requestBuilder.ts\nvar import_protocols = require(\"@smithy/core/protocols\");\n\n// src/setFeature.ts\nfunction setFeature(context, feature, value) {\n if (!context.__smithy_context) {\n context.__smithy_context = {\n features: {}\n };\n } else if (!context.__smithy_context.features) {\n context.__smithy_context.features = {};\n }\n context.__smithy_context.features[feature] = value;\n}\n__name(setFeature, \"setFeature\");\n\n// src/util-identity-and-auth/DefaultIdentityProviderConfig.ts\nvar DefaultIdentityProviderConfig = class {\n /**\n * Creates an IdentityProviderConfig with a record of scheme IDs to identity providers.\n *\n * @param config scheme IDs and identity providers to configure\n */\n constructor(config) {\n this.authSchemes = /* @__PURE__ */ new Map();\n for (const [key, value] of Object.entries(config)) {\n if (value !== void 0) {\n this.authSchemes.set(key, value);\n }\n }\n }\n static {\n __name(this, \"DefaultIdentityProviderConfig\");\n }\n getIdentityProvider(schemeId) {\n return this.authSchemes.get(schemeId);\n }\n};\n\n// src/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.ts\n\n\nvar HttpApiKeyAuthSigner = class {\n static {\n __name(this, \"HttpApiKeyAuthSigner\");\n }\n async sign(httpRequest, identity, signingProperties) {\n if (!signingProperties) {\n throw new Error(\n \"request could not be signed with `apiKey` since the `name` and `in` signer properties are missing\"\n );\n }\n if (!signingProperties.name) {\n throw new Error(\"request could not be signed with `apiKey` since the `name` signer property is missing\");\n }\n if (!signingProperties.in) {\n throw new Error(\"request could not be signed with `apiKey` since the `in` signer property is missing\");\n }\n if (!identity.apiKey) {\n throw new Error(\"request could not be signed with `apiKey` since the `apiKey` is not defined\");\n }\n const clonedRequest = import_protocol_http.HttpRequest.clone(httpRequest);\n if (signingProperties.in === import_types.HttpApiKeyAuthLocation.QUERY) {\n clonedRequest.query[signingProperties.name] = identity.apiKey;\n } else if (signingProperties.in === import_types.HttpApiKeyAuthLocation.HEADER) {\n clonedRequest.headers[signingProperties.name] = signingProperties.scheme ? `${signingProperties.scheme} ${identity.apiKey}` : identity.apiKey;\n } else {\n throw new Error(\n \"request can only be signed with `apiKey` locations `query` or `header`, but found: `\" + signingProperties.in + \"`\"\n );\n }\n return clonedRequest;\n }\n};\n\n// src/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.ts\n\nvar HttpBearerAuthSigner = class {\n static {\n __name(this, \"HttpBearerAuthSigner\");\n }\n async sign(httpRequest, identity, signingProperties) {\n const clonedRequest = import_protocol_http.HttpRequest.clone(httpRequest);\n if (!identity.token) {\n throw new Error(\"request could not be signed with `token` since the `token` is not defined\");\n }\n clonedRequest.headers[\"Authorization\"] = `Bearer ${identity.token}`;\n return clonedRequest;\n }\n};\n\n// src/util-identity-and-auth/httpAuthSchemes/noAuth.ts\nvar NoAuthSigner = class {\n static {\n __name(this, \"NoAuthSigner\");\n }\n async sign(httpRequest, identity, signingProperties) {\n return httpRequest;\n }\n};\n\n// src/util-identity-and-auth/memoizeIdentityProvider.ts\nvar createIsIdentityExpiredFunction = /* @__PURE__ */ __name((expirationMs) => (identity) => doesIdentityRequireRefresh(identity) && identity.expiration.getTime() - Date.now() < expirationMs, \"createIsIdentityExpiredFunction\");\nvar EXPIRATION_MS = 3e5;\nvar isIdentityExpired = createIsIdentityExpiredFunction(EXPIRATION_MS);\nvar doesIdentityRequireRefresh = /* @__PURE__ */ __name((identity) => identity.expiration !== void 0, \"doesIdentityRequireRefresh\");\nvar memoizeIdentityProvider = /* @__PURE__ */ __name((provider, isExpired, requiresRefresh) => {\n if (provider === void 0) {\n return void 0;\n }\n const normalizedProvider = typeof provider !== \"function\" ? async () => Promise.resolve(provider) : provider;\n let resolved;\n let pending;\n let hasResult;\n let isConstant = false;\n const coalesceProvider = /* @__PURE__ */ __name(async (options) => {\n if (!pending) {\n pending = normalizedProvider(options);\n }\n try {\n resolved = await pending;\n hasResult = true;\n isConstant = false;\n } finally {\n pending = void 0;\n }\n return resolved;\n }, \"coalesceProvider\");\n if (isExpired === void 0) {\n return async (options) => {\n if (!hasResult || options?.forceRefresh) {\n resolved = await coalesceProvider(options);\n }\n return resolved;\n };\n }\n return async (options) => {\n if (!hasResult || options?.forceRefresh) {\n resolved = await coalesceProvider(options);\n }\n if (isConstant) {\n return resolved;\n }\n if (!requiresRefresh(resolved)) {\n isConstant = true;\n return resolved;\n }\n if (isExpired(resolved)) {\n await coalesceProvider(options);\n return resolved;\n }\n return resolved;\n };\n}, \"memoizeIdentityProvider\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n createPaginator,\n getSmithyContext,\n httpAuthSchemeMiddleware,\n httpAuthSchemeEndpointRuleSetMiddlewareOptions,\n getHttpAuthSchemeEndpointRuleSetPlugin,\n httpAuthSchemeMiddlewareOptions,\n getHttpAuthSchemePlugin,\n httpSigningMiddleware,\n httpSigningMiddlewareOptions,\n getHttpSigningPlugin,\n normalizeProvider,\n requestBuilder,\n setFeature,\n DefaultIdentityProviderConfig,\n HttpApiKeyAuthSigner,\n HttpBearerAuthSigner,\n NoAuthSigner,\n createIsIdentityExpiredFunction,\n EXPIRATION_MS,\n isIdentityExpired,\n doesIdentityRequireRefresh,\n memoizeIdentityProvider\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/submodules/protocols/index.ts\nvar protocols_exports = {};\n__export(protocols_exports, {\n FromStringShapeDeserializer: () => FromStringShapeDeserializer,\n HttpBindingProtocol: () => HttpBindingProtocol,\n HttpInterceptingShapeDeserializer: () => HttpInterceptingShapeDeserializer,\n HttpInterceptingShapeSerializer: () => HttpInterceptingShapeSerializer,\n RequestBuilder: () => RequestBuilder,\n RpcProtocol: () => RpcProtocol,\n ToStringShapeSerializer: () => ToStringShapeSerializer,\n collectBody: () => collectBody,\n determineTimestampFormat: () => determineTimestampFormat,\n extendedEncodeURIComponent: () => extendedEncodeURIComponent,\n requestBuilder: () => requestBuilder,\n resolvedPath: () => resolvedPath\n});\nmodule.exports = __toCommonJS(protocols_exports);\n\n// src/submodules/protocols/collect-stream-body.ts\nvar import_util_stream = require(\"@smithy/util-stream\");\nvar collectBody = async (streamBody = new Uint8Array(), context) => {\n if (streamBody instanceof Uint8Array) {\n return import_util_stream.Uint8ArrayBlobAdapter.mutate(streamBody);\n }\n if (!streamBody) {\n return import_util_stream.Uint8ArrayBlobAdapter.mutate(new Uint8Array());\n }\n const fromContext = context.streamCollector(streamBody);\n return import_util_stream.Uint8ArrayBlobAdapter.mutate(await fromContext);\n};\n\n// src/submodules/protocols/extended-encode-uri-component.ts\nfunction extendedEncodeURIComponent(str) {\n return encodeURIComponent(str).replace(/[!'()*]/g, function(c) {\n return \"%\" + c.charCodeAt(0).toString(16).toUpperCase();\n });\n}\n\n// src/submodules/protocols/HttpBindingProtocol.ts\nvar import_schema2 = require(\"@smithy/core/schema\");\nvar import_protocol_http2 = require(\"@smithy/protocol-http\");\n\n// src/submodules/protocols/HttpProtocol.ts\nvar import_schema = require(\"@smithy/core/schema\");\nvar import_serde = require(\"@smithy/core/serde\");\nvar import_protocol_http = require(\"@smithy/protocol-http\");\nvar import_util_stream2 = require(\"@smithy/util-stream\");\nvar HttpProtocol = class {\n constructor(options) {\n this.options = options;\n }\n getRequestType() {\n return import_protocol_http.HttpRequest;\n }\n getResponseType() {\n return import_protocol_http.HttpResponse;\n }\n setSerdeContext(serdeContext) {\n this.serdeContext = serdeContext;\n this.serializer.setSerdeContext(serdeContext);\n this.deserializer.setSerdeContext(serdeContext);\n if (this.getPayloadCodec()) {\n this.getPayloadCodec().setSerdeContext(serdeContext);\n }\n }\n updateServiceEndpoint(request, endpoint) {\n if (\"url\" in endpoint) {\n request.protocol = endpoint.url.protocol;\n request.hostname = endpoint.url.hostname;\n request.port = endpoint.url.port ? Number(endpoint.url.port) : void 0;\n request.path = endpoint.url.pathname;\n request.fragment = endpoint.url.hash || void 0;\n request.username = endpoint.url.username || void 0;\n request.password = endpoint.url.password || void 0;\n for (const [k, v] of endpoint.url.searchParams.entries()) {\n if (!request.query) {\n request.query = {};\n }\n request.query[k] = v;\n }\n return request;\n } else {\n request.protocol = endpoint.protocol;\n request.hostname = endpoint.hostname;\n request.port = endpoint.port ? Number(endpoint.port) : void 0;\n request.path = endpoint.path;\n request.query = {\n ...endpoint.query\n };\n return request;\n }\n }\n setHostPrefix(request, operationSchema, input) {\n const operationNs = import_schema.NormalizedSchema.of(operationSchema);\n const inputNs = import_schema.NormalizedSchema.of(operationSchema.input);\n if (operationNs.getMergedTraits().endpoint) {\n let hostPrefix = operationNs.getMergedTraits().endpoint?.[0];\n if (typeof hostPrefix === \"string\") {\n const hostLabelInputs = [...inputNs.structIterator()].filter(\n ([, member]) => member.getMergedTraits().hostLabel\n );\n for (const [name] of hostLabelInputs) {\n const replacement = input[name];\n if (typeof replacement !== \"string\") {\n throw new Error(`@smithy/core/schema - ${name} in input must be a string as hostLabel.`);\n }\n hostPrefix = hostPrefix.replace(`{${name}}`, replacement);\n }\n request.hostname = hostPrefix + request.hostname;\n }\n }\n }\n deserializeMetadata(output) {\n return {\n httpStatusCode: output.statusCode,\n requestId: output.headers[\"x-amzn-requestid\"] ?? output.headers[\"x-amzn-request-id\"] ?? output.headers[\"x-amz-request-id\"],\n extendedRequestId: output.headers[\"x-amz-id-2\"],\n cfId: output.headers[\"x-amz-cf-id\"]\n };\n }\n async deserializeHttpMessage(schema, context, response, headerBindings, dataObject) {\n const deserializer = this.deserializer;\n const ns = import_schema.NormalizedSchema.of(schema);\n const nonHttpBindingMembers = [];\n for (const [memberName, memberSchema] of ns.structIterator()) {\n const memberTraits = memberSchema.getMemberTraits();\n if (memberTraits.httpPayload) {\n const isStreaming = memberSchema.isStreaming();\n if (isStreaming) {\n const isEventStream = memberSchema.isStructSchema();\n if (isEventStream) {\n const context2 = this.serdeContext;\n if (!context2.eventStreamMarshaller) {\n throw new Error(\"@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext.\");\n }\n const memberSchemas = memberSchema.getMemberSchemas();\n dataObject[memberName] = context2.eventStreamMarshaller.deserialize(response.body, async (event) => {\n const unionMember = Object.keys(event).find((key) => {\n return key !== \"__type\";\n }) ?? \"\";\n if (unionMember in memberSchemas) {\n const eventStreamSchema = memberSchemas[unionMember];\n return {\n [unionMember]: await deserializer.read(eventStreamSchema, event[unionMember].body)\n };\n } else {\n return {\n $unknown: event\n };\n }\n });\n } else {\n dataObject[memberName] = (0, import_util_stream2.sdkStreamMixin)(response.body);\n }\n } else if (response.body) {\n const bytes = await collectBody(response.body, context);\n if (bytes.byteLength > 0) {\n dataObject[memberName] = await deserializer.read(memberSchema, bytes);\n }\n }\n } else if (memberTraits.httpHeader) {\n const key = String(memberTraits.httpHeader).toLowerCase();\n const value = response.headers[key];\n if (null != value) {\n if (memberSchema.isListSchema()) {\n const headerListValueSchema = memberSchema.getValueSchema();\n let sections;\n if (headerListValueSchema.isTimestampSchema() && headerListValueSchema.getSchema() === import_schema.SCHEMA.TIMESTAMP_DEFAULT) {\n sections = (0, import_serde.splitEvery)(value, \",\", 2);\n } else {\n sections = (0, import_serde.splitHeader)(value);\n }\n const list = [];\n for (const section of sections) {\n list.push(await deserializer.read([headerListValueSchema, { httpHeader: key }], section.trim()));\n }\n dataObject[memberName] = list;\n } else {\n dataObject[memberName] = await deserializer.read(memberSchema, value);\n }\n }\n } else if (memberTraits.httpPrefixHeaders !== void 0) {\n dataObject[memberName] = {};\n for (const [header, value] of Object.entries(response.headers)) {\n if (!headerBindings.has(header) && header.startsWith(memberTraits.httpPrefixHeaders)) {\n dataObject[memberName][header.slice(memberTraits.httpPrefixHeaders.length)] = await deserializer.read(\n [memberSchema.getValueSchema(), { httpHeader: header }],\n value\n );\n }\n }\n } else if (memberTraits.httpResponseCode) {\n dataObject[memberName] = response.statusCode;\n } else {\n nonHttpBindingMembers.push(memberName);\n }\n }\n return nonHttpBindingMembers;\n }\n};\n\n// src/submodules/protocols/HttpBindingProtocol.ts\nvar HttpBindingProtocol = class extends HttpProtocol {\n async serializeRequest(operationSchema, input, context) {\n const serializer = this.serializer;\n const query = {};\n const headers = {};\n const endpoint = await context.endpoint();\n const ns = import_schema2.NormalizedSchema.of(operationSchema?.input);\n const schema = ns.getSchema();\n let hasNonHttpBindingMember = false;\n let payload;\n const request = new import_protocol_http2.HttpRequest({\n protocol: \"\",\n hostname: \"\",\n port: void 0,\n path: \"\",\n fragment: void 0,\n query,\n headers,\n body: void 0\n });\n if (endpoint) {\n this.updateServiceEndpoint(request, endpoint);\n this.setHostPrefix(request, operationSchema, input);\n const opTraits = import_schema2.NormalizedSchema.translateTraits(operationSchema.traits);\n if (opTraits.http) {\n request.method = opTraits.http[0];\n const [path, search] = opTraits.http[1].split(\"?\");\n if (request.path == \"/\") {\n request.path = path;\n } else {\n request.path += path;\n }\n const traitSearchParams = new URLSearchParams(search ?? \"\");\n Object.assign(query, Object.fromEntries(traitSearchParams));\n }\n }\n const _input = {\n ...input\n };\n for (const memberName of Object.keys(_input)) {\n const memberNs = ns.getMemberSchema(memberName);\n if (memberNs === void 0) {\n continue;\n }\n const memberTraits = memberNs.getMergedTraits();\n const inputMember = _input[memberName];\n if (memberTraits.httpPayload) {\n const isStreaming = memberNs.isStreaming();\n if (isStreaming) {\n const isEventStream = memberNs.isStructSchema();\n if (isEventStream) {\n throw new Error(\"serialization of event streams is not yet implemented\");\n } else {\n payload = inputMember;\n }\n } else {\n serializer.write(memberNs, inputMember);\n payload = serializer.flush();\n }\n } else if (memberTraits.httpLabel) {\n serializer.write(memberNs, inputMember);\n const replacement = serializer.flush();\n if (request.path.includes(`{${memberName}+}`)) {\n request.path = request.path.replace(\n `{${memberName}+}`,\n replacement.split(\"/\").map(extendedEncodeURIComponent).join(\"/\")\n );\n } else if (request.path.includes(`{${memberName}}`)) {\n request.path = request.path.replace(`{${memberName}}`, extendedEncodeURIComponent(replacement));\n }\n delete _input[memberName];\n } else if (memberTraits.httpHeader) {\n serializer.write(memberNs, inputMember);\n headers[memberTraits.httpHeader.toLowerCase()] = String(serializer.flush());\n delete _input[memberName];\n } else if (typeof memberTraits.httpPrefixHeaders === \"string\") {\n for (const [key, val] of Object.entries(inputMember)) {\n const amalgam = memberTraits.httpPrefixHeaders + key;\n serializer.write([memberNs.getValueSchema(), { httpHeader: amalgam }], val);\n headers[amalgam.toLowerCase()] = serializer.flush();\n }\n delete _input[memberName];\n } else if (memberTraits.httpQuery || memberTraits.httpQueryParams) {\n this.serializeQuery(memberNs, inputMember, query);\n delete _input[memberName];\n } else {\n hasNonHttpBindingMember = true;\n }\n }\n if (hasNonHttpBindingMember && input) {\n serializer.write(schema, _input);\n payload = serializer.flush();\n }\n request.headers = headers;\n request.query = query;\n request.body = payload;\n return request;\n }\n serializeQuery(ns, data, query) {\n const serializer = this.serializer;\n const traits = ns.getMergedTraits();\n if (traits.httpQueryParams) {\n for (const [key, val] of Object.entries(data)) {\n if (!(key in query)) {\n this.serializeQuery(\n import_schema2.NormalizedSchema.of([\n ns.getValueSchema(),\n {\n // We pass on the traits to the sub-schema\n // because we are still in the process of serializing the map itself.\n ...traits,\n httpQuery: key,\n httpQueryParams: void 0\n }\n ]),\n val,\n query\n );\n }\n }\n return;\n }\n if (ns.isListSchema()) {\n const sparse = !!ns.getMergedTraits().sparse;\n const buffer = [];\n for (const item of data) {\n serializer.write([ns.getValueSchema(), traits], item);\n const serializable = serializer.flush();\n if (sparse || serializable !== void 0) {\n buffer.push(serializable);\n }\n }\n query[traits.httpQuery] = buffer;\n } else {\n serializer.write([ns, traits], data);\n query[traits.httpQuery] = serializer.flush();\n }\n }\n async deserializeResponse(operationSchema, context, response) {\n const deserializer = this.deserializer;\n const ns = import_schema2.NormalizedSchema.of(operationSchema.output);\n const dataObject = {};\n if (response.statusCode >= 300) {\n const bytes = await collectBody(response.body, context);\n if (bytes.byteLength > 0) {\n Object.assign(dataObject, await deserializer.read(import_schema2.SCHEMA.DOCUMENT, bytes));\n }\n await this.handleError(operationSchema, context, response, dataObject, this.deserializeMetadata(response));\n throw new Error(\"@smithy/core/protocols - HTTP Protocol error handler failed to throw.\");\n }\n for (const header in response.headers) {\n const value = response.headers[header];\n delete response.headers[header];\n response.headers[header.toLowerCase()] = value;\n }\n const headerBindings = new Set(\n Object.values(ns.getMemberSchemas()).map((schema) => {\n return schema.getMergedTraits().httpHeader;\n }).filter(Boolean)\n );\n const nonHttpBindingMembers = await this.deserializeHttpMessage(ns, context, response, headerBindings, dataObject);\n if (nonHttpBindingMembers.length) {\n const bytes = await collectBody(response.body, context);\n if (bytes.byteLength > 0) {\n const dataFromBody = await deserializer.read(ns, bytes);\n for (const member of nonHttpBindingMembers) {\n dataObject[member] = dataFromBody[member];\n }\n }\n }\n const output = {\n $metadata: this.deserializeMetadata(response),\n ...dataObject\n };\n return output;\n }\n};\n\n// src/submodules/protocols/RpcProtocol.ts\nvar import_schema3 = require(\"@smithy/core/schema\");\nvar import_protocol_http3 = require(\"@smithy/protocol-http\");\nvar RpcProtocol = class extends HttpProtocol {\n async serializeRequest(operationSchema, input, context) {\n const serializer = this.serializer;\n const query = {};\n const headers = {};\n const endpoint = await context.endpoint();\n const ns = import_schema3.NormalizedSchema.of(operationSchema?.input);\n const schema = ns.getSchema();\n let payload;\n const request = new import_protocol_http3.HttpRequest({\n protocol: \"\",\n hostname: \"\",\n port: void 0,\n path: \"/\",\n fragment: void 0,\n query,\n headers,\n body: void 0\n });\n if (endpoint) {\n this.updateServiceEndpoint(request, endpoint);\n this.setHostPrefix(request, operationSchema, input);\n }\n const _input = {\n ...input\n };\n if (input) {\n serializer.write(schema, _input);\n payload = serializer.flush();\n }\n request.headers = headers;\n request.query = query;\n request.body = payload;\n request.method = \"POST\";\n return request;\n }\n async deserializeResponse(operationSchema, context, response) {\n const deserializer = this.deserializer;\n const ns = import_schema3.NormalizedSchema.of(operationSchema.output);\n const dataObject = {};\n if (response.statusCode >= 300) {\n const bytes2 = await collectBody(response.body, context);\n if (bytes2.byteLength > 0) {\n Object.assign(dataObject, await deserializer.read(import_schema3.SCHEMA.DOCUMENT, bytes2));\n }\n await this.handleError(operationSchema, context, response, dataObject, this.deserializeMetadata(response));\n throw new Error(\"@smithy/core/protocols - RPC Protocol error handler failed to throw.\");\n }\n for (const header in response.headers) {\n const value = response.headers[header];\n delete response.headers[header];\n response.headers[header.toLowerCase()] = value;\n }\n const bytes = await collectBody(response.body, context);\n if (bytes.byteLength > 0) {\n Object.assign(dataObject, await deserializer.read(ns, bytes));\n }\n const output = {\n $metadata: this.deserializeMetadata(response),\n ...dataObject\n };\n return output;\n }\n};\n\n// src/submodules/protocols/requestBuilder.ts\nvar import_protocol_http4 = require(\"@smithy/protocol-http\");\n\n// src/submodules/protocols/resolve-path.ts\nvar resolvedPath = (resolvedPath2, input, memberName, labelValueProvider, uriLabel, isGreedyLabel) => {\n if (input != null && input[memberName] !== void 0) {\n const labelValue = labelValueProvider();\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: \" + memberName + \".\");\n }\n resolvedPath2 = resolvedPath2.replace(\n uriLabel,\n isGreedyLabel ? labelValue.split(\"/\").map((segment) => extendedEncodeURIComponent(segment)).join(\"/\") : extendedEncodeURIComponent(labelValue)\n );\n } else {\n throw new Error(\"No value provided for input HTTP label: \" + memberName + \".\");\n }\n return resolvedPath2;\n};\n\n// src/submodules/protocols/requestBuilder.ts\nfunction requestBuilder(input, context) {\n return new RequestBuilder(input, context);\n}\nvar RequestBuilder = class {\n constructor(input, context) {\n this.input = input;\n this.context = context;\n this.query = {};\n this.method = \"\";\n this.headers = {};\n this.path = \"\";\n this.body = null;\n this.hostname = \"\";\n this.resolvePathStack = [];\n }\n async build() {\n const { hostname, protocol = \"https\", port, path: basePath } = await this.context.endpoint();\n this.path = basePath;\n for (const resolvePath of this.resolvePathStack) {\n resolvePath(this.path);\n }\n return new import_protocol_http4.HttpRequest({\n protocol,\n hostname: this.hostname || hostname,\n port,\n method: this.method,\n path: this.path,\n query: this.query,\n body: this.body,\n headers: this.headers\n });\n }\n /**\n * Brevity setter for \"hostname\".\n */\n hn(hostname) {\n this.hostname = hostname;\n return this;\n }\n /**\n * Brevity initial builder for \"basepath\".\n */\n bp(uriLabel) {\n this.resolvePathStack.push((basePath) => {\n this.path = `${basePath?.endsWith(\"/\") ? basePath.slice(0, -1) : basePath || \"\"}` + uriLabel;\n });\n return this;\n }\n /**\n * Brevity incremental builder for \"path\".\n */\n p(memberName, labelValueProvider, uriLabel, isGreedyLabel) {\n this.resolvePathStack.push((path) => {\n this.path = resolvedPath(path, this.input, memberName, labelValueProvider, uriLabel, isGreedyLabel);\n });\n return this;\n }\n /**\n * Brevity setter for \"headers\".\n */\n h(headers) {\n this.headers = headers;\n return this;\n }\n /**\n * Brevity setter for \"query\".\n */\n q(query) {\n this.query = query;\n return this;\n }\n /**\n * Brevity setter for \"body\".\n */\n b(body) {\n this.body = body;\n return this;\n }\n /**\n * Brevity setter for \"method\".\n */\n m(method) {\n this.method = method;\n return this;\n }\n};\n\n// src/submodules/protocols/serde/FromStringShapeDeserializer.ts\nvar import_schema5 = require(\"@smithy/core/schema\");\nvar import_serde2 = require(\"@smithy/core/serde\");\nvar import_util_base64 = require(\"@smithy/util-base64\");\nvar import_util_utf8 = require(\"@smithy/util-utf8\");\n\n// src/submodules/protocols/serde/determineTimestampFormat.ts\nvar import_schema4 = require(\"@smithy/core/schema\");\nfunction determineTimestampFormat(ns, settings) {\n if (settings.timestampFormat.useTrait) {\n if (ns.isTimestampSchema() && (ns.getSchema() === import_schema4.SCHEMA.TIMESTAMP_DATE_TIME || ns.getSchema() === import_schema4.SCHEMA.TIMESTAMP_HTTP_DATE || ns.getSchema() === import_schema4.SCHEMA.TIMESTAMP_EPOCH_SECONDS)) {\n return ns.getSchema();\n }\n }\n const { httpLabel, httpPrefixHeaders, httpHeader, httpQuery } = ns.getMergedTraits();\n const bindingFormat = settings.httpBindings ? typeof httpPrefixHeaders === \"string\" || Boolean(httpHeader) ? import_schema4.SCHEMA.TIMESTAMP_HTTP_DATE : Boolean(httpQuery) || Boolean(httpLabel) ? import_schema4.SCHEMA.TIMESTAMP_DATE_TIME : void 0 : void 0;\n return bindingFormat ?? settings.timestampFormat.default;\n}\n\n// src/submodules/protocols/serde/FromStringShapeDeserializer.ts\nvar FromStringShapeDeserializer = class {\n constructor(settings) {\n this.settings = settings;\n }\n setSerdeContext(serdeContext) {\n this.serdeContext = serdeContext;\n }\n read(_schema, data) {\n const ns = import_schema5.NormalizedSchema.of(_schema);\n if (ns.isListSchema()) {\n return (0, import_serde2.splitHeader)(data).map((item) => this.read(ns.getValueSchema(), item));\n }\n if (ns.isBlobSchema()) {\n return (this.serdeContext?.base64Decoder ?? import_util_base64.fromBase64)(data);\n }\n if (ns.isTimestampSchema()) {\n const format = determineTimestampFormat(ns, this.settings);\n switch (format) {\n case import_schema5.SCHEMA.TIMESTAMP_DATE_TIME:\n return (0, import_serde2.parseRfc3339DateTimeWithOffset)(data);\n case import_schema5.SCHEMA.TIMESTAMP_HTTP_DATE:\n return (0, import_serde2.parseRfc7231DateTime)(data);\n case import_schema5.SCHEMA.TIMESTAMP_EPOCH_SECONDS:\n return (0, import_serde2.parseEpochTimestamp)(data);\n default:\n console.warn(\"Missing timestamp format, parsing value with Date constructor:\", data);\n return new Date(data);\n }\n }\n if (ns.isStringSchema()) {\n const mediaType = ns.getMergedTraits().mediaType;\n let intermediateValue = data;\n if (mediaType) {\n if (ns.getMergedTraits().httpHeader) {\n intermediateValue = this.base64ToUtf8(intermediateValue);\n }\n const isJson = mediaType === \"application/json\" || mediaType.endsWith(\"+json\");\n if (isJson) {\n intermediateValue = import_serde2.LazyJsonString.from(intermediateValue);\n }\n return intermediateValue;\n }\n }\n switch (true) {\n case ns.isNumericSchema():\n return Number(data);\n case ns.isBigIntegerSchema():\n return BigInt(data);\n case ns.isBigDecimalSchema():\n return new import_serde2.NumericValue(data, \"bigDecimal\");\n case ns.isBooleanSchema():\n return String(data).toLowerCase() === \"true\";\n }\n return data;\n }\n base64ToUtf8(base64String) {\n return (this.serdeContext?.utf8Encoder ?? import_util_utf8.toUtf8)((this.serdeContext?.base64Decoder ?? import_util_base64.fromBase64)(base64String));\n }\n};\n\n// src/submodules/protocols/serde/HttpInterceptingShapeDeserializer.ts\nvar import_schema6 = require(\"@smithy/core/schema\");\nvar import_util_utf82 = require(\"@smithy/util-utf8\");\nvar HttpInterceptingShapeDeserializer = class {\n constructor(codecDeserializer, codecSettings) {\n this.codecDeserializer = codecDeserializer;\n this.stringDeserializer = new FromStringShapeDeserializer(codecSettings);\n }\n setSerdeContext(serdeContext) {\n this.stringDeserializer.setSerdeContext(serdeContext);\n this.codecDeserializer.setSerdeContext(serdeContext);\n this.serdeContext = serdeContext;\n }\n read(schema, data) {\n const ns = import_schema6.NormalizedSchema.of(schema);\n const traits = ns.getMergedTraits();\n const toString = this.serdeContext?.utf8Encoder ?? import_util_utf82.toUtf8;\n if (traits.httpHeader || traits.httpResponseCode) {\n return this.stringDeserializer.read(ns, toString(data));\n }\n if (traits.httpPayload) {\n if (ns.isBlobSchema()) {\n const toBytes = this.serdeContext?.utf8Decoder ?? import_util_utf82.fromUtf8;\n if (typeof data === \"string\") {\n return toBytes(data);\n }\n return data;\n } else if (ns.isStringSchema()) {\n if (\"byteLength\" in data) {\n return toString(data);\n }\n return data;\n }\n }\n return this.codecDeserializer.read(ns, data);\n }\n};\n\n// src/submodules/protocols/serde/HttpInterceptingShapeSerializer.ts\nvar import_schema8 = require(\"@smithy/core/schema\");\n\n// src/submodules/protocols/serde/ToStringShapeSerializer.ts\nvar import_schema7 = require(\"@smithy/core/schema\");\nvar import_serde3 = require(\"@smithy/core/serde\");\nvar import_util_base642 = require(\"@smithy/util-base64\");\nvar ToStringShapeSerializer = class {\n constructor(settings) {\n this.settings = settings;\n this.stringBuffer = \"\";\n this.serdeContext = void 0;\n }\n setSerdeContext(serdeContext) {\n this.serdeContext = serdeContext;\n }\n write(schema, value) {\n const ns = import_schema7.NormalizedSchema.of(schema);\n switch (typeof value) {\n case \"object\":\n if (value === null) {\n this.stringBuffer = \"null\";\n return;\n }\n if (ns.isTimestampSchema()) {\n if (!(value instanceof Date)) {\n throw new Error(\n `@smithy/core/protocols - received non-Date value ${value} when schema expected Date in ${ns.getName(true)}`\n );\n }\n const format = determineTimestampFormat(ns, this.settings);\n switch (format) {\n case import_schema7.SCHEMA.TIMESTAMP_DATE_TIME:\n this.stringBuffer = value.toISOString().replace(\".000Z\", \"Z\");\n break;\n case import_schema7.SCHEMA.TIMESTAMP_HTTP_DATE:\n this.stringBuffer = (0, import_serde3.dateToUtcString)(value);\n break;\n case import_schema7.SCHEMA.TIMESTAMP_EPOCH_SECONDS:\n this.stringBuffer = String(value.getTime() / 1e3);\n break;\n default:\n console.warn(\"Missing timestamp format, using epoch seconds\", value);\n this.stringBuffer = String(value.getTime() / 1e3);\n }\n return;\n }\n if (ns.isBlobSchema() && \"byteLength\" in value) {\n this.stringBuffer = (this.serdeContext?.base64Encoder ?? import_util_base642.toBase64)(value);\n return;\n }\n if (ns.isListSchema() && Array.isArray(value)) {\n let buffer = \"\";\n for (const item of value) {\n this.write([ns.getValueSchema(), ns.getMergedTraits()], item);\n const headerItem = this.flush();\n const serialized = ns.getValueSchema().isTimestampSchema() ? headerItem : (0, import_serde3.quoteHeader)(headerItem);\n if (buffer !== \"\") {\n buffer += \", \";\n }\n buffer += serialized;\n }\n this.stringBuffer = buffer;\n return;\n }\n this.stringBuffer = JSON.stringify(value, null, 2);\n break;\n case \"string\":\n const mediaType = ns.getMergedTraits().mediaType;\n let intermediateValue = value;\n if (mediaType) {\n const isJson = mediaType === \"application/json\" || mediaType.endsWith(\"+json\");\n if (isJson) {\n intermediateValue = import_serde3.LazyJsonString.from(intermediateValue);\n }\n if (ns.getMergedTraits().httpHeader) {\n this.stringBuffer = (this.serdeContext?.base64Encoder ?? import_util_base642.toBase64)(intermediateValue.toString());\n return;\n }\n }\n this.stringBuffer = value;\n break;\n default:\n this.stringBuffer = String(value);\n }\n }\n flush() {\n const buffer = this.stringBuffer;\n this.stringBuffer = \"\";\n return buffer;\n }\n};\n\n// src/submodules/protocols/serde/HttpInterceptingShapeSerializer.ts\nvar HttpInterceptingShapeSerializer = class {\n constructor(codecSerializer, codecSettings, stringSerializer = new ToStringShapeSerializer(codecSettings)) {\n this.codecSerializer = codecSerializer;\n this.stringSerializer = stringSerializer;\n }\n setSerdeContext(serdeContext) {\n this.codecSerializer.setSerdeContext(serdeContext);\n this.stringSerializer.setSerdeContext(serdeContext);\n }\n write(schema, value) {\n const ns = import_schema8.NormalizedSchema.of(schema);\n const traits = ns.getMergedTraits();\n if (traits.httpHeader || traits.httpLabel || traits.httpQuery) {\n this.stringSerializer.write(ns, value);\n this.buffer = this.stringSerializer.flush();\n return;\n }\n return this.codecSerializer.write(ns, value);\n }\n flush() {\n if (this.buffer !== void 0) {\n const buffer = this.buffer;\n this.buffer = void 0;\n return buffer;\n }\n return this.codecSerializer.flush();\n }\n};\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n FromStringShapeDeserializer,\n HttpBindingProtocol,\n HttpInterceptingShapeDeserializer,\n HttpInterceptingShapeSerializer,\n RequestBuilder,\n RpcProtocol,\n ToStringShapeSerializer,\n collectBody,\n determineTimestampFormat,\n extendedEncodeURIComponent,\n requestBuilder,\n resolvedPath\n});\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/submodules/schema/index.ts\nvar schema_exports = {};\n__export(schema_exports, {\n ErrorSchema: () => ErrorSchema,\n ListSchema: () => ListSchema,\n MapSchema: () => MapSchema,\n NormalizedSchema: () => NormalizedSchema,\n OperationSchema: () => OperationSchema,\n SCHEMA: () => SCHEMA,\n Schema: () => Schema,\n SimpleSchema: () => SimpleSchema,\n StructureSchema: () => StructureSchema,\n TypeRegistry: () => TypeRegistry,\n deref: () => deref,\n deserializerMiddlewareOption: () => deserializerMiddlewareOption,\n error: () => error,\n getSchemaSerdePlugin: () => getSchemaSerdePlugin,\n list: () => list,\n map: () => map,\n op: () => op,\n serializerMiddlewareOption: () => serializerMiddlewareOption,\n sim: () => sim,\n struct: () => struct\n});\nmodule.exports = __toCommonJS(schema_exports);\n\n// src/submodules/schema/deref.ts\nvar deref = (schemaRef) => {\n if (typeof schemaRef === \"function\") {\n return schemaRef();\n }\n return schemaRef;\n};\n\n// src/submodules/schema/middleware/schemaDeserializationMiddleware.ts\nvar import_protocol_http = require(\"@smithy/protocol-http\");\nvar import_util_middleware = require(\"@smithy/util-middleware\");\nvar schemaDeserializationMiddleware = (config) => (next, context) => async (args) => {\n const { response } = await next(args);\n const { operationSchema } = (0, import_util_middleware.getSmithyContext)(context);\n try {\n const parsed = await config.protocol.deserializeResponse(\n operationSchema,\n {\n ...config,\n ...context\n },\n response\n );\n return {\n response,\n output: parsed\n };\n } catch (error2) {\n Object.defineProperty(error2, \"$response\", {\n value: response\n });\n if (!(\"$metadata\" in error2)) {\n const hint = `Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`;\n try {\n error2.message += \"\\n \" + hint;\n } catch (e) {\n if (!context.logger || context.logger?.constructor?.name === \"NoOpLogger\") {\n console.warn(hint);\n } else {\n context.logger?.warn?.(hint);\n }\n }\n if (typeof error2.$responseBodyText !== \"undefined\") {\n if (error2.$response) {\n error2.$response.body = error2.$responseBodyText;\n }\n }\n try {\n if (import_protocol_http.HttpResponse.isInstance(response)) {\n const { headers = {} } = response;\n const headerEntries = Object.entries(headers);\n error2.$metadata = {\n httpStatusCode: response.statusCode,\n requestId: findHeader(/^x-[\\w-]+-request-?id$/, headerEntries),\n extendedRequestId: findHeader(/^x-[\\w-]+-id-2$/, headerEntries),\n cfId: findHeader(/^x-[\\w-]+-cf-id$/, headerEntries)\n };\n }\n } catch (e) {\n }\n }\n throw error2;\n }\n};\nvar findHeader = (pattern, headers) => {\n return (headers.find(([k]) => {\n return k.match(pattern);\n }) || [void 0, void 0])[1];\n};\n\n// src/submodules/schema/middleware/schemaSerializationMiddleware.ts\nvar import_util_middleware2 = require(\"@smithy/util-middleware\");\nvar schemaSerializationMiddleware = (config) => (next, context) => async (args) => {\n const { operationSchema } = (0, import_util_middleware2.getSmithyContext)(context);\n const endpoint = context.endpointV2?.url && config.urlParser ? async () => config.urlParser(context.endpointV2.url) : config.endpoint;\n const request = await config.protocol.serializeRequest(operationSchema, args.input, {\n ...config,\n ...context,\n endpoint\n });\n return next({\n ...args,\n request\n });\n};\n\n// src/submodules/schema/middleware/getSchemaSerdePlugin.ts\nvar deserializerMiddlewareOption = {\n name: \"deserializerMiddleware\",\n step: \"deserialize\",\n tags: [\"DESERIALIZER\"],\n override: true\n};\nvar serializerMiddlewareOption = {\n name: \"serializerMiddleware\",\n step: \"serialize\",\n tags: [\"SERIALIZER\"],\n override: true\n};\nfunction getSchemaSerdePlugin(config) {\n return {\n applyToStack: (commandStack) => {\n commandStack.add(schemaSerializationMiddleware(config), serializerMiddlewareOption);\n commandStack.add(schemaDeserializationMiddleware(config), deserializerMiddlewareOption);\n config.protocol.setSerdeContext(config);\n }\n };\n}\n\n// src/submodules/schema/TypeRegistry.ts\nvar TypeRegistry = class _TypeRegistry {\n constructor(namespace, schemas = /* @__PURE__ */ new Map()) {\n this.namespace = namespace;\n this.schemas = schemas;\n }\n static {\n this.registries = /* @__PURE__ */ new Map();\n }\n /**\n * @param namespace - specifier.\n * @returns the schema for that namespace, creating it if necessary.\n */\n static for(namespace) {\n if (!_TypeRegistry.registries.has(namespace)) {\n _TypeRegistry.registries.set(namespace, new _TypeRegistry(namespace));\n }\n return _TypeRegistry.registries.get(namespace);\n }\n /**\n * Adds the given schema to a type registry with the same namespace.\n *\n * @param shapeId - to be registered.\n * @param schema - to be registered.\n */\n register(shapeId, schema) {\n const qualifiedName = this.normalizeShapeId(shapeId);\n const registry = _TypeRegistry.for(this.getNamespace(shapeId));\n registry.schemas.set(qualifiedName, schema);\n }\n /**\n * @param shapeId - query.\n * @returns the schema.\n */\n getSchema(shapeId) {\n const id = this.normalizeShapeId(shapeId);\n if (!this.schemas.has(id)) {\n throw new Error(`@smithy/core/schema - schema not found for ${id}`);\n }\n return this.schemas.get(id);\n }\n /**\n * The smithy-typescript code generator generates a synthetic (i.e. unmodeled) base exception,\n * because generated SDKs before the introduction of schemas have the notion of a ServiceBaseException, which\n * is unique per service/model.\n *\n * This is generated under a unique prefix that is combined with the service namespace, and this\n * method is used to retrieve it.\n *\n * The base exception synthetic schema is used when an error is returned by a service, but we cannot\n * determine what existing schema to use to deserialize it.\n *\n * @returns the synthetic base exception of the service namespace associated with this registry instance.\n */\n getBaseException() {\n for (const [id, schema] of this.schemas.entries()) {\n if (id.startsWith(\"smithyts.client.synthetic.\") && id.endsWith(\"ServiceException\")) {\n return schema;\n }\n }\n return void 0;\n }\n /**\n * @param predicate - criterion.\n * @returns a schema in this registry matching the predicate.\n */\n find(predicate) {\n return [...this.schemas.values()].find(predicate);\n }\n /**\n * Unloads the current TypeRegistry.\n */\n destroy() {\n _TypeRegistry.registries.delete(this.namespace);\n this.schemas.clear();\n }\n normalizeShapeId(shapeId) {\n if (shapeId.includes(\"#\")) {\n return shapeId;\n }\n return this.namespace + \"#\" + shapeId;\n }\n getNamespace(shapeId) {\n return this.normalizeShapeId(shapeId).split(\"#\")[0];\n }\n};\n\n// src/submodules/schema/schemas/Schema.ts\nvar Schema = class {\n constructor(name, traits) {\n this.name = name;\n this.traits = traits;\n }\n};\n\n// src/submodules/schema/schemas/ListSchema.ts\nvar ListSchema = class extends Schema {\n constructor(name, traits, valueSchema) {\n super(name, traits);\n this.name = name;\n this.traits = traits;\n this.valueSchema = valueSchema;\n }\n};\nfunction list(namespace, name, traits = {}, valueSchema) {\n const schema = new ListSchema(\n namespace + \"#\" + name,\n traits,\n typeof valueSchema === \"function\" ? valueSchema() : valueSchema\n );\n TypeRegistry.for(namespace).register(name, schema);\n return schema;\n}\n\n// src/submodules/schema/schemas/MapSchema.ts\nvar MapSchema = class extends Schema {\n constructor(name, traits, keySchema, valueSchema) {\n super(name, traits);\n this.name = name;\n this.traits = traits;\n this.keySchema = keySchema;\n this.valueSchema = valueSchema;\n }\n};\nfunction map(namespace, name, traits = {}, keySchema, valueSchema) {\n const schema = new MapSchema(\n namespace + \"#\" + name,\n traits,\n keySchema,\n typeof valueSchema === \"function\" ? valueSchema() : valueSchema\n );\n TypeRegistry.for(namespace).register(name, schema);\n return schema;\n}\n\n// src/submodules/schema/schemas/OperationSchema.ts\nvar OperationSchema = class extends Schema {\n constructor(name, traits, input, output) {\n super(name, traits);\n this.name = name;\n this.traits = traits;\n this.input = input;\n this.output = output;\n }\n};\nfunction op(namespace, name, traits = {}, input, output) {\n const schema = new OperationSchema(namespace + \"#\" + name, traits, input, output);\n TypeRegistry.for(namespace).register(name, schema);\n return schema;\n}\n\n// src/submodules/schema/schemas/StructureSchema.ts\nvar StructureSchema = class extends Schema {\n constructor(name, traits, memberNames, memberList) {\n super(name, traits);\n this.name = name;\n this.traits = traits;\n this.memberNames = memberNames;\n this.memberList = memberList;\n this.members = {};\n for (let i = 0; i < memberNames.length; ++i) {\n this.members[memberNames[i]] = Array.isArray(memberList[i]) ? memberList[i] : [memberList[i], 0];\n }\n }\n};\nfunction struct(namespace, name, traits, memberNames, memberList) {\n const schema = new StructureSchema(namespace + \"#\" + name, traits, memberNames, memberList);\n TypeRegistry.for(namespace).register(name, schema);\n return schema;\n}\n\n// src/submodules/schema/schemas/ErrorSchema.ts\nvar ErrorSchema = class extends StructureSchema {\n constructor(name, traits, memberNames, memberList, ctor) {\n super(name, traits, memberNames, memberList);\n this.name = name;\n this.traits = traits;\n this.memberNames = memberNames;\n this.memberList = memberList;\n this.ctor = ctor;\n }\n};\nfunction error(namespace, name, traits = {}, memberNames, memberList, ctor) {\n const schema = new ErrorSchema(namespace + \"#\" + name, traits, memberNames, memberList, ctor);\n TypeRegistry.for(namespace).register(name, schema);\n return schema;\n}\n\n// src/submodules/schema/schemas/sentinels.ts\nvar SCHEMA = {\n BLOB: 21,\n // 21\n STREAMING_BLOB: 42,\n // 42\n BOOLEAN: 2,\n // 2\n STRING: 0,\n // 0\n NUMERIC: 1,\n // 1\n BIG_INTEGER: 17,\n // 17\n BIG_DECIMAL: 19,\n // 19\n DOCUMENT: 15,\n // 15\n TIMESTAMP_DEFAULT: 4,\n // 4\n TIMESTAMP_DATE_TIME: 5,\n // 5\n TIMESTAMP_HTTP_DATE: 6,\n // 6\n TIMESTAMP_EPOCH_SECONDS: 7,\n // 7\n LIST_MODIFIER: 64,\n // 64\n MAP_MODIFIER: 128\n // 128\n};\n\n// src/submodules/schema/schemas/SimpleSchema.ts\nvar SimpleSchema = class extends Schema {\n constructor(name, schemaRef, traits) {\n super(name, traits);\n this.name = name;\n this.schemaRef = schemaRef;\n this.traits = traits;\n }\n};\nfunction sim(namespace, name, schemaRef, traits) {\n const schema = new SimpleSchema(namespace + \"#\" + name, schemaRef, traits);\n TypeRegistry.for(namespace).register(name, schema);\n return schema;\n}\n\n// src/submodules/schema/schemas/NormalizedSchema.ts\nvar NormalizedSchema = class _NormalizedSchema {\n /**\n * @param ref - a polymorphic SchemaRef to be dereferenced/normalized.\n * @param memberName - optional memberName if this NormalizedSchema should be considered a member schema.\n */\n constructor(ref, memberName) {\n this.ref = ref;\n this.memberName = memberName;\n const traitStack = [];\n let _ref = ref;\n let schema = ref;\n this._isMemberSchema = false;\n while (Array.isArray(_ref)) {\n traitStack.push(_ref[1]);\n _ref = _ref[0];\n schema = deref(_ref);\n this._isMemberSchema = true;\n }\n if (traitStack.length > 0) {\n this.memberTraits = {};\n for (let i = traitStack.length - 1; i >= 0; --i) {\n const traitSet = traitStack[i];\n Object.assign(this.memberTraits, _NormalizedSchema.translateTraits(traitSet));\n }\n } else {\n this.memberTraits = 0;\n }\n if (schema instanceof _NormalizedSchema) {\n this.name = schema.name;\n this.traits = schema.traits;\n this._isMemberSchema = schema._isMemberSchema;\n this.schema = schema.schema;\n this.memberTraits = Object.assign({}, schema.getMemberTraits(), this.getMemberTraits());\n this.normalizedTraits = void 0;\n this.ref = schema.ref;\n this.memberName = memberName ?? schema.memberName;\n return;\n }\n this.schema = deref(schema);\n if (this.schema && typeof this.schema === \"object\") {\n this.traits = this.schema?.traits ?? {};\n } else {\n this.traits = 0;\n }\n this.name = (typeof this.schema === \"object\" ? this.schema?.name : void 0) ?? this.memberName ?? this.getSchemaName();\n if (this._isMemberSchema && !memberName) {\n throw new Error(\n `@smithy/core/schema - NormalizedSchema member schema ${this.getName(true)} must initialize with memberName argument.`\n );\n }\n }\n /**\n * Static constructor that attempts to avoid wrapping a NormalizedSchema within another.\n */\n static of(ref, memberName) {\n if (ref instanceof _NormalizedSchema) {\n return ref;\n }\n return new _NormalizedSchema(ref, memberName);\n }\n /**\n * @param indicator - numeric indicator for preset trait combination.\n * @returns equivalent trait object.\n */\n static translateTraits(indicator) {\n if (typeof indicator === \"object\") {\n return indicator;\n }\n indicator = indicator | 0;\n const traits = {};\n if ((indicator & 1) === 1) {\n traits.httpLabel = 1;\n }\n if ((indicator >> 1 & 1) === 1) {\n traits.idempotent = 1;\n }\n if ((indicator >> 2 & 1) === 1) {\n traits.idempotencyToken = 1;\n }\n if ((indicator >> 3 & 1) === 1) {\n traits.sensitive = 1;\n }\n if ((indicator >> 4 & 1) === 1) {\n traits.httpPayload = 1;\n }\n if ((indicator >> 5 & 1) === 1) {\n traits.httpResponseCode = 1;\n }\n if ((indicator >> 6 & 1) === 1) {\n traits.httpQueryParams = 1;\n }\n return traits;\n }\n /**\n * Creates a normalized member schema from the given schema and member name.\n */\n static memberFrom(memberSchema, memberName) {\n if (memberSchema instanceof _NormalizedSchema) {\n memberSchema.memberName = memberName;\n memberSchema._isMemberSchema = true;\n return memberSchema;\n }\n return new _NormalizedSchema(memberSchema, memberName);\n }\n /**\n * @returns the underlying non-normalized schema.\n */\n getSchema() {\n if (this.schema instanceof _NormalizedSchema) {\n return this.schema = this.schema.getSchema();\n }\n if (this.schema instanceof SimpleSchema) {\n return deref(this.schema.schemaRef);\n }\n return deref(this.schema);\n }\n /**\n * @param withNamespace - qualifies the name.\n * @returns e.g. `MyShape` or `com.namespace#MyShape`.\n */\n getName(withNamespace = false) {\n if (!withNamespace) {\n if (this.name && this.name.includes(\"#\")) {\n return this.name.split(\"#\")[1];\n }\n }\n return this.name || void 0;\n }\n /**\n * @returns the member name if the schema is a member schema.\n * @throws Error when the schema isn't a member schema.\n */\n getMemberName() {\n if (!this.isMemberSchema()) {\n throw new Error(`@smithy/core/schema - cannot get member name on non-member schema: ${this.getName(true)}`);\n }\n return this.memberName;\n }\n isMemberSchema() {\n return this._isMemberSchema;\n }\n isUnitSchema() {\n return this.getSchema() === \"unit\";\n }\n /**\n * boolean methods on this class help control flow in shape serialization and deserialization.\n */\n isListSchema() {\n const inner = this.getSchema();\n if (typeof inner === \"number\") {\n return inner >= SCHEMA.LIST_MODIFIER && inner < SCHEMA.MAP_MODIFIER;\n }\n return inner instanceof ListSchema;\n }\n isMapSchema() {\n const inner = this.getSchema();\n if (typeof inner === \"number\") {\n return inner >= SCHEMA.MAP_MODIFIER && inner <= 255;\n }\n return inner instanceof MapSchema;\n }\n isDocumentSchema() {\n return this.getSchema() === SCHEMA.DOCUMENT;\n }\n isStructSchema() {\n const inner = this.getSchema();\n return inner !== null && typeof inner === \"object\" && \"members\" in inner || inner instanceof StructureSchema;\n }\n isBlobSchema() {\n return this.getSchema() === SCHEMA.BLOB || this.getSchema() === SCHEMA.STREAMING_BLOB;\n }\n isTimestampSchema() {\n const schema = this.getSchema();\n return typeof schema === \"number\" && schema >= SCHEMA.TIMESTAMP_DEFAULT && schema <= SCHEMA.TIMESTAMP_EPOCH_SECONDS;\n }\n isStringSchema() {\n return this.getSchema() === SCHEMA.STRING;\n }\n isBooleanSchema() {\n return this.getSchema() === SCHEMA.BOOLEAN;\n }\n isNumericSchema() {\n return this.getSchema() === SCHEMA.NUMERIC;\n }\n isBigIntegerSchema() {\n return this.getSchema() === SCHEMA.BIG_INTEGER;\n }\n isBigDecimalSchema() {\n return this.getSchema() === SCHEMA.BIG_DECIMAL;\n }\n isStreaming() {\n const streaming = !!this.getMergedTraits().streaming;\n if (streaming) {\n return true;\n }\n return this.getSchema() === SCHEMA.STREAMING_BLOB;\n }\n /**\n * @returns own traits merged with member traits, where member traits of the same trait key take priority.\n * This method is cached.\n */\n getMergedTraits() {\n if (this.normalizedTraits) {\n return this.normalizedTraits;\n }\n this.normalizedTraits = {\n ...this.getOwnTraits(),\n ...this.getMemberTraits()\n };\n return this.normalizedTraits;\n }\n /**\n * @returns only the member traits. If the schema is not a member, this returns empty.\n */\n getMemberTraits() {\n return _NormalizedSchema.translateTraits(this.memberTraits);\n }\n /**\n * @returns only the traits inherent to the shape or member target shape if this schema is a member.\n * If there are any member traits they are excluded.\n */\n getOwnTraits() {\n return _NormalizedSchema.translateTraits(this.traits);\n }\n /**\n * @returns the map's key's schema. Returns a dummy Document schema if this schema is a Document.\n *\n * @throws Error if the schema is not a Map or Document.\n */\n getKeySchema() {\n if (this.isDocumentSchema()) {\n return _NormalizedSchema.memberFrom([SCHEMA.DOCUMENT, 0], \"key\");\n }\n if (!this.isMapSchema()) {\n throw new Error(`@smithy/core/schema - cannot get key schema for non-map schema: ${this.getName(true)}`);\n }\n const schema = this.getSchema();\n if (typeof schema === \"number\") {\n return _NormalizedSchema.memberFrom([63 & schema, 0], \"key\");\n }\n return _NormalizedSchema.memberFrom([schema.keySchema, 0], \"key\");\n }\n /**\n * @returns the schema of the map's value or list's member.\n * Returns a dummy Document schema if this schema is a Document.\n *\n * @throws Error if the schema is not a Map, List, nor Document.\n */\n getValueSchema() {\n const schema = this.getSchema();\n if (typeof schema === \"number\") {\n if (this.isMapSchema()) {\n return _NormalizedSchema.memberFrom([63 & schema, 0], \"value\");\n } else if (this.isListSchema()) {\n return _NormalizedSchema.memberFrom([63 & schema, 0], \"member\");\n }\n }\n if (schema && typeof schema === \"object\") {\n if (this.isStructSchema()) {\n throw new Error(`cannot call getValueSchema() with StructureSchema ${this.getName(true)}`);\n }\n const collection = schema;\n if (\"valueSchema\" in collection) {\n if (this.isMapSchema()) {\n return _NormalizedSchema.memberFrom([collection.valueSchema, 0], \"value\");\n } else if (this.isListSchema()) {\n return _NormalizedSchema.memberFrom([collection.valueSchema, 0], \"member\");\n }\n }\n }\n if (this.isDocumentSchema()) {\n return _NormalizedSchema.memberFrom([SCHEMA.DOCUMENT, 0], \"value\");\n }\n throw new Error(`@smithy/core/schema - the schema ${this.getName(true)} does not have a value member.`);\n }\n /**\n * @returns the NormalizedSchema for the given member name. The returned instance will return true for `isMemberSchema()`\n * and will have the member name given.\n * @param member - which member to retrieve and wrap.\n *\n * @throws Error if member does not exist or the schema is neither a document nor structure.\n * Note that errors are assumed to be structures and unions are considered structures for these purposes.\n */\n getMemberSchema(member) {\n if (this.isStructSchema()) {\n const struct2 = this.getSchema();\n if (!(member in struct2.members)) {\n throw new Error(\n `@smithy/core/schema - the schema ${this.getName(true)} does not have a member with name=${member}.`\n );\n }\n return _NormalizedSchema.memberFrom(struct2.members[member], member);\n }\n if (this.isDocumentSchema()) {\n return _NormalizedSchema.memberFrom([SCHEMA.DOCUMENT, 0], member);\n }\n throw new Error(`@smithy/core/schema - the schema ${this.getName(true)} does not have members.`);\n }\n /**\n * This can be used for checking the members as a hashmap.\n * Prefer the structIterator method for iteration.\n *\n * This does NOT return list and map members, it is only for structures.\n *\n * @returns a map of member names to member schemas (normalized).\n */\n getMemberSchemas() {\n const { schema } = this;\n const struct2 = schema;\n if (!struct2 || typeof struct2 !== \"object\") {\n return {};\n }\n if (\"members\" in struct2) {\n const buffer = {};\n for (const member of struct2.memberNames) {\n buffer[member] = this.getMemberSchema(member);\n }\n return buffer;\n }\n return {};\n }\n /**\n * Allows iteration over members of a structure schema.\n * Each yield is a pair of the member name and member schema.\n *\n * This avoids the overhead of calling Object.entries(ns.getMemberSchemas()).\n */\n *structIterator() {\n if (!this.isStructSchema()) {\n throw new Error(\"@smithy/core/schema - cannot acquire structIterator on non-struct schema.\");\n }\n const struct2 = this.getSchema();\n for (let i = 0; i < struct2.memberNames.length; ++i) {\n yield [struct2.memberNames[i], _NormalizedSchema.memberFrom([struct2.memberList[i], 0], struct2.memberNames[i])];\n }\n }\n /**\n * @returns a last-resort human-readable name for the schema if it has no other identifiers.\n */\n getSchemaName() {\n const schema = this.getSchema();\n if (typeof schema === \"number\") {\n const _schema = 63 & schema;\n const container = 192 & schema;\n const type = Object.entries(SCHEMA).find(([, value]) => {\n return value === _schema;\n })?.[0] ?? \"Unknown\";\n switch (container) {\n case SCHEMA.MAP_MODIFIER:\n return `${type}Map`;\n case SCHEMA.LIST_MODIFIER:\n return `${type}List`;\n case 0:\n return type;\n }\n }\n return \"Unknown\";\n }\n};\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n ErrorSchema,\n ListSchema,\n MapSchema,\n NormalizedSchema,\n OperationSchema,\n SCHEMA,\n Schema,\n SimpleSchema,\n StructureSchema,\n TypeRegistry,\n deref,\n deserializerMiddlewareOption,\n error,\n getSchemaSerdePlugin,\n list,\n map,\n op,\n serializerMiddlewareOption,\n sim,\n struct\n});\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/submodules/serde/index.ts\nvar serde_exports = {};\n__export(serde_exports, {\n LazyJsonString: () => LazyJsonString,\n NumericValue: () => NumericValue,\n copyDocumentWithTransform: () => copyDocumentWithTransform,\n dateToUtcString: () => dateToUtcString,\n expectBoolean: () => expectBoolean,\n expectByte: () => expectByte,\n expectFloat32: () => expectFloat32,\n expectInt: () => expectInt,\n expectInt32: () => expectInt32,\n expectLong: () => expectLong,\n expectNonNull: () => expectNonNull,\n expectNumber: () => expectNumber,\n expectObject: () => expectObject,\n expectShort: () => expectShort,\n expectString: () => expectString,\n expectUnion: () => expectUnion,\n handleFloat: () => handleFloat,\n limitedParseDouble: () => limitedParseDouble,\n limitedParseFloat: () => limitedParseFloat,\n limitedParseFloat32: () => limitedParseFloat32,\n logger: () => logger,\n nv: () => nv,\n parseBoolean: () => parseBoolean,\n parseEpochTimestamp: () => parseEpochTimestamp,\n parseRfc3339DateTime: () => parseRfc3339DateTime,\n parseRfc3339DateTimeWithOffset: () => parseRfc3339DateTimeWithOffset,\n parseRfc7231DateTime: () => parseRfc7231DateTime,\n quoteHeader: () => quoteHeader,\n splitEvery: () => splitEvery,\n splitHeader: () => splitHeader,\n strictParseByte: () => strictParseByte,\n strictParseDouble: () => strictParseDouble,\n strictParseFloat: () => strictParseFloat,\n strictParseFloat32: () => strictParseFloat32,\n strictParseInt: () => strictParseInt,\n strictParseInt32: () => strictParseInt32,\n strictParseLong: () => strictParseLong,\n strictParseShort: () => strictParseShort\n});\nmodule.exports = __toCommonJS(serde_exports);\n\n// src/submodules/serde/copyDocumentWithTransform.ts\nvar import_schema = require(\"@smithy/core/schema\");\nvar copyDocumentWithTransform = (source, schemaRef, transform = (_) => _) => {\n const ns = import_schema.NormalizedSchema.of(schemaRef);\n switch (typeof source) {\n case \"undefined\":\n case \"boolean\":\n case \"number\":\n case \"string\":\n case \"bigint\":\n case \"symbol\":\n return transform(source, ns);\n case \"function\":\n case \"object\":\n if (source === null) {\n return transform(null, ns);\n }\n if (Array.isArray(source)) {\n const newArray = new Array(source.length);\n let i = 0;\n for (const item of source) {\n newArray[i++] = copyDocumentWithTransform(item, ns.getValueSchema(), transform);\n }\n return transform(newArray, ns);\n }\n if (\"byteLength\" in source) {\n const newBytes = new Uint8Array(source.byteLength);\n newBytes.set(source, 0);\n return transform(newBytes, ns);\n }\n if (source instanceof Date) {\n return transform(source, ns);\n }\n const newObject = {};\n if (ns.isMapSchema()) {\n for (const key of Object.keys(source)) {\n newObject[key] = copyDocumentWithTransform(source[key], ns.getValueSchema(), transform);\n }\n } else if (ns.isStructSchema()) {\n for (const [key, memberSchema] of ns.structIterator()) {\n newObject[key] = copyDocumentWithTransform(source[key], memberSchema, transform);\n }\n } else if (ns.isDocumentSchema()) {\n for (const key of Object.keys(source)) {\n newObject[key] = copyDocumentWithTransform(source[key], ns.getValueSchema(), transform);\n }\n }\n return transform(newObject, ns);\n default:\n return transform(source, ns);\n }\n};\n\n// src/submodules/serde/parse-utils.ts\nvar parseBoolean = (value) => {\n switch (value) {\n case \"true\":\n return true;\n case \"false\":\n return false;\n default:\n throw new Error(`Unable to parse boolean value \"${value}\"`);\n }\n};\nvar expectBoolean = (value) => {\n if (value === null || value === void 0) {\n return void 0;\n }\n if (typeof value === \"number\") {\n if (value === 0 || value === 1) {\n logger.warn(stackTraceWarning(`Expected boolean, got ${typeof value}: ${value}`));\n }\n if (value === 0) {\n return false;\n }\n if (value === 1) {\n return true;\n }\n }\n if (typeof value === \"string\") {\n const lower = value.toLowerCase();\n if (lower === \"false\" || lower === \"true\") {\n logger.warn(stackTraceWarning(`Expected boolean, got ${typeof value}: ${value}`));\n }\n if (lower === \"false\") {\n return false;\n }\n if (lower === \"true\") {\n return true;\n }\n }\n if (typeof value === \"boolean\") {\n return value;\n }\n throw new TypeError(`Expected boolean, got ${typeof value}: ${value}`);\n};\nvar expectNumber = (value) => {\n if (value === null || value === void 0) {\n return void 0;\n }\n if (typeof value === \"string\") {\n const parsed = parseFloat(value);\n if (!Number.isNaN(parsed)) {\n if (String(parsed) !== String(value)) {\n logger.warn(stackTraceWarning(`Expected number but observed string: ${value}`));\n }\n return parsed;\n }\n }\n if (typeof value === \"number\") {\n return value;\n }\n throw new TypeError(`Expected number, got ${typeof value}: ${value}`);\n};\nvar MAX_FLOAT = Math.ceil(2 ** 127 * (2 - 2 ** -23));\nvar expectFloat32 = (value) => {\n const expected = expectNumber(value);\n if (expected !== void 0 && !Number.isNaN(expected) && expected !== Infinity && expected !== -Infinity) {\n if (Math.abs(expected) > MAX_FLOAT) {\n throw new TypeError(`Expected 32-bit float, got ${value}`);\n }\n }\n return expected;\n};\nvar expectLong = (value) => {\n if (value === null || value === void 0) {\n return void 0;\n }\n if (Number.isInteger(value) && !Number.isNaN(value)) {\n return value;\n }\n throw new TypeError(`Expected integer, got ${typeof value}: ${value}`);\n};\nvar expectInt = expectLong;\nvar expectInt32 = (value) => expectSizedInt(value, 32);\nvar expectShort = (value) => expectSizedInt(value, 16);\nvar expectByte = (value) => expectSizedInt(value, 8);\nvar expectSizedInt = (value, size) => {\n const expected = expectLong(value);\n if (expected !== void 0 && castInt(expected, size) !== expected) {\n throw new TypeError(`Expected ${size}-bit integer, got ${value}`);\n }\n return expected;\n};\nvar castInt = (value, size) => {\n switch (size) {\n case 32:\n return Int32Array.of(value)[0];\n case 16:\n return Int16Array.of(value)[0];\n case 8:\n return Int8Array.of(value)[0];\n }\n};\nvar expectNonNull = (value, location) => {\n if (value === null || value === void 0) {\n if (location) {\n throw new TypeError(`Expected a non-null value for ${location}`);\n }\n throw new TypeError(\"Expected a non-null value\");\n }\n return value;\n};\nvar expectObject = (value) => {\n if (value === null || value === void 0) {\n return void 0;\n }\n if (typeof value === \"object\" && !Array.isArray(value)) {\n return value;\n }\n const receivedType = Array.isArray(value) ? \"array\" : typeof value;\n throw new TypeError(`Expected object, got ${receivedType}: ${value}`);\n};\nvar expectString = (value) => {\n if (value === null || value === void 0) {\n return void 0;\n }\n if (typeof value === \"string\") {\n return value;\n }\n if ([\"boolean\", \"number\", \"bigint\"].includes(typeof value)) {\n logger.warn(stackTraceWarning(`Expected string, got ${typeof value}: ${value}`));\n return String(value);\n }\n throw new TypeError(`Expected string, got ${typeof value}: ${value}`);\n};\nvar expectUnion = (value) => {\n if (value === null || value === void 0) {\n return void 0;\n }\n const asObject = expectObject(value);\n const setKeys = Object.entries(asObject).filter(([, v]) => v != null).map(([k]) => k);\n if (setKeys.length === 0) {\n throw new TypeError(`Unions must have exactly one non-null member. None were found.`);\n }\n if (setKeys.length > 1) {\n throw new TypeError(`Unions must have exactly one non-null member. Keys ${setKeys} were not null.`);\n }\n return asObject;\n};\nvar strictParseDouble = (value) => {\n if (typeof value == \"string\") {\n return expectNumber(parseNumber(value));\n }\n return expectNumber(value);\n};\nvar strictParseFloat = strictParseDouble;\nvar strictParseFloat32 = (value) => {\n if (typeof value == \"string\") {\n return expectFloat32(parseNumber(value));\n }\n return expectFloat32(value);\n};\nvar NUMBER_REGEX = /(-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)|(-?Infinity)|(NaN)/g;\nvar parseNumber = (value) => {\n const matches = value.match(NUMBER_REGEX);\n if (matches === null || matches[0].length !== value.length) {\n throw new TypeError(`Expected real number, got implicit NaN`);\n }\n return parseFloat(value);\n};\nvar limitedParseDouble = (value) => {\n if (typeof value == \"string\") {\n return parseFloatString(value);\n }\n return expectNumber(value);\n};\nvar handleFloat = limitedParseDouble;\nvar limitedParseFloat = limitedParseDouble;\nvar limitedParseFloat32 = (value) => {\n if (typeof value == \"string\") {\n return parseFloatString(value);\n }\n return expectFloat32(value);\n};\nvar parseFloatString = (value) => {\n switch (value) {\n case \"NaN\":\n return NaN;\n case \"Infinity\":\n return Infinity;\n case \"-Infinity\":\n return -Infinity;\n default:\n throw new Error(`Unable to parse float value: ${value}`);\n }\n};\nvar strictParseLong = (value) => {\n if (typeof value === \"string\") {\n return expectLong(parseNumber(value));\n }\n return expectLong(value);\n};\nvar strictParseInt = strictParseLong;\nvar strictParseInt32 = (value) => {\n if (typeof value === \"string\") {\n return expectInt32(parseNumber(value));\n }\n return expectInt32(value);\n};\nvar strictParseShort = (value) => {\n if (typeof value === \"string\") {\n return expectShort(parseNumber(value));\n }\n return expectShort(value);\n};\nvar strictParseByte = (value) => {\n if (typeof value === \"string\") {\n return expectByte(parseNumber(value));\n }\n return expectByte(value);\n};\nvar stackTraceWarning = (message) => {\n return String(new TypeError(message).stack || message).split(\"\\n\").slice(0, 5).filter((s) => !s.includes(\"stackTraceWarning\")).join(\"\\n\");\n};\nvar logger = {\n warn: console.warn\n};\n\n// src/submodules/serde/date-utils.ts\nvar DAYS = [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"];\nvar MONTHS = [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"];\nfunction dateToUtcString(date) {\n const year = date.getUTCFullYear();\n const month = date.getUTCMonth();\n const dayOfWeek = date.getUTCDay();\n const dayOfMonthInt = date.getUTCDate();\n const hoursInt = date.getUTCHours();\n const minutesInt = date.getUTCMinutes();\n const secondsInt = date.getUTCSeconds();\n const dayOfMonthString = dayOfMonthInt < 10 ? `0${dayOfMonthInt}` : `${dayOfMonthInt}`;\n const hoursString = hoursInt < 10 ? `0${hoursInt}` : `${hoursInt}`;\n const minutesString = minutesInt < 10 ? `0${minutesInt}` : `${minutesInt}`;\n const secondsString = secondsInt < 10 ? `0${secondsInt}` : `${secondsInt}`;\n return `${DAYS[dayOfWeek]}, ${dayOfMonthString} ${MONTHS[month]} ${year} ${hoursString}:${minutesString}:${secondsString} GMT`;\n}\nvar RFC3339 = new RegExp(/^(\\d{4})-(\\d{2})-(\\d{2})[tT](\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d+))?[zZ]$/);\nvar parseRfc3339DateTime = (value) => {\n if (value === null || value === void 0) {\n return void 0;\n }\n if (typeof value !== \"string\") {\n throw new TypeError(\"RFC-3339 date-times must be expressed as strings\");\n }\n const match = RFC3339.exec(value);\n if (!match) {\n throw new TypeError(\"Invalid RFC-3339 date-time value\");\n }\n const [_, yearStr, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds] = match;\n const year = strictParseShort(stripLeadingZeroes(yearStr));\n const month = parseDateValue(monthStr, \"month\", 1, 12);\n const day = parseDateValue(dayStr, \"day\", 1, 31);\n return buildDate(year, month, day, { hours, minutes, seconds, fractionalMilliseconds });\n};\nvar RFC3339_WITH_OFFSET = new RegExp(\n /^(\\d{4})-(\\d{2})-(\\d{2})[tT](\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d+))?(([-+]\\d{2}\\:\\d{2})|[zZ])$/\n);\nvar parseRfc3339DateTimeWithOffset = (value) => {\n if (value === null || value === void 0) {\n return void 0;\n }\n if (typeof value !== \"string\") {\n throw new TypeError(\"RFC-3339 date-times must be expressed as strings\");\n }\n const match = RFC3339_WITH_OFFSET.exec(value);\n if (!match) {\n throw new TypeError(\"Invalid RFC-3339 date-time value\");\n }\n const [_, yearStr, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds, offsetStr] = match;\n const year = strictParseShort(stripLeadingZeroes(yearStr));\n const month = parseDateValue(monthStr, \"month\", 1, 12);\n const day = parseDateValue(dayStr, \"day\", 1, 31);\n const date = buildDate(year, month, day, { hours, minutes, seconds, fractionalMilliseconds });\n if (offsetStr.toUpperCase() != \"Z\") {\n date.setTime(date.getTime() - parseOffsetToMilliseconds(offsetStr));\n }\n return date;\n};\nvar IMF_FIXDATE = new RegExp(\n /^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\\d{4}) (\\d{1,2}):(\\d{2}):(\\d{2})(?:\\.(\\d+))? GMT$/\n);\nvar RFC_850_DATE = new RegExp(\n /^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\\d{2}) (\\d{1,2}):(\\d{2}):(\\d{2})(?:\\.(\\d+))? GMT$/\n);\nvar ASC_TIME = new RegExp(\n /^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\\d{2}) (\\d{1,2}):(\\d{2}):(\\d{2})(?:\\.(\\d+))? (\\d{4})$/\n);\nvar parseRfc7231DateTime = (value) => {\n if (value === null || value === void 0) {\n return void 0;\n }\n if (typeof value !== \"string\") {\n throw new TypeError(\"RFC-7231 date-times must be expressed as strings\");\n }\n let match = IMF_FIXDATE.exec(value);\n if (match) {\n const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match;\n return buildDate(\n strictParseShort(stripLeadingZeroes(yearStr)),\n parseMonthByShortName(monthStr),\n parseDateValue(dayStr, \"day\", 1, 31),\n { hours, minutes, seconds, fractionalMilliseconds }\n );\n }\n match = RFC_850_DATE.exec(value);\n if (match) {\n const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match;\n return adjustRfc850Year(\n buildDate(parseTwoDigitYear(yearStr), parseMonthByShortName(monthStr), parseDateValue(dayStr, \"day\", 1, 31), {\n hours,\n minutes,\n seconds,\n fractionalMilliseconds\n })\n );\n }\n match = ASC_TIME.exec(value);\n if (match) {\n const [_, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds, yearStr] = match;\n return buildDate(\n strictParseShort(stripLeadingZeroes(yearStr)),\n parseMonthByShortName(monthStr),\n parseDateValue(dayStr.trimLeft(), \"day\", 1, 31),\n { hours, minutes, seconds, fractionalMilliseconds }\n );\n }\n throw new TypeError(\"Invalid RFC-7231 date-time value\");\n};\nvar parseEpochTimestamp = (value) => {\n if (value === null || value === void 0) {\n return void 0;\n }\n let valueAsDouble;\n if (typeof value === \"number\") {\n valueAsDouble = value;\n } else if (typeof value === \"string\") {\n valueAsDouble = strictParseDouble(value);\n } else if (typeof value === \"object\" && value.tag === 1) {\n valueAsDouble = value.value;\n } else {\n throw new TypeError(\"Epoch timestamps must be expressed as floating point numbers or their string representation\");\n }\n if (Number.isNaN(valueAsDouble) || valueAsDouble === Infinity || valueAsDouble === -Infinity) {\n throw new TypeError(\"Epoch timestamps must be valid, non-Infinite, non-NaN numerics\");\n }\n return new Date(Math.round(valueAsDouble * 1e3));\n};\nvar buildDate = (year, month, day, time) => {\n const adjustedMonth = month - 1;\n validateDayOfMonth(year, adjustedMonth, day);\n return new Date(\n Date.UTC(\n year,\n adjustedMonth,\n day,\n parseDateValue(time.hours, \"hour\", 0, 23),\n parseDateValue(time.minutes, \"minute\", 0, 59),\n // seconds can go up to 60 for leap seconds\n parseDateValue(time.seconds, \"seconds\", 0, 60),\n parseMilliseconds(time.fractionalMilliseconds)\n )\n );\n};\nvar parseTwoDigitYear = (value) => {\n const thisYear = (/* @__PURE__ */ new Date()).getUTCFullYear();\n const valueInThisCentury = Math.floor(thisYear / 100) * 100 + strictParseShort(stripLeadingZeroes(value));\n if (valueInThisCentury < thisYear) {\n return valueInThisCentury + 100;\n }\n return valueInThisCentury;\n};\nvar FIFTY_YEARS_IN_MILLIS = 50 * 365 * 24 * 60 * 60 * 1e3;\nvar adjustRfc850Year = (input) => {\n if (input.getTime() - (/* @__PURE__ */ new Date()).getTime() > FIFTY_YEARS_IN_MILLIS) {\n return new Date(\n Date.UTC(\n input.getUTCFullYear() - 100,\n input.getUTCMonth(),\n input.getUTCDate(),\n input.getUTCHours(),\n input.getUTCMinutes(),\n input.getUTCSeconds(),\n input.getUTCMilliseconds()\n )\n );\n }\n return input;\n};\nvar parseMonthByShortName = (value) => {\n const monthIdx = MONTHS.indexOf(value);\n if (monthIdx < 0) {\n throw new TypeError(`Invalid month: ${value}`);\n }\n return monthIdx + 1;\n};\nvar DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\nvar validateDayOfMonth = (year, month, day) => {\n let maxDays = DAYS_IN_MONTH[month];\n if (month === 1 && isLeapYear(year)) {\n maxDays = 29;\n }\n if (day > maxDays) {\n throw new TypeError(`Invalid day for ${MONTHS[month]} in ${year}: ${day}`);\n }\n};\nvar isLeapYear = (year) => {\n return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);\n};\nvar parseDateValue = (value, type, lower, upper) => {\n const dateVal = strictParseByte(stripLeadingZeroes(value));\n if (dateVal < lower || dateVal > upper) {\n throw new TypeError(`${type} must be between ${lower} and ${upper}, inclusive`);\n }\n return dateVal;\n};\nvar parseMilliseconds = (value) => {\n if (value === null || value === void 0) {\n return 0;\n }\n return strictParseFloat32(\"0.\" + value) * 1e3;\n};\nvar parseOffsetToMilliseconds = (value) => {\n const directionStr = value[0];\n let direction = 1;\n if (directionStr == \"+\") {\n direction = 1;\n } else if (directionStr == \"-\") {\n direction = -1;\n } else {\n throw new TypeError(`Offset direction, ${directionStr}, must be \"+\" or \"-\"`);\n }\n const hour = Number(value.substring(1, 3));\n const minute = Number(value.substring(4, 6));\n return direction * (hour * 60 + minute) * 60 * 1e3;\n};\nvar stripLeadingZeroes = (value) => {\n let idx = 0;\n while (idx < value.length - 1 && value.charAt(idx) === \"0\") {\n idx++;\n }\n if (idx === 0) {\n return value;\n }\n return value.slice(idx);\n};\n\n// src/submodules/serde/lazy-json.ts\nvar LazyJsonString = function LazyJsonString2(val) {\n const str = Object.assign(new String(val), {\n deserializeJSON() {\n return JSON.parse(String(val));\n },\n toString() {\n return String(val);\n },\n toJSON() {\n return String(val);\n }\n });\n return str;\n};\nLazyJsonString.from = (object) => {\n if (object && typeof object === \"object\" && (object instanceof LazyJsonString || \"deserializeJSON\" in object)) {\n return object;\n } else if (typeof object === \"string\" || Object.getPrototypeOf(object) === String.prototype) {\n return LazyJsonString(String(object));\n }\n return LazyJsonString(JSON.stringify(object));\n};\nLazyJsonString.fromObject = LazyJsonString.from;\n\n// src/submodules/serde/quote-header.ts\nfunction quoteHeader(part) {\n if (part.includes(\",\") || part.includes('\"')) {\n part = `\"${part.replace(/\"/g, '\\\\\"')}\"`;\n }\n return part;\n}\n\n// src/submodules/serde/split-every.ts\nfunction splitEvery(value, delimiter, numDelimiters) {\n if (numDelimiters <= 0 || !Number.isInteger(numDelimiters)) {\n throw new Error(\"Invalid number of delimiters (\" + numDelimiters + \") for splitEvery.\");\n }\n const segments = value.split(delimiter);\n if (numDelimiters === 1) {\n return segments;\n }\n const compoundSegments = [];\n let currentSegment = \"\";\n for (let i = 0; i < segments.length; i++) {\n if (currentSegment === \"\") {\n currentSegment = segments[i];\n } else {\n currentSegment += delimiter + segments[i];\n }\n if ((i + 1) % numDelimiters === 0) {\n compoundSegments.push(currentSegment);\n currentSegment = \"\";\n }\n }\n if (currentSegment !== \"\") {\n compoundSegments.push(currentSegment);\n }\n return compoundSegments;\n}\n\n// src/submodules/serde/split-header.ts\nvar splitHeader = (value) => {\n const z = value.length;\n const values = [];\n let withinQuotes = false;\n let prevChar = void 0;\n let anchor = 0;\n for (let i = 0; i < z; ++i) {\n const char = value[i];\n switch (char) {\n case `\"`:\n if (prevChar !== \"\\\\\") {\n withinQuotes = !withinQuotes;\n }\n break;\n case \",\":\n if (!withinQuotes) {\n values.push(value.slice(anchor, i));\n anchor = i + 1;\n }\n break;\n default:\n }\n prevChar = char;\n }\n values.push(value.slice(anchor));\n return values.map((v) => {\n v = v.trim();\n const z2 = v.length;\n if (z2 < 2) {\n return v;\n }\n if (v[0] === `\"` && v[z2 - 1] === `\"`) {\n v = v.slice(1, z2 - 1);\n }\n return v.replace(/\\\\\"/g, '\"');\n });\n};\n\n// src/submodules/serde/value/NumericValue.ts\nvar NumericValue = class {\n constructor(string, type) {\n this.string = string;\n this.type = type;\n }\n};\nfunction nv(string) {\n return new NumericValue(string, \"bigDecimal\");\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n LazyJsonString,\n NumericValue,\n copyDocumentWithTransform,\n dateToUtcString,\n expectBoolean,\n expectByte,\n expectFloat32,\n expectInt,\n expectInt32,\n expectLong,\n expectNonNull,\n expectNumber,\n expectObject,\n expectShort,\n expectString,\n expectUnion,\n handleFloat,\n limitedParseDouble,\n limitedParseFloat,\n limitedParseFloat32,\n logger,\n nv,\n parseBoolean,\n parseEpochTimestamp,\n parseRfc3339DateTime,\n parseRfc3339DateTimeWithOffset,\n parseRfc7231DateTime,\n quoteHeader,\n splitEvery,\n splitHeader,\n strictParseByte,\n strictParseDouble,\n strictParseFloat,\n strictParseFloat32,\n strictParseInt,\n strictParseInt32,\n strictParseLong,\n strictParseShort\n});\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n AlgorithmId: () => AlgorithmId,\n EndpointURLScheme: () => EndpointURLScheme,\n FieldPosition: () => FieldPosition,\n HttpApiKeyAuthLocation: () => HttpApiKeyAuthLocation,\n HttpAuthLocation: () => HttpAuthLocation,\n IniSectionType: () => IniSectionType,\n RequestHandlerProtocol: () => RequestHandlerProtocol,\n SMITHY_CONTEXT_KEY: () => SMITHY_CONTEXT_KEY,\n getDefaultClientConfiguration: () => getDefaultClientConfiguration,\n resolveDefaultRuntimeConfig: () => resolveDefaultRuntimeConfig\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/auth/auth.ts\nvar HttpAuthLocation = /* @__PURE__ */ ((HttpAuthLocation2) => {\n HttpAuthLocation2[\"HEADER\"] = \"header\";\n HttpAuthLocation2[\"QUERY\"] = \"query\";\n return HttpAuthLocation2;\n})(HttpAuthLocation || {});\n\n// src/auth/HttpApiKeyAuth.ts\nvar HttpApiKeyAuthLocation = /* @__PURE__ */ ((HttpApiKeyAuthLocation2) => {\n HttpApiKeyAuthLocation2[\"HEADER\"] = \"header\";\n HttpApiKeyAuthLocation2[\"QUERY\"] = \"query\";\n return HttpApiKeyAuthLocation2;\n})(HttpApiKeyAuthLocation || {});\n\n// src/endpoint.ts\nvar EndpointURLScheme = /* @__PURE__ */ ((EndpointURLScheme2) => {\n EndpointURLScheme2[\"HTTP\"] = \"http\";\n EndpointURLScheme2[\"HTTPS\"] = \"https\";\n return EndpointURLScheme2;\n})(EndpointURLScheme || {});\n\n// src/extensions/checksum.ts\nvar AlgorithmId = /* @__PURE__ */ ((AlgorithmId2) => {\n AlgorithmId2[\"MD5\"] = \"md5\";\n AlgorithmId2[\"CRC32\"] = \"crc32\";\n AlgorithmId2[\"CRC32C\"] = \"crc32c\";\n AlgorithmId2[\"SHA1\"] = \"sha1\";\n AlgorithmId2[\"SHA256\"] = \"sha256\";\n return AlgorithmId2;\n})(AlgorithmId || {});\nvar getChecksumConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {\n const checksumAlgorithms = [];\n if (runtimeConfig.sha256 !== void 0) {\n checksumAlgorithms.push({\n algorithmId: () => \"sha256\" /* SHA256 */,\n checksumConstructor: () => runtimeConfig.sha256\n });\n }\n if (runtimeConfig.md5 != void 0) {\n checksumAlgorithms.push({\n algorithmId: () => \"md5\" /* MD5 */,\n checksumConstructor: () => runtimeConfig.md5\n });\n }\n return {\n addChecksumAlgorithm(algo) {\n checksumAlgorithms.push(algo);\n },\n checksumAlgorithms() {\n return checksumAlgorithms;\n }\n };\n}, \"getChecksumConfiguration\");\nvar resolveChecksumRuntimeConfig = /* @__PURE__ */ __name((clientConfig) => {\n const runtimeConfig = {};\n clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => {\n runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor();\n });\n return runtimeConfig;\n}, \"resolveChecksumRuntimeConfig\");\n\n// src/extensions/defaultClientConfiguration.ts\nvar getDefaultClientConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {\n return getChecksumConfiguration(runtimeConfig);\n}, \"getDefaultClientConfiguration\");\nvar resolveDefaultRuntimeConfig = /* @__PURE__ */ __name((config) => {\n return resolveChecksumRuntimeConfig(config);\n}, \"resolveDefaultRuntimeConfig\");\n\n// src/http.ts\nvar FieldPosition = /* @__PURE__ */ ((FieldPosition2) => {\n FieldPosition2[FieldPosition2[\"HEADER\"] = 0] = \"HEADER\";\n FieldPosition2[FieldPosition2[\"TRAILER\"] = 1] = \"TRAILER\";\n return FieldPosition2;\n})(FieldPosition || {});\n\n// src/middleware.ts\nvar SMITHY_CONTEXT_KEY = \"__smithy_context\";\n\n// src/profile.ts\nvar IniSectionType = /* @__PURE__ */ ((IniSectionType2) => {\n IniSectionType2[\"PROFILE\"] = \"profile\";\n IniSectionType2[\"SSO_SESSION\"] = \"sso-session\";\n IniSectionType2[\"SERVICES\"] = \"services\";\n return IniSectionType2;\n})(IniSectionType || {});\n\n// src/transfer.ts\nvar RequestHandlerProtocol = /* @__PURE__ */ ((RequestHandlerProtocol2) => {\n RequestHandlerProtocol2[\"HTTP_0_9\"] = \"http/0.9\";\n RequestHandlerProtocol2[\"HTTP_1_0\"] = \"http/1.0\";\n RequestHandlerProtocol2[\"TDS_8_0\"] = \"tds/8.0\";\n return RequestHandlerProtocol2;\n})(RequestHandlerProtocol || {});\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n HttpAuthLocation,\n HttpApiKeyAuthLocation,\n EndpointURLScheme,\n AlgorithmId,\n getDefaultClientConfiguration,\n resolveDefaultRuntimeConfig,\n FieldPosition,\n SMITHY_CONTEXT_KEY,\n IniSectionType,\n RequestHandlerProtocol\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n DEFAULT_MAX_RETRIES: () => DEFAULT_MAX_RETRIES,\n DEFAULT_TIMEOUT: () => DEFAULT_TIMEOUT,\n ENV_CMDS_AUTH_TOKEN: () => ENV_CMDS_AUTH_TOKEN,\n ENV_CMDS_FULL_URI: () => ENV_CMDS_FULL_URI,\n ENV_CMDS_RELATIVE_URI: () => ENV_CMDS_RELATIVE_URI,\n Endpoint: () => Endpoint,\n fromContainerMetadata: () => fromContainerMetadata,\n fromInstanceMetadata: () => fromInstanceMetadata,\n getInstanceMetadataEndpoint: () => getInstanceMetadataEndpoint,\n httpRequest: () => httpRequest,\n providerConfigFromInit: () => providerConfigFromInit\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/fromContainerMetadata.ts\n\nvar import_url = require(\"url\");\n\n// src/remoteProvider/httpRequest.ts\nvar import_property_provider = require(\"@smithy/property-provider\");\nvar import_buffer = require(\"buffer\");\nvar import_http = require(\"http\");\nfunction httpRequest(options) {\n return new Promise((resolve, reject) => {\n const req = (0, import_http.request)({\n method: \"GET\",\n ...options,\n // Node.js http module doesn't accept hostname with square brackets\n // Refs: https://github.com/nodejs/node/issues/39738\n hostname: options.hostname?.replace(/^\\[(.+)\\]$/, \"$1\")\n });\n req.on(\"error\", (err) => {\n reject(Object.assign(new import_property_provider.ProviderError(\"Unable to connect to instance metadata service\"), err));\n req.destroy();\n });\n req.on(\"timeout\", () => {\n reject(new import_property_provider.ProviderError(\"TimeoutError from instance metadata service\"));\n req.destroy();\n });\n req.on(\"response\", (res) => {\n const { statusCode = 400 } = res;\n if (statusCode < 200 || 300 <= statusCode) {\n reject(\n Object.assign(new import_property_provider.ProviderError(\"Error response received from instance metadata service\"), { statusCode })\n );\n req.destroy();\n }\n const chunks = [];\n res.on(\"data\", (chunk) => {\n chunks.push(chunk);\n });\n res.on(\"end\", () => {\n resolve(import_buffer.Buffer.concat(chunks));\n req.destroy();\n });\n });\n req.end();\n });\n}\n__name(httpRequest, \"httpRequest\");\n\n// src/remoteProvider/ImdsCredentials.ts\nvar isImdsCredentials = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === \"object\" && typeof arg.AccessKeyId === \"string\" && typeof arg.SecretAccessKey === \"string\" && typeof arg.Token === \"string\" && typeof arg.Expiration === \"string\", \"isImdsCredentials\");\nvar fromImdsCredentials = /* @__PURE__ */ __name((creds) => ({\n accessKeyId: creds.AccessKeyId,\n secretAccessKey: creds.SecretAccessKey,\n sessionToken: creds.Token,\n expiration: new Date(creds.Expiration),\n ...creds.AccountId && { accountId: creds.AccountId }\n}), \"fromImdsCredentials\");\n\n// src/remoteProvider/RemoteProviderInit.ts\nvar DEFAULT_TIMEOUT = 1e3;\nvar DEFAULT_MAX_RETRIES = 0;\nvar providerConfigFromInit = /* @__PURE__ */ __name(({\n maxRetries = DEFAULT_MAX_RETRIES,\n timeout = DEFAULT_TIMEOUT\n}) => ({ maxRetries, timeout }), \"providerConfigFromInit\");\n\n// src/remoteProvider/retry.ts\nvar retry = /* @__PURE__ */ __name((toRetry, maxRetries) => {\n let promise = toRetry();\n for (let i = 0; i < maxRetries; i++) {\n promise = promise.catch(toRetry);\n }\n return promise;\n}, \"retry\");\n\n// src/fromContainerMetadata.ts\nvar ENV_CMDS_FULL_URI = \"AWS_CONTAINER_CREDENTIALS_FULL_URI\";\nvar ENV_CMDS_RELATIVE_URI = \"AWS_CONTAINER_CREDENTIALS_RELATIVE_URI\";\nvar ENV_CMDS_AUTH_TOKEN = \"AWS_CONTAINER_AUTHORIZATION_TOKEN\";\nvar fromContainerMetadata = /* @__PURE__ */ __name((init = {}) => {\n const { timeout, maxRetries } = providerConfigFromInit(init);\n return () => retry(async () => {\n const requestOptions = await getCmdsUri({ logger: init.logger });\n const credsResponse = JSON.parse(await requestFromEcsImds(timeout, requestOptions));\n if (!isImdsCredentials(credsResponse)) {\n throw new import_property_provider.CredentialsProviderError(\"Invalid response received from instance metadata service.\", {\n logger: init.logger\n });\n }\n return fromImdsCredentials(credsResponse);\n }, maxRetries);\n}, \"fromContainerMetadata\");\nvar requestFromEcsImds = /* @__PURE__ */ __name(async (timeout, options) => {\n if (process.env[ENV_CMDS_AUTH_TOKEN]) {\n options.headers = {\n ...options.headers,\n Authorization: process.env[ENV_CMDS_AUTH_TOKEN]\n };\n }\n const buffer = await httpRequest({\n ...options,\n timeout\n });\n return buffer.toString();\n}, \"requestFromEcsImds\");\nvar CMDS_IP = \"169.254.170.2\";\nvar GREENGRASS_HOSTS = {\n localhost: true,\n \"127.0.0.1\": true\n};\nvar GREENGRASS_PROTOCOLS = {\n \"http:\": true,\n \"https:\": true\n};\nvar getCmdsUri = /* @__PURE__ */ __name(async ({ logger }) => {\n if (process.env[ENV_CMDS_RELATIVE_URI]) {\n return {\n hostname: CMDS_IP,\n path: process.env[ENV_CMDS_RELATIVE_URI]\n };\n }\n if (process.env[ENV_CMDS_FULL_URI]) {\n const parsed = (0, import_url.parse)(process.env[ENV_CMDS_FULL_URI]);\n if (!parsed.hostname || !(parsed.hostname in GREENGRASS_HOSTS)) {\n throw new import_property_provider.CredentialsProviderError(`${parsed.hostname} is not a valid container metadata service hostname`, {\n tryNextLink: false,\n logger\n });\n }\n if (!parsed.protocol || !(parsed.protocol in GREENGRASS_PROTOCOLS)) {\n throw new import_property_provider.CredentialsProviderError(`${parsed.protocol} is not a valid container metadata service protocol`, {\n tryNextLink: false,\n logger\n });\n }\n return {\n ...parsed,\n port: parsed.port ? parseInt(parsed.port, 10) : void 0\n };\n }\n throw new import_property_provider.CredentialsProviderError(\n `The container metadata credential provider cannot be used unless the ${ENV_CMDS_RELATIVE_URI} or ${ENV_CMDS_FULL_URI} environment variable is set`,\n {\n tryNextLink: false,\n logger\n }\n );\n}, \"getCmdsUri\");\n\n// src/fromInstanceMetadata.ts\n\n\n\n// src/error/InstanceMetadataV1FallbackError.ts\n\nvar InstanceMetadataV1FallbackError = class _InstanceMetadataV1FallbackError extends import_property_provider.CredentialsProviderError {\n constructor(message, tryNextLink = true) {\n super(message, tryNextLink);\n this.tryNextLink = tryNextLink;\n this.name = \"InstanceMetadataV1FallbackError\";\n Object.setPrototypeOf(this, _InstanceMetadataV1FallbackError.prototype);\n }\n static {\n __name(this, \"InstanceMetadataV1FallbackError\");\n }\n};\n\n// src/utils/getInstanceMetadataEndpoint.ts\nvar import_node_config_provider = require(\"@smithy/node-config-provider\");\nvar import_url_parser = require(\"@smithy/url-parser\");\n\n// src/config/Endpoint.ts\nvar Endpoint = /* @__PURE__ */ ((Endpoint2) => {\n Endpoint2[\"IPv4\"] = \"http://169.254.169.254\";\n Endpoint2[\"IPv6\"] = \"http://[fd00:ec2::254]\";\n return Endpoint2;\n})(Endpoint || {});\n\n// src/config/EndpointConfigOptions.ts\nvar ENV_ENDPOINT_NAME = \"AWS_EC2_METADATA_SERVICE_ENDPOINT\";\nvar CONFIG_ENDPOINT_NAME = \"ec2_metadata_service_endpoint\";\nvar ENDPOINT_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => env[ENV_ENDPOINT_NAME],\n configFileSelector: (profile) => profile[CONFIG_ENDPOINT_NAME],\n default: void 0\n};\n\n// src/config/EndpointMode.ts\nvar EndpointMode = /* @__PURE__ */ ((EndpointMode2) => {\n EndpointMode2[\"IPv4\"] = \"IPv4\";\n EndpointMode2[\"IPv6\"] = \"IPv6\";\n return EndpointMode2;\n})(EndpointMode || {});\n\n// src/config/EndpointModeConfigOptions.ts\nvar ENV_ENDPOINT_MODE_NAME = \"AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE\";\nvar CONFIG_ENDPOINT_MODE_NAME = \"ec2_metadata_service_endpoint_mode\";\nvar ENDPOINT_MODE_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => env[ENV_ENDPOINT_MODE_NAME],\n configFileSelector: (profile) => profile[CONFIG_ENDPOINT_MODE_NAME],\n default: \"IPv4\" /* IPv4 */\n};\n\n// src/utils/getInstanceMetadataEndpoint.ts\nvar getInstanceMetadataEndpoint = /* @__PURE__ */ __name(async () => (0, import_url_parser.parseUrl)(await getFromEndpointConfig() || await getFromEndpointModeConfig()), \"getInstanceMetadataEndpoint\");\nvar getFromEndpointConfig = /* @__PURE__ */ __name(async () => (0, import_node_config_provider.loadConfig)(ENDPOINT_CONFIG_OPTIONS)(), \"getFromEndpointConfig\");\nvar getFromEndpointModeConfig = /* @__PURE__ */ __name(async () => {\n const endpointMode = await (0, import_node_config_provider.loadConfig)(ENDPOINT_MODE_CONFIG_OPTIONS)();\n switch (endpointMode) {\n case \"IPv4\" /* IPv4 */:\n return \"http://169.254.169.254\" /* IPv4 */;\n case \"IPv6\" /* IPv6 */:\n return \"http://[fd00:ec2::254]\" /* IPv6 */;\n default:\n throw new Error(`Unsupported endpoint mode: ${endpointMode}. Select from ${Object.values(EndpointMode)}`);\n }\n}, \"getFromEndpointModeConfig\");\n\n// src/utils/getExtendedInstanceMetadataCredentials.ts\nvar STATIC_STABILITY_REFRESH_INTERVAL_SECONDS = 5 * 60;\nvar STATIC_STABILITY_REFRESH_INTERVAL_JITTER_WINDOW_SECONDS = 5 * 60;\nvar STATIC_STABILITY_DOC_URL = \"https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html\";\nvar getExtendedInstanceMetadataCredentials = /* @__PURE__ */ __name((credentials, logger) => {\n const refreshInterval = STATIC_STABILITY_REFRESH_INTERVAL_SECONDS + Math.floor(Math.random() * STATIC_STABILITY_REFRESH_INTERVAL_JITTER_WINDOW_SECONDS);\n const newExpiration = new Date(Date.now() + refreshInterval * 1e3);\n logger.warn(\n `Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(newExpiration)}.\nFor more information, please visit: ` + STATIC_STABILITY_DOC_URL\n );\n const originalExpiration = credentials.originalExpiration ?? credentials.expiration;\n return {\n ...credentials,\n ...originalExpiration ? { originalExpiration } : {},\n expiration: newExpiration\n };\n}, \"getExtendedInstanceMetadataCredentials\");\n\n// src/utils/staticStabilityProvider.ts\nvar staticStabilityProvider = /* @__PURE__ */ __name((provider, options = {}) => {\n const logger = options?.logger || console;\n let pastCredentials;\n return async () => {\n let credentials;\n try {\n credentials = await provider();\n if (credentials.expiration && credentials.expiration.getTime() < Date.now()) {\n credentials = getExtendedInstanceMetadataCredentials(credentials, logger);\n }\n } catch (e) {\n if (pastCredentials) {\n logger.warn(\"Credential renew failed: \", e);\n credentials = getExtendedInstanceMetadataCredentials(pastCredentials, logger);\n } else {\n throw e;\n }\n }\n pastCredentials = credentials;\n return credentials;\n };\n}, \"staticStabilityProvider\");\n\n// src/fromInstanceMetadata.ts\nvar IMDS_PATH = \"/latest/meta-data/iam/security-credentials/\";\nvar IMDS_TOKEN_PATH = \"/latest/api/token\";\nvar AWS_EC2_METADATA_V1_DISABLED = \"AWS_EC2_METADATA_V1_DISABLED\";\nvar PROFILE_AWS_EC2_METADATA_V1_DISABLED = \"ec2_metadata_v1_disabled\";\nvar X_AWS_EC2_METADATA_TOKEN = \"x-aws-ec2-metadata-token\";\nvar fromInstanceMetadata = /* @__PURE__ */ __name((init = {}) => staticStabilityProvider(getInstanceMetadataProvider(init), { logger: init.logger }), \"fromInstanceMetadata\");\nvar getInstanceMetadataProvider = /* @__PURE__ */ __name((init = {}) => {\n let disableFetchToken = false;\n const { logger, profile } = init;\n const { timeout, maxRetries } = providerConfigFromInit(init);\n const getCredentials = /* @__PURE__ */ __name(async (maxRetries2, options) => {\n const isImdsV1Fallback = disableFetchToken || options.headers?.[X_AWS_EC2_METADATA_TOKEN] == null;\n if (isImdsV1Fallback) {\n let fallbackBlockedFromProfile = false;\n let fallbackBlockedFromProcessEnv = false;\n const configValue = await (0, import_node_config_provider.loadConfig)(\n {\n environmentVariableSelector: (env) => {\n const envValue = env[AWS_EC2_METADATA_V1_DISABLED];\n fallbackBlockedFromProcessEnv = !!envValue && envValue !== \"false\";\n if (envValue === void 0) {\n throw new import_property_provider.CredentialsProviderError(\n `${AWS_EC2_METADATA_V1_DISABLED} not set in env, checking config file next.`,\n { logger: init.logger }\n );\n }\n return fallbackBlockedFromProcessEnv;\n },\n configFileSelector: (profile2) => {\n const profileValue = profile2[PROFILE_AWS_EC2_METADATA_V1_DISABLED];\n fallbackBlockedFromProfile = !!profileValue && profileValue !== \"false\";\n return fallbackBlockedFromProfile;\n },\n default: false\n },\n {\n profile\n }\n )();\n if (init.ec2MetadataV1Disabled || configValue) {\n const causes = [];\n if (init.ec2MetadataV1Disabled)\n causes.push(\"credential provider initialization (runtime option ec2MetadataV1Disabled)\");\n if (fallbackBlockedFromProfile)\n causes.push(`config file profile (${PROFILE_AWS_EC2_METADATA_V1_DISABLED})`);\n if (fallbackBlockedFromProcessEnv)\n causes.push(`process environment variable (${AWS_EC2_METADATA_V1_DISABLED})`);\n throw new InstanceMetadataV1FallbackError(\n `AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${causes.join(\n \", \"\n )}].`\n );\n }\n }\n const imdsProfile = (await retry(async () => {\n let profile2;\n try {\n profile2 = await getProfile(options);\n } catch (err) {\n if (err.statusCode === 401) {\n disableFetchToken = false;\n }\n throw err;\n }\n return profile2;\n }, maxRetries2)).trim();\n return retry(async () => {\n let creds;\n try {\n creds = await getCredentialsFromProfile(imdsProfile, options, init);\n } catch (err) {\n if (err.statusCode === 401) {\n disableFetchToken = false;\n }\n throw err;\n }\n return creds;\n }, maxRetries2);\n }, \"getCredentials\");\n return async () => {\n const endpoint = await getInstanceMetadataEndpoint();\n if (disableFetchToken) {\n logger?.debug(\"AWS SDK Instance Metadata\", \"using v1 fallback (no token fetch)\");\n return getCredentials(maxRetries, { ...endpoint, timeout });\n } else {\n let token;\n try {\n token = (await getMetadataToken({ ...endpoint, timeout })).toString();\n } catch (error) {\n if (error?.statusCode === 400) {\n throw Object.assign(error, {\n message: \"EC2 Metadata token request returned error\"\n });\n } else if (error.message === \"TimeoutError\" || [403, 404, 405].includes(error.statusCode)) {\n disableFetchToken = true;\n }\n logger?.debug(\"AWS SDK Instance Metadata\", \"using v1 fallback (initial)\");\n return getCredentials(maxRetries, { ...endpoint, timeout });\n }\n return getCredentials(maxRetries, {\n ...endpoint,\n headers: {\n [X_AWS_EC2_METADATA_TOKEN]: token\n },\n timeout\n });\n }\n };\n}, \"getInstanceMetadataProvider\");\nvar getMetadataToken = /* @__PURE__ */ __name(async (options) => httpRequest({\n ...options,\n path: IMDS_TOKEN_PATH,\n method: \"PUT\",\n headers: {\n \"x-aws-ec2-metadata-token-ttl-seconds\": \"21600\"\n }\n}), \"getMetadataToken\");\nvar getProfile = /* @__PURE__ */ __name(async (options) => (await httpRequest({ ...options, path: IMDS_PATH })).toString(), \"getProfile\");\nvar getCredentialsFromProfile = /* @__PURE__ */ __name(async (profile, options, init) => {\n const credentialsResponse = JSON.parse(\n (await httpRequest({\n ...options,\n path: IMDS_PATH + profile\n })).toString()\n );\n if (!isImdsCredentials(credentialsResponse)) {\n throw new import_property_provider.CredentialsProviderError(\"Invalid response received from instance metadata service.\", {\n logger: init.logger\n });\n }\n return fromImdsCredentials(credentialsResponse);\n}, \"getCredentialsFromProfile\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n httpRequest,\n getInstanceMetadataEndpoint,\n Endpoint,\n ENV_CMDS_FULL_URI,\n ENV_CMDS_RELATIVE_URI,\n ENV_CMDS_AUTH_TOKEN,\n fromContainerMetadata,\n fromInstanceMetadata,\n DEFAULT_TIMEOUT,\n DEFAULT_MAX_RETRIES,\n providerConfigFromInit\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n FetchHttpHandler: () => FetchHttpHandler,\n keepAliveSupport: () => keepAliveSupport,\n streamCollector: () => streamCollector\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/fetch-http-handler.ts\nvar import_protocol_http = require(\"@smithy/protocol-http\");\nvar import_querystring_builder = require(\"@smithy/querystring-builder\");\n\n// src/create-request.ts\nfunction createRequest(url, requestOptions) {\n return new Request(url, requestOptions);\n}\n__name(createRequest, \"createRequest\");\n\n// src/request-timeout.ts\nfunction requestTimeout(timeoutInMs = 0) {\n return new Promise((resolve, reject) => {\n if (timeoutInMs) {\n setTimeout(() => {\n const timeoutError = new Error(`Request did not complete within ${timeoutInMs} ms`);\n timeoutError.name = \"TimeoutError\";\n reject(timeoutError);\n }, timeoutInMs);\n }\n });\n}\n__name(requestTimeout, \"requestTimeout\");\n\n// src/fetch-http-handler.ts\nvar keepAliveSupport = {\n supported: void 0\n};\nvar FetchHttpHandler = class _FetchHttpHandler {\n static {\n __name(this, \"FetchHttpHandler\");\n }\n /**\n * @returns the input if it is an HttpHandler of any class,\n * or instantiates a new instance of this handler.\n */\n static create(instanceOrOptions) {\n if (typeof instanceOrOptions?.handle === \"function\") {\n return instanceOrOptions;\n }\n return new _FetchHttpHandler(instanceOrOptions);\n }\n constructor(options) {\n if (typeof options === \"function\") {\n this.configProvider = options().then((opts) => opts || {});\n } else {\n this.config = options ?? {};\n this.configProvider = Promise.resolve(this.config);\n }\n if (keepAliveSupport.supported === void 0) {\n keepAliveSupport.supported = Boolean(\n typeof Request !== \"undefined\" && \"keepalive\" in createRequest(\"https://[::1]\")\n );\n }\n }\n destroy() {\n }\n async handle(request, { abortSignal } = {}) {\n if (!this.config) {\n this.config = await this.configProvider;\n }\n const requestTimeoutInMs = this.config.requestTimeout;\n const keepAlive = this.config.keepAlive === true;\n const credentials = this.config.credentials;\n if (abortSignal?.aborted) {\n const abortError = new Error(\"Request aborted\");\n abortError.name = \"AbortError\";\n return Promise.reject(abortError);\n }\n let path = request.path;\n const queryString = (0, import_querystring_builder.buildQueryString)(request.query || {});\n if (queryString) {\n path += `?${queryString}`;\n }\n if (request.fragment) {\n path += `#${request.fragment}`;\n }\n let auth = \"\";\n if (request.username != null || request.password != null) {\n const username = request.username ?? \"\";\n const password = request.password ?? \"\";\n auth = `${username}:${password}@`;\n }\n const { port, method } = request;\n const url = `${request.protocol}//${auth}${request.hostname}${port ? `:${port}` : \"\"}${path}`;\n const body = method === \"GET\" || method === \"HEAD\" ? void 0 : request.body;\n const requestOptions = {\n body,\n headers: new Headers(request.headers),\n method,\n credentials\n };\n if (this.config?.cache) {\n requestOptions.cache = this.config.cache;\n }\n if (body) {\n requestOptions.duplex = \"half\";\n }\n if (typeof AbortController !== \"undefined\") {\n requestOptions.signal = abortSignal;\n }\n if (keepAliveSupport.supported) {\n requestOptions.keepalive = keepAlive;\n }\n if (typeof this.config.requestInit === \"function\") {\n Object.assign(requestOptions, this.config.requestInit(request));\n }\n let removeSignalEventListener = /* @__PURE__ */ __name(() => {\n }, \"removeSignalEventListener\");\n const fetchRequest = createRequest(url, requestOptions);\n const raceOfPromises = [\n fetch(fetchRequest).then((response) => {\n const fetchHeaders = response.headers;\n const transformedHeaders = {};\n for (const pair of fetchHeaders.entries()) {\n transformedHeaders[pair[0]] = pair[1];\n }\n const hasReadableStream = response.body != void 0;\n if (!hasReadableStream) {\n return response.blob().then((body2) => ({\n response: new import_protocol_http.HttpResponse({\n headers: transformedHeaders,\n reason: response.statusText,\n statusCode: response.status,\n body: body2\n })\n }));\n }\n return {\n response: new import_protocol_http.HttpResponse({\n headers: transformedHeaders,\n reason: response.statusText,\n statusCode: response.status,\n body: response.body\n })\n };\n }),\n requestTimeout(requestTimeoutInMs)\n ];\n if (abortSignal) {\n raceOfPromises.push(\n new Promise((resolve, reject) => {\n const onAbort = /* @__PURE__ */ __name(() => {\n const abortError = new Error(\"Request aborted\");\n abortError.name = \"AbortError\";\n reject(abortError);\n }, \"onAbort\");\n if (typeof abortSignal.addEventListener === \"function\") {\n const signal = abortSignal;\n signal.addEventListener(\"abort\", onAbort, { once: true });\n removeSignalEventListener = /* @__PURE__ */ __name(() => signal.removeEventListener(\"abort\", onAbort), \"removeSignalEventListener\");\n } else {\n abortSignal.onabort = onAbort;\n }\n })\n );\n }\n return Promise.race(raceOfPromises).finally(removeSignalEventListener);\n }\n updateHttpClientConfig(key, value) {\n this.config = void 0;\n this.configProvider = this.configProvider.then((config) => {\n config[key] = value;\n return config;\n });\n }\n httpHandlerConfigs() {\n return this.config ?? {};\n }\n};\n\n// src/stream-collector.ts\nvar import_util_base64 = require(\"@smithy/util-base64\");\nvar streamCollector = /* @__PURE__ */ __name(async (stream) => {\n if (typeof Blob === \"function\" && stream instanceof Blob || stream.constructor?.name === \"Blob\") {\n if (Blob.prototype.arrayBuffer !== void 0) {\n return new Uint8Array(await stream.arrayBuffer());\n }\n return collectBlob(stream);\n }\n return collectStream(stream);\n}, \"streamCollector\");\nasync function collectBlob(blob) {\n const base64 = await readToBase64(blob);\n const arrayBuffer = (0, import_util_base64.fromBase64)(base64);\n return new Uint8Array(arrayBuffer);\n}\n__name(collectBlob, \"collectBlob\");\nasync function collectStream(stream) {\n const chunks = [];\n const reader = stream.getReader();\n let isDone = false;\n let length = 0;\n while (!isDone) {\n const { done, value } = await reader.read();\n if (value) {\n chunks.push(value);\n length += value.length;\n }\n isDone = done;\n }\n const collected = new Uint8Array(length);\n let offset = 0;\n for (const chunk of chunks) {\n collected.set(chunk, offset);\n offset += chunk.length;\n }\n return collected;\n}\n__name(collectStream, \"collectStream\");\nfunction readToBase64(blob) {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.onloadend = () => {\n if (reader.readyState !== 2) {\n return reject(new Error(\"Reader aborted too early\"));\n }\n const result = reader.result ?? \"\";\n const commaIndex = result.indexOf(\",\");\n const dataOffset = commaIndex > -1 ? commaIndex + 1 : result.length;\n resolve(result.substring(dataOffset));\n };\n reader.onabort = () => reject(new Error(\"Read aborted\"));\n reader.onerror = () => reject(reader.error);\n reader.readAsDataURL(blob);\n });\n}\n__name(readToBase64, \"readToBase64\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n keepAliveSupport,\n FetchHttpHandler,\n streamCollector\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n Hash: () => Hash\n});\nmodule.exports = __toCommonJS(src_exports);\nvar import_util_buffer_from = require(\"@smithy/util-buffer-from\");\nvar import_util_utf8 = require(\"@smithy/util-utf8\");\nvar import_buffer = require(\"buffer\");\nvar import_crypto = require(\"crypto\");\nvar Hash = class {\n static {\n __name(this, \"Hash\");\n }\n constructor(algorithmIdentifier, secret) {\n this.algorithmIdentifier = algorithmIdentifier;\n this.secret = secret;\n this.reset();\n }\n update(toHash, encoding) {\n this.hash.update((0, import_util_utf8.toUint8Array)(castSourceData(toHash, encoding)));\n }\n digest() {\n return Promise.resolve(this.hash.digest());\n }\n reset() {\n this.hash = this.secret ? (0, import_crypto.createHmac)(this.algorithmIdentifier, castSourceData(this.secret)) : (0, import_crypto.createHash)(this.algorithmIdentifier);\n }\n};\nfunction castSourceData(toCast, encoding) {\n if (import_buffer.Buffer.isBuffer(toCast)) {\n return toCast;\n }\n if (typeof toCast === \"string\") {\n return (0, import_util_buffer_from.fromString)(toCast, encoding);\n }\n if (ArrayBuffer.isView(toCast)) {\n return (0, import_util_buffer_from.fromArrayBuffer)(toCast.buffer, toCast.byteOffset, toCast.byteLength);\n }\n return (0, import_util_buffer_from.fromArrayBuffer)(toCast);\n}\n__name(castSourceData, \"castSourceData\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n Hash\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n isArrayBuffer: () => isArrayBuffer\n});\nmodule.exports = __toCommonJS(src_exports);\nvar isArrayBuffer = /* @__PURE__ */ __name((arg) => typeof ArrayBuffer === \"function\" && arg instanceof ArrayBuffer || Object.prototype.toString.call(arg) === \"[object ArrayBuffer]\", \"isArrayBuffer\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n isArrayBuffer\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n contentLengthMiddleware: () => contentLengthMiddleware,\n contentLengthMiddlewareOptions: () => contentLengthMiddlewareOptions,\n getContentLengthPlugin: () => getContentLengthPlugin\n});\nmodule.exports = __toCommonJS(src_exports);\nvar import_protocol_http = require(\"@smithy/protocol-http\");\nvar CONTENT_LENGTH_HEADER = \"content-length\";\nfunction contentLengthMiddleware(bodyLengthChecker) {\n return (next) => async (args) => {\n const request = args.request;\n if (import_protocol_http.HttpRequest.isInstance(request)) {\n const { body, headers } = request;\n if (body && Object.keys(headers).map((str) => str.toLowerCase()).indexOf(CONTENT_LENGTH_HEADER) === -1) {\n try {\n const length = bodyLengthChecker(body);\n request.headers = {\n ...request.headers,\n [CONTENT_LENGTH_HEADER]: String(length)\n };\n } catch (error) {\n }\n }\n }\n return next({\n ...args,\n request\n });\n };\n}\n__name(contentLengthMiddleware, \"contentLengthMiddleware\");\nvar contentLengthMiddlewareOptions = {\n step: \"build\",\n tags: [\"SET_CONTENT_LENGTH\", \"CONTENT_LENGTH\"],\n name: \"contentLengthMiddleware\",\n override: true\n};\nvar getContentLengthPlugin = /* @__PURE__ */ __name((options) => ({\n applyToStack: (clientStack) => {\n clientStack.add(contentLengthMiddleware(options.bodyLengthChecker), contentLengthMiddlewareOptions);\n }\n}), \"getContentLengthPlugin\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n contentLengthMiddlewareOptions,\n getContentLengthPlugin,\n contentLengthMiddleware\n});\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getEndpointFromConfig = void 0;\nconst node_config_provider_1 = require(\"@smithy/node-config-provider\");\nconst getEndpointUrlConfig_1 = require(\"./getEndpointUrlConfig\");\nconst getEndpointFromConfig = async (serviceId) => (0, node_config_provider_1.loadConfig)((0, getEndpointUrlConfig_1.getEndpointUrlConfig)(serviceId !== null && serviceId !== void 0 ? serviceId : \"\"))();\nexports.getEndpointFromConfig = getEndpointFromConfig;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getEndpointUrlConfig = void 0;\nconst shared_ini_file_loader_1 = require(\"@smithy/shared-ini-file-loader\");\nconst ENV_ENDPOINT_URL = \"AWS_ENDPOINT_URL\";\nconst CONFIG_ENDPOINT_URL = \"endpoint_url\";\nconst getEndpointUrlConfig = (serviceId) => ({\n environmentVariableSelector: (env) => {\n const serviceSuffixParts = serviceId.split(\" \").map((w) => w.toUpperCase());\n const serviceEndpointUrl = env[[ENV_ENDPOINT_URL, ...serviceSuffixParts].join(\"_\")];\n if (serviceEndpointUrl)\n return serviceEndpointUrl;\n const endpointUrl = env[ENV_ENDPOINT_URL];\n if (endpointUrl)\n return endpointUrl;\n return undefined;\n },\n configFileSelector: (profile, config) => {\n if (config && profile.services) {\n const servicesSection = config[[\"services\", profile.services].join(shared_ini_file_loader_1.CONFIG_PREFIX_SEPARATOR)];\n if (servicesSection) {\n const servicePrefixParts = serviceId.split(\" \").map((w) => w.toLowerCase());\n const endpointUrl = servicesSection[[servicePrefixParts.join(\"_\"), CONFIG_ENDPOINT_URL].join(shared_ini_file_loader_1.CONFIG_PREFIX_SEPARATOR)];\n if (endpointUrl)\n return endpointUrl;\n }\n }\n const endpointUrl = profile[CONFIG_ENDPOINT_URL];\n if (endpointUrl)\n return endpointUrl;\n return undefined;\n },\n default: undefined,\n});\nexports.getEndpointUrlConfig = getEndpointUrlConfig;\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n endpointMiddleware: () => endpointMiddleware,\n endpointMiddlewareOptions: () => endpointMiddlewareOptions,\n getEndpointFromInstructions: () => getEndpointFromInstructions,\n getEndpointPlugin: () => getEndpointPlugin,\n resolveEndpointConfig: () => resolveEndpointConfig,\n resolveParams: () => resolveParams,\n toEndpointV1: () => toEndpointV1\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/service-customizations/s3.ts\nvar resolveParamsForS3 = /* @__PURE__ */ __name(async (endpointParams) => {\n const bucket = endpointParams?.Bucket || \"\";\n if (typeof endpointParams.Bucket === \"string\") {\n endpointParams.Bucket = bucket.replace(/#/g, encodeURIComponent(\"#\")).replace(/\\?/g, encodeURIComponent(\"?\"));\n }\n if (isArnBucketName(bucket)) {\n if (endpointParams.ForcePathStyle === true) {\n throw new Error(\"Path-style addressing cannot be used with ARN buckets\");\n }\n } else if (!isDnsCompatibleBucketName(bucket) || bucket.indexOf(\".\") !== -1 && !String(endpointParams.Endpoint).startsWith(\"http:\") || bucket.toLowerCase() !== bucket || bucket.length < 3) {\n endpointParams.ForcePathStyle = true;\n }\n if (endpointParams.DisableMultiRegionAccessPoints) {\n endpointParams.disableMultiRegionAccessPoints = true;\n endpointParams.DisableMRAP = true;\n }\n return endpointParams;\n}, \"resolveParamsForS3\");\nvar DOMAIN_PATTERN = /^[a-z0-9][a-z0-9\\.\\-]{1,61}[a-z0-9]$/;\nvar IP_ADDRESS_PATTERN = /(\\d+\\.){3}\\d+/;\nvar DOTS_PATTERN = /\\.\\./;\nvar isDnsCompatibleBucketName = /* @__PURE__ */ __name((bucketName) => DOMAIN_PATTERN.test(bucketName) && !IP_ADDRESS_PATTERN.test(bucketName) && !DOTS_PATTERN.test(bucketName), \"isDnsCompatibleBucketName\");\nvar isArnBucketName = /* @__PURE__ */ __name((bucketName) => {\n const [arn, partition, service, , , bucket] = bucketName.split(\":\");\n const isArn = arn === \"arn\" && bucketName.split(\":\").length >= 6;\n const isValidArn = Boolean(isArn && partition && service && bucket);\n if (isArn && !isValidArn) {\n throw new Error(`Invalid ARN: ${bucketName} was an invalid ARN.`);\n }\n return isValidArn;\n}, \"isArnBucketName\");\n\n// src/adaptors/createConfigValueProvider.ts\nvar createConfigValueProvider = /* @__PURE__ */ __name((configKey, canonicalEndpointParamKey, config) => {\n const configProvider = /* @__PURE__ */ __name(async () => {\n const configValue = config[configKey] ?? config[canonicalEndpointParamKey];\n if (typeof configValue === \"function\") {\n return configValue();\n }\n return configValue;\n }, \"configProvider\");\n if (configKey === \"credentialScope\" || canonicalEndpointParamKey === \"CredentialScope\") {\n return async () => {\n const credentials = typeof config.credentials === \"function\" ? await config.credentials() : config.credentials;\n const configValue = credentials?.credentialScope ?? credentials?.CredentialScope;\n return configValue;\n };\n }\n if (configKey === \"accountId\" || canonicalEndpointParamKey === \"AccountId\") {\n return async () => {\n const credentials = typeof config.credentials === \"function\" ? await config.credentials() : config.credentials;\n const configValue = credentials?.accountId ?? credentials?.AccountId;\n return configValue;\n };\n }\n if (configKey === \"endpoint\" || canonicalEndpointParamKey === \"endpoint\") {\n return async () => {\n const endpoint = await configProvider();\n if (endpoint && typeof endpoint === \"object\") {\n if (\"url\" in endpoint) {\n return endpoint.url.href;\n }\n if (\"hostname\" in endpoint) {\n const { protocol, hostname, port, path } = endpoint;\n return `${protocol}//${hostname}${port ? \":\" + port : \"\"}${path}`;\n }\n }\n return endpoint;\n };\n }\n return configProvider;\n}, \"createConfigValueProvider\");\n\n// src/adaptors/getEndpointFromInstructions.ts\nvar import_getEndpointFromConfig = require(\"./adaptors/getEndpointFromConfig\");\n\n// src/adaptors/toEndpointV1.ts\nvar import_url_parser = require(\"@smithy/url-parser\");\nvar toEndpointV1 = /* @__PURE__ */ __name((endpoint) => {\n if (typeof endpoint === \"object\") {\n if (\"url\" in endpoint) {\n return (0, import_url_parser.parseUrl)(endpoint.url);\n }\n return endpoint;\n }\n return (0, import_url_parser.parseUrl)(endpoint);\n}, \"toEndpointV1\");\n\n// src/adaptors/getEndpointFromInstructions.ts\nvar getEndpointFromInstructions = /* @__PURE__ */ __name(async (commandInput, instructionsSupplier, clientConfig, context) => {\n if (!clientConfig.endpoint) {\n let endpointFromConfig;\n if (clientConfig.serviceConfiguredEndpoint) {\n endpointFromConfig = await clientConfig.serviceConfiguredEndpoint();\n } else {\n endpointFromConfig = await (0, import_getEndpointFromConfig.getEndpointFromConfig)(clientConfig.serviceId);\n }\n if (endpointFromConfig) {\n clientConfig.endpoint = () => Promise.resolve(toEndpointV1(endpointFromConfig));\n }\n }\n const endpointParams = await resolveParams(commandInput, instructionsSupplier, clientConfig);\n if (typeof clientConfig.endpointProvider !== \"function\") {\n throw new Error(\"config.endpointProvider is not set.\");\n }\n const endpoint = clientConfig.endpointProvider(endpointParams, context);\n return endpoint;\n}, \"getEndpointFromInstructions\");\nvar resolveParams = /* @__PURE__ */ __name(async (commandInput, instructionsSupplier, clientConfig) => {\n const endpointParams = {};\n const instructions = instructionsSupplier?.getEndpointParameterInstructions?.() || {};\n for (const [name, instruction] of Object.entries(instructions)) {\n switch (instruction.type) {\n case \"staticContextParams\":\n endpointParams[name] = instruction.value;\n break;\n case \"contextParams\":\n endpointParams[name] = commandInput[instruction.name];\n break;\n case \"clientContextParams\":\n case \"builtInParams\":\n endpointParams[name] = await createConfigValueProvider(instruction.name, name, clientConfig)();\n break;\n case \"operationContextParams\":\n endpointParams[name] = instruction.get(commandInput);\n break;\n default:\n throw new Error(\"Unrecognized endpoint parameter instruction: \" + JSON.stringify(instruction));\n }\n }\n if (Object.keys(instructions).length === 0) {\n Object.assign(endpointParams, clientConfig);\n }\n if (String(clientConfig.serviceId).toLowerCase() === \"s3\") {\n await resolveParamsForS3(endpointParams);\n }\n return endpointParams;\n}, \"resolveParams\");\n\n// src/endpointMiddleware.ts\nvar import_core = require(\"@smithy/core\");\nvar import_util_middleware = require(\"@smithy/util-middleware\");\nvar endpointMiddleware = /* @__PURE__ */ __name(({\n config,\n instructions\n}) => {\n return (next, context) => async (args) => {\n if (config.endpoint) {\n (0, import_core.setFeature)(context, \"ENDPOINT_OVERRIDE\", \"N\");\n }\n const endpoint = await getEndpointFromInstructions(\n args.input,\n {\n getEndpointParameterInstructions() {\n return instructions;\n }\n },\n { ...config },\n context\n );\n context.endpointV2 = endpoint;\n context.authSchemes = endpoint.properties?.authSchemes;\n const authScheme = context.authSchemes?.[0];\n if (authScheme) {\n context[\"signing_region\"] = authScheme.signingRegion;\n context[\"signing_service\"] = authScheme.signingName;\n const smithyContext = (0, import_util_middleware.getSmithyContext)(context);\n const httpAuthOption = smithyContext?.selectedHttpAuthScheme?.httpAuthOption;\n if (httpAuthOption) {\n httpAuthOption.signingProperties = Object.assign(\n httpAuthOption.signingProperties || {},\n {\n signing_region: authScheme.signingRegion,\n signingRegion: authScheme.signingRegion,\n signing_service: authScheme.signingName,\n signingName: authScheme.signingName,\n signingRegionSet: authScheme.signingRegionSet\n },\n authScheme.properties\n );\n }\n }\n return next({\n ...args\n });\n };\n}, \"endpointMiddleware\");\n\n// src/getEndpointPlugin.ts\nvar import_middleware_serde = require(\"@smithy/middleware-serde\");\nvar endpointMiddlewareOptions = {\n step: \"serialize\",\n tags: [\"ENDPOINT_PARAMETERS\", \"ENDPOINT_V2\", \"ENDPOINT\"],\n name: \"endpointV2Middleware\",\n override: true,\n relation: \"before\",\n toMiddleware: import_middleware_serde.serializerMiddlewareOption.name\n};\nvar getEndpointPlugin = /* @__PURE__ */ __name((config, instructions) => ({\n applyToStack: (clientStack) => {\n clientStack.addRelativeTo(\n endpointMiddleware({\n config,\n instructions\n }),\n endpointMiddlewareOptions\n );\n }\n}), \"getEndpointPlugin\");\n\n// src/resolveEndpointConfig.ts\n\nvar import_getEndpointFromConfig2 = require(\"./adaptors/getEndpointFromConfig\");\nvar resolveEndpointConfig = /* @__PURE__ */ __name((input) => {\n const tls = input.tls ?? true;\n const { endpoint, useDualstackEndpoint, useFipsEndpoint } = input;\n const customEndpointProvider = endpoint != null ? async () => toEndpointV1(await (0, import_util_middleware.normalizeProvider)(endpoint)()) : void 0;\n const isCustomEndpoint = !!endpoint;\n const resolvedConfig = Object.assign(input, {\n endpoint: customEndpointProvider,\n tls,\n isCustomEndpoint,\n useDualstackEndpoint: (0, import_util_middleware.normalizeProvider)(useDualstackEndpoint ?? false),\n useFipsEndpoint: (0, import_util_middleware.normalizeProvider)(useFipsEndpoint ?? false)\n });\n let configuredEndpointPromise = void 0;\n resolvedConfig.serviceConfiguredEndpoint = async () => {\n if (input.serviceId && !configuredEndpointPromise) {\n configuredEndpointPromise = (0, import_getEndpointFromConfig2.getEndpointFromConfig)(input.serviceId);\n }\n return configuredEndpointPromise;\n };\n return resolvedConfig;\n}, \"resolveEndpointConfig\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n getEndpointFromInstructions,\n resolveParams,\n toEndpointV1,\n endpointMiddleware,\n endpointMiddlewareOptions,\n getEndpointPlugin,\n resolveEndpointConfig\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n AdaptiveRetryStrategy: () => AdaptiveRetryStrategy,\n CONFIG_MAX_ATTEMPTS: () => CONFIG_MAX_ATTEMPTS,\n CONFIG_RETRY_MODE: () => CONFIG_RETRY_MODE,\n ENV_MAX_ATTEMPTS: () => ENV_MAX_ATTEMPTS,\n ENV_RETRY_MODE: () => ENV_RETRY_MODE,\n NODE_MAX_ATTEMPT_CONFIG_OPTIONS: () => NODE_MAX_ATTEMPT_CONFIG_OPTIONS,\n NODE_RETRY_MODE_CONFIG_OPTIONS: () => NODE_RETRY_MODE_CONFIG_OPTIONS,\n StandardRetryStrategy: () => StandardRetryStrategy,\n defaultDelayDecider: () => defaultDelayDecider,\n defaultRetryDecider: () => defaultRetryDecider,\n getOmitRetryHeadersPlugin: () => getOmitRetryHeadersPlugin,\n getRetryAfterHint: () => getRetryAfterHint,\n getRetryPlugin: () => getRetryPlugin,\n omitRetryHeadersMiddleware: () => omitRetryHeadersMiddleware,\n omitRetryHeadersMiddlewareOptions: () => omitRetryHeadersMiddlewareOptions,\n resolveRetryConfig: () => resolveRetryConfig,\n retryMiddleware: () => retryMiddleware,\n retryMiddlewareOptions: () => retryMiddlewareOptions\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/AdaptiveRetryStrategy.ts\n\n\n// src/StandardRetryStrategy.ts\nvar import_protocol_http = require(\"@smithy/protocol-http\");\n\n\nvar import_uuid = require(\"uuid\");\n\n// src/defaultRetryQuota.ts\nvar import_util_retry = require(\"@smithy/util-retry\");\nvar getDefaultRetryQuota = /* @__PURE__ */ __name((initialRetryTokens, options) => {\n const MAX_CAPACITY = initialRetryTokens;\n const noRetryIncrement = options?.noRetryIncrement ?? import_util_retry.NO_RETRY_INCREMENT;\n const retryCost = options?.retryCost ?? import_util_retry.RETRY_COST;\n const timeoutRetryCost = options?.timeoutRetryCost ?? import_util_retry.TIMEOUT_RETRY_COST;\n let availableCapacity = initialRetryTokens;\n const getCapacityAmount = /* @__PURE__ */ __name((error) => error.name === \"TimeoutError\" ? timeoutRetryCost : retryCost, \"getCapacityAmount\");\n const hasRetryTokens = /* @__PURE__ */ __name((error) => getCapacityAmount(error) <= availableCapacity, \"hasRetryTokens\");\n const retrieveRetryTokens = /* @__PURE__ */ __name((error) => {\n if (!hasRetryTokens(error)) {\n throw new Error(\"No retry token available\");\n }\n const capacityAmount = getCapacityAmount(error);\n availableCapacity -= capacityAmount;\n return capacityAmount;\n }, \"retrieveRetryTokens\");\n const releaseRetryTokens = /* @__PURE__ */ __name((capacityReleaseAmount) => {\n availableCapacity += capacityReleaseAmount ?? noRetryIncrement;\n availableCapacity = Math.min(availableCapacity, MAX_CAPACITY);\n }, \"releaseRetryTokens\");\n return Object.freeze({\n hasRetryTokens,\n retrieveRetryTokens,\n releaseRetryTokens\n });\n}, \"getDefaultRetryQuota\");\n\n// src/delayDecider.ts\n\nvar defaultDelayDecider = /* @__PURE__ */ __name((delayBase, attempts) => Math.floor(Math.min(import_util_retry.MAXIMUM_RETRY_DELAY, Math.random() * 2 ** attempts * delayBase)), \"defaultDelayDecider\");\n\n// src/retryDecider.ts\nvar import_service_error_classification = require(\"@smithy/service-error-classification\");\nvar defaultRetryDecider = /* @__PURE__ */ __name((error) => {\n if (!error) {\n return false;\n }\n return (0, import_service_error_classification.isRetryableByTrait)(error) || (0, import_service_error_classification.isClockSkewError)(error) || (0, import_service_error_classification.isThrottlingError)(error) || (0, import_service_error_classification.isTransientError)(error);\n}, \"defaultRetryDecider\");\n\n// src/util.ts\nvar asSdkError = /* @__PURE__ */ __name((error) => {\n if (error instanceof Error)\n return error;\n if (error instanceof Object)\n return Object.assign(new Error(), error);\n if (typeof error === \"string\")\n return new Error(error);\n return new Error(`AWS SDK error wrapper for ${error}`);\n}, \"asSdkError\");\n\n// src/StandardRetryStrategy.ts\nvar StandardRetryStrategy = class {\n constructor(maxAttemptsProvider, options) {\n this.maxAttemptsProvider = maxAttemptsProvider;\n this.mode = import_util_retry.RETRY_MODES.STANDARD;\n this.retryDecider = options?.retryDecider ?? defaultRetryDecider;\n this.delayDecider = options?.delayDecider ?? defaultDelayDecider;\n this.retryQuota = options?.retryQuota ?? getDefaultRetryQuota(import_util_retry.INITIAL_RETRY_TOKENS);\n }\n static {\n __name(this, \"StandardRetryStrategy\");\n }\n shouldRetry(error, attempts, maxAttempts) {\n return attempts < maxAttempts && this.retryDecider(error) && this.retryQuota.hasRetryTokens(error);\n }\n async getMaxAttempts() {\n let maxAttempts;\n try {\n maxAttempts = await this.maxAttemptsProvider();\n } catch (error) {\n maxAttempts = import_util_retry.DEFAULT_MAX_ATTEMPTS;\n }\n return maxAttempts;\n }\n async retry(next, args, options) {\n let retryTokenAmount;\n let attempts = 0;\n let totalDelay = 0;\n const maxAttempts = await this.getMaxAttempts();\n const { request } = args;\n if (import_protocol_http.HttpRequest.isInstance(request)) {\n request.headers[import_util_retry.INVOCATION_ID_HEADER] = (0, import_uuid.v4)();\n }\n while (true) {\n try {\n if (import_protocol_http.HttpRequest.isInstance(request)) {\n request.headers[import_util_retry.REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`;\n }\n if (options?.beforeRequest) {\n await options.beforeRequest();\n }\n const { response, output } = await next(args);\n if (options?.afterRequest) {\n options.afterRequest(response);\n }\n this.retryQuota.releaseRetryTokens(retryTokenAmount);\n output.$metadata.attempts = attempts + 1;\n output.$metadata.totalRetryDelay = totalDelay;\n return { response, output };\n } catch (e) {\n const err = asSdkError(e);\n attempts++;\n if (this.shouldRetry(err, attempts, maxAttempts)) {\n retryTokenAmount = this.retryQuota.retrieveRetryTokens(err);\n const delayFromDecider = this.delayDecider(\n (0, import_service_error_classification.isThrottlingError)(err) ? import_util_retry.THROTTLING_RETRY_DELAY_BASE : import_util_retry.DEFAULT_RETRY_DELAY_BASE,\n attempts\n );\n const delayFromResponse = getDelayFromRetryAfterHeader(err.$response);\n const delay = Math.max(delayFromResponse || 0, delayFromDecider);\n totalDelay += delay;\n await new Promise((resolve) => setTimeout(resolve, delay));\n continue;\n }\n if (!err.$metadata) {\n err.$metadata = {};\n }\n err.$metadata.attempts = attempts;\n err.$metadata.totalRetryDelay = totalDelay;\n throw err;\n }\n }\n }\n};\nvar getDelayFromRetryAfterHeader = /* @__PURE__ */ __name((response) => {\n if (!import_protocol_http.HttpResponse.isInstance(response))\n return;\n const retryAfterHeaderName = Object.keys(response.headers).find((key) => key.toLowerCase() === \"retry-after\");\n if (!retryAfterHeaderName)\n return;\n const retryAfter = response.headers[retryAfterHeaderName];\n const retryAfterSeconds = Number(retryAfter);\n if (!Number.isNaN(retryAfterSeconds))\n return retryAfterSeconds * 1e3;\n const retryAfterDate = new Date(retryAfter);\n return retryAfterDate.getTime() - Date.now();\n}, \"getDelayFromRetryAfterHeader\");\n\n// src/AdaptiveRetryStrategy.ts\nvar AdaptiveRetryStrategy = class extends StandardRetryStrategy {\n static {\n __name(this, \"AdaptiveRetryStrategy\");\n }\n constructor(maxAttemptsProvider, options) {\n const { rateLimiter, ...superOptions } = options ?? {};\n super(maxAttemptsProvider, superOptions);\n this.rateLimiter = rateLimiter ?? new import_util_retry.DefaultRateLimiter();\n this.mode = import_util_retry.RETRY_MODES.ADAPTIVE;\n }\n async retry(next, args) {\n return super.retry(next, args, {\n beforeRequest: async () => {\n return this.rateLimiter.getSendToken();\n },\n afterRequest: (response) => {\n this.rateLimiter.updateClientSendingRate(response);\n }\n });\n }\n};\n\n// src/configurations.ts\nvar import_util_middleware = require(\"@smithy/util-middleware\");\n\nvar ENV_MAX_ATTEMPTS = \"AWS_MAX_ATTEMPTS\";\nvar CONFIG_MAX_ATTEMPTS = \"max_attempts\";\nvar NODE_MAX_ATTEMPT_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => {\n const value = env[ENV_MAX_ATTEMPTS];\n if (!value)\n return void 0;\n const maxAttempt = parseInt(value);\n if (Number.isNaN(maxAttempt)) {\n throw new Error(`Environment variable ${ENV_MAX_ATTEMPTS} mast be a number, got \"${value}\"`);\n }\n return maxAttempt;\n },\n configFileSelector: (profile) => {\n const value = profile[CONFIG_MAX_ATTEMPTS];\n if (!value)\n return void 0;\n const maxAttempt = parseInt(value);\n if (Number.isNaN(maxAttempt)) {\n throw new Error(`Shared config file entry ${CONFIG_MAX_ATTEMPTS} mast be a number, got \"${value}\"`);\n }\n return maxAttempt;\n },\n default: import_util_retry.DEFAULT_MAX_ATTEMPTS\n};\nvar resolveRetryConfig = /* @__PURE__ */ __name((input) => {\n const { retryStrategy, retryMode: _retryMode, maxAttempts: _maxAttempts } = input;\n const maxAttempts = (0, import_util_middleware.normalizeProvider)(_maxAttempts ?? import_util_retry.DEFAULT_MAX_ATTEMPTS);\n return Object.assign(input, {\n maxAttempts,\n retryStrategy: async () => {\n if (retryStrategy) {\n return retryStrategy;\n }\n const retryMode = await (0, import_util_middleware.normalizeProvider)(_retryMode)();\n if (retryMode === import_util_retry.RETRY_MODES.ADAPTIVE) {\n return new import_util_retry.AdaptiveRetryStrategy(maxAttempts);\n }\n return new import_util_retry.StandardRetryStrategy(maxAttempts);\n }\n });\n}, \"resolveRetryConfig\");\nvar ENV_RETRY_MODE = \"AWS_RETRY_MODE\";\nvar CONFIG_RETRY_MODE = \"retry_mode\";\nvar NODE_RETRY_MODE_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => env[ENV_RETRY_MODE],\n configFileSelector: (profile) => profile[CONFIG_RETRY_MODE],\n default: import_util_retry.DEFAULT_RETRY_MODE\n};\n\n// src/omitRetryHeadersMiddleware.ts\n\n\nvar omitRetryHeadersMiddleware = /* @__PURE__ */ __name(() => (next) => async (args) => {\n const { request } = args;\n if (import_protocol_http.HttpRequest.isInstance(request)) {\n delete request.headers[import_util_retry.INVOCATION_ID_HEADER];\n delete request.headers[import_util_retry.REQUEST_HEADER];\n }\n return next(args);\n}, \"omitRetryHeadersMiddleware\");\nvar omitRetryHeadersMiddlewareOptions = {\n name: \"omitRetryHeadersMiddleware\",\n tags: [\"RETRY\", \"HEADERS\", \"OMIT_RETRY_HEADERS\"],\n relation: \"before\",\n toMiddleware: \"awsAuthMiddleware\",\n override: true\n};\nvar getOmitRetryHeadersPlugin = /* @__PURE__ */ __name((options) => ({\n applyToStack: (clientStack) => {\n clientStack.addRelativeTo(omitRetryHeadersMiddleware(), omitRetryHeadersMiddlewareOptions);\n }\n}), \"getOmitRetryHeadersPlugin\");\n\n// src/retryMiddleware.ts\n\n\nvar import_smithy_client = require(\"@smithy/smithy-client\");\n\n\nvar import_isStreamingPayload = require(\"./isStreamingPayload/isStreamingPayload\");\nvar retryMiddleware = /* @__PURE__ */ __name((options) => (next, context) => async (args) => {\n let retryStrategy = await options.retryStrategy();\n const maxAttempts = await options.maxAttempts();\n if (isRetryStrategyV2(retryStrategy)) {\n retryStrategy = retryStrategy;\n let retryToken = await retryStrategy.acquireInitialRetryToken(context[\"partition_id\"]);\n let lastError = new Error();\n let attempts = 0;\n let totalRetryDelay = 0;\n const { request } = args;\n const isRequest = import_protocol_http.HttpRequest.isInstance(request);\n if (isRequest) {\n request.headers[import_util_retry.INVOCATION_ID_HEADER] = (0, import_uuid.v4)();\n }\n while (true) {\n try {\n if (isRequest) {\n request.headers[import_util_retry.REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`;\n }\n const { response, output } = await next(args);\n retryStrategy.recordSuccess(retryToken);\n output.$metadata.attempts = attempts + 1;\n output.$metadata.totalRetryDelay = totalRetryDelay;\n return { response, output };\n } catch (e) {\n const retryErrorInfo = getRetryErrorInfo(e);\n lastError = asSdkError(e);\n if (isRequest && (0, import_isStreamingPayload.isStreamingPayload)(request)) {\n (context.logger instanceof import_smithy_client.NoOpLogger ? console : context.logger)?.warn(\n \"An error was encountered in a non-retryable streaming request.\"\n );\n throw lastError;\n }\n try {\n retryToken = await retryStrategy.refreshRetryTokenForRetry(retryToken, retryErrorInfo);\n } catch (refreshError) {\n if (!lastError.$metadata) {\n lastError.$metadata = {};\n }\n lastError.$metadata.attempts = attempts + 1;\n lastError.$metadata.totalRetryDelay = totalRetryDelay;\n throw lastError;\n }\n attempts = retryToken.getRetryCount();\n const delay = retryToken.getRetryDelay();\n totalRetryDelay += delay;\n await new Promise((resolve) => setTimeout(resolve, delay));\n }\n }\n } else {\n retryStrategy = retryStrategy;\n if (retryStrategy?.mode)\n context.userAgent = [...context.userAgent || [], [\"cfg/retry-mode\", retryStrategy.mode]];\n return retryStrategy.retry(next, args);\n }\n}, \"retryMiddleware\");\nvar isRetryStrategyV2 = /* @__PURE__ */ __name((retryStrategy) => typeof retryStrategy.acquireInitialRetryToken !== \"undefined\" && typeof retryStrategy.refreshRetryTokenForRetry !== \"undefined\" && typeof retryStrategy.recordSuccess !== \"undefined\", \"isRetryStrategyV2\");\nvar getRetryErrorInfo = /* @__PURE__ */ __name((error) => {\n const errorInfo = {\n error,\n errorType: getRetryErrorType(error)\n };\n const retryAfterHint = getRetryAfterHint(error.$response);\n if (retryAfterHint) {\n errorInfo.retryAfterHint = retryAfterHint;\n }\n return errorInfo;\n}, \"getRetryErrorInfo\");\nvar getRetryErrorType = /* @__PURE__ */ __name((error) => {\n if ((0, import_service_error_classification.isThrottlingError)(error))\n return \"THROTTLING\";\n if ((0, import_service_error_classification.isTransientError)(error))\n return \"TRANSIENT\";\n if ((0, import_service_error_classification.isServerError)(error))\n return \"SERVER_ERROR\";\n return \"CLIENT_ERROR\";\n}, \"getRetryErrorType\");\nvar retryMiddlewareOptions = {\n name: \"retryMiddleware\",\n tags: [\"RETRY\"],\n step: \"finalizeRequest\",\n priority: \"high\",\n override: true\n};\nvar getRetryPlugin = /* @__PURE__ */ __name((options) => ({\n applyToStack: (clientStack) => {\n clientStack.add(retryMiddleware(options), retryMiddlewareOptions);\n }\n}), \"getRetryPlugin\");\nvar getRetryAfterHint = /* @__PURE__ */ __name((response) => {\n if (!import_protocol_http.HttpResponse.isInstance(response))\n return;\n const retryAfterHeaderName = Object.keys(response.headers).find((key) => key.toLowerCase() === \"retry-after\");\n if (!retryAfterHeaderName)\n return;\n const retryAfter = response.headers[retryAfterHeaderName];\n const retryAfterSeconds = Number(retryAfter);\n if (!Number.isNaN(retryAfterSeconds))\n return new Date(retryAfterSeconds * 1e3);\n const retryAfterDate = new Date(retryAfter);\n return retryAfterDate;\n}, \"getRetryAfterHint\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n AdaptiveRetryStrategy,\n StandardRetryStrategy,\n ENV_MAX_ATTEMPTS,\n CONFIG_MAX_ATTEMPTS,\n NODE_MAX_ATTEMPT_CONFIG_OPTIONS,\n resolveRetryConfig,\n ENV_RETRY_MODE,\n CONFIG_RETRY_MODE,\n NODE_RETRY_MODE_CONFIG_OPTIONS,\n defaultDelayDecider,\n omitRetryHeadersMiddleware,\n omitRetryHeadersMiddlewareOptions,\n getOmitRetryHeadersPlugin,\n defaultRetryDecider,\n retryMiddleware,\n retryMiddlewareOptions,\n getRetryPlugin,\n getRetryAfterHint\n});\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isStreamingPayload = void 0;\nconst stream_1 = require(\"stream\");\nconst isStreamingPayload = (request) => (request === null || request === void 0 ? void 0 : request.body) instanceof stream_1.Readable ||\n (typeof ReadableStream !== \"undefined\" && (request === null || request === void 0 ? void 0 : request.body) instanceof ReadableStream);\nexports.isStreamingPayload = isStreamingPayload;\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n deserializerMiddleware: () => deserializerMiddleware,\n deserializerMiddlewareOption: () => deserializerMiddlewareOption,\n getSerdePlugin: () => getSerdePlugin,\n serializerMiddleware: () => serializerMiddleware,\n serializerMiddlewareOption: () => serializerMiddlewareOption\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/deserializerMiddleware.ts\nvar import_protocol_http = require(\"@smithy/protocol-http\");\nvar deserializerMiddleware = /* @__PURE__ */ __name((options, deserializer) => (next, context) => async (args) => {\n const { response } = await next(args);\n try {\n const parsed = await deserializer(response, options);\n return {\n response,\n output: parsed\n };\n } catch (error) {\n Object.defineProperty(error, \"$response\", {\n value: response\n });\n if (!(\"$metadata\" in error)) {\n const hint = `Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`;\n try {\n error.message += \"\\n \" + hint;\n } catch (e) {\n if (!context.logger || context.logger?.constructor?.name === \"NoOpLogger\") {\n console.warn(hint);\n } else {\n context.logger?.warn?.(hint);\n }\n }\n if (typeof error.$responseBodyText !== \"undefined\") {\n if (error.$response) {\n error.$response.body = error.$responseBodyText;\n }\n }\n try {\n if (import_protocol_http.HttpResponse.isInstance(response)) {\n const { headers = {} } = response;\n const headerEntries = Object.entries(headers);\n error.$metadata = {\n httpStatusCode: response.statusCode,\n requestId: findHeader(/^x-[\\w-]+-request-?id$/, headerEntries),\n extendedRequestId: findHeader(/^x-[\\w-]+-id-2$/, headerEntries),\n cfId: findHeader(/^x-[\\w-]+-cf-id$/, headerEntries)\n };\n }\n } catch (e) {\n }\n }\n throw error;\n }\n}, \"deserializerMiddleware\");\nvar findHeader = /* @__PURE__ */ __name((pattern, headers) => {\n return (headers.find(([k]) => {\n return k.match(pattern);\n }) || [void 0, void 0])[1];\n}, \"findHeader\");\n\n// src/serializerMiddleware.ts\nvar serializerMiddleware = /* @__PURE__ */ __name((options, serializer) => (next, context) => async (args) => {\n const endpointConfig = options;\n const endpoint = context.endpointV2?.url && endpointConfig.urlParser ? async () => endpointConfig.urlParser(context.endpointV2.url) : endpointConfig.endpoint;\n if (!endpoint) {\n throw new Error(\"No valid endpoint provider available.\");\n }\n const request = await serializer(args.input, { ...options, endpoint });\n return next({\n ...args,\n request\n });\n}, \"serializerMiddleware\");\n\n// src/serdePlugin.ts\nvar deserializerMiddlewareOption = {\n name: \"deserializerMiddleware\",\n step: \"deserialize\",\n tags: [\"DESERIALIZER\"],\n override: true\n};\nvar serializerMiddlewareOption = {\n name: \"serializerMiddleware\",\n step: \"serialize\",\n tags: [\"SERIALIZER\"],\n override: true\n};\nfunction getSerdePlugin(config, serializer, deserializer) {\n return {\n applyToStack: (commandStack) => {\n commandStack.add(deserializerMiddleware(config, deserializer), deserializerMiddlewareOption);\n commandStack.add(serializerMiddleware(config, serializer), serializerMiddlewareOption);\n }\n };\n}\n__name(getSerdePlugin, \"getSerdePlugin\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n deserializerMiddleware,\n deserializerMiddlewareOption,\n serializerMiddlewareOption,\n getSerdePlugin,\n serializerMiddleware\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n constructStack: () => constructStack\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/MiddlewareStack.ts\nvar getAllAliases = /* @__PURE__ */ __name((name, aliases) => {\n const _aliases = [];\n if (name) {\n _aliases.push(name);\n }\n if (aliases) {\n for (const alias of aliases) {\n _aliases.push(alias);\n }\n }\n return _aliases;\n}, \"getAllAliases\");\nvar getMiddlewareNameWithAliases = /* @__PURE__ */ __name((name, aliases) => {\n return `${name || \"anonymous\"}${aliases && aliases.length > 0 ? ` (a.k.a. ${aliases.join(\",\")})` : \"\"}`;\n}, \"getMiddlewareNameWithAliases\");\nvar constructStack = /* @__PURE__ */ __name(() => {\n let absoluteEntries = [];\n let relativeEntries = [];\n let identifyOnResolve = false;\n const entriesNameSet = /* @__PURE__ */ new Set();\n const sort = /* @__PURE__ */ __name((entries) => entries.sort(\n (a, b) => stepWeights[b.step] - stepWeights[a.step] || priorityWeights[b.priority || \"normal\"] - priorityWeights[a.priority || \"normal\"]\n ), \"sort\");\n const removeByName = /* @__PURE__ */ __name((toRemove) => {\n let isRemoved = false;\n const filterCb = /* @__PURE__ */ __name((entry) => {\n const aliases = getAllAliases(entry.name, entry.aliases);\n if (aliases.includes(toRemove)) {\n isRemoved = true;\n for (const alias of aliases) {\n entriesNameSet.delete(alias);\n }\n return false;\n }\n return true;\n }, \"filterCb\");\n absoluteEntries = absoluteEntries.filter(filterCb);\n relativeEntries = relativeEntries.filter(filterCb);\n return isRemoved;\n }, \"removeByName\");\n const removeByReference = /* @__PURE__ */ __name((toRemove) => {\n let isRemoved = false;\n const filterCb = /* @__PURE__ */ __name((entry) => {\n if (entry.middleware === toRemove) {\n isRemoved = true;\n for (const alias of getAllAliases(entry.name, entry.aliases)) {\n entriesNameSet.delete(alias);\n }\n return false;\n }\n return true;\n }, \"filterCb\");\n absoluteEntries = absoluteEntries.filter(filterCb);\n relativeEntries = relativeEntries.filter(filterCb);\n return isRemoved;\n }, \"removeByReference\");\n const cloneTo = /* @__PURE__ */ __name((toStack) => {\n absoluteEntries.forEach((entry) => {\n toStack.add(entry.middleware, { ...entry });\n });\n relativeEntries.forEach((entry) => {\n toStack.addRelativeTo(entry.middleware, { ...entry });\n });\n toStack.identifyOnResolve?.(stack.identifyOnResolve());\n return toStack;\n }, \"cloneTo\");\n const expandRelativeMiddlewareList = /* @__PURE__ */ __name((from) => {\n const expandedMiddlewareList = [];\n from.before.forEach((entry) => {\n if (entry.before.length === 0 && entry.after.length === 0) {\n expandedMiddlewareList.push(entry);\n } else {\n expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry));\n }\n });\n expandedMiddlewareList.push(from);\n from.after.reverse().forEach((entry) => {\n if (entry.before.length === 0 && entry.after.length === 0) {\n expandedMiddlewareList.push(entry);\n } else {\n expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry));\n }\n });\n return expandedMiddlewareList;\n }, \"expandRelativeMiddlewareList\");\n const getMiddlewareList = /* @__PURE__ */ __name((debug = false) => {\n const normalizedAbsoluteEntries = [];\n const normalizedRelativeEntries = [];\n const normalizedEntriesNameMap = {};\n absoluteEntries.forEach((entry) => {\n const normalizedEntry = {\n ...entry,\n before: [],\n after: []\n };\n for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) {\n normalizedEntriesNameMap[alias] = normalizedEntry;\n }\n normalizedAbsoluteEntries.push(normalizedEntry);\n });\n relativeEntries.forEach((entry) => {\n const normalizedEntry = {\n ...entry,\n before: [],\n after: []\n };\n for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) {\n normalizedEntriesNameMap[alias] = normalizedEntry;\n }\n normalizedRelativeEntries.push(normalizedEntry);\n });\n normalizedRelativeEntries.forEach((entry) => {\n if (entry.toMiddleware) {\n const toMiddleware = normalizedEntriesNameMap[entry.toMiddleware];\n if (toMiddleware === void 0) {\n if (debug) {\n return;\n }\n throw new Error(\n `${entry.toMiddleware} is not found when adding ${getMiddlewareNameWithAliases(entry.name, entry.aliases)} middleware ${entry.relation} ${entry.toMiddleware}`\n );\n }\n if (entry.relation === \"after\") {\n toMiddleware.after.push(entry);\n }\n if (entry.relation === \"before\") {\n toMiddleware.before.push(entry);\n }\n }\n });\n const mainChain = sort(normalizedAbsoluteEntries).map(expandRelativeMiddlewareList).reduce(\n (wholeList, expandedMiddlewareList) => {\n wholeList.push(...expandedMiddlewareList);\n return wholeList;\n },\n []\n );\n return mainChain;\n }, \"getMiddlewareList\");\n const stack = {\n add: (middleware, options = {}) => {\n const { name, override, aliases: _aliases } = options;\n const entry = {\n step: \"initialize\",\n priority: \"normal\",\n middleware,\n ...options\n };\n const aliases = getAllAliases(name, _aliases);\n if (aliases.length > 0) {\n if (aliases.some((alias) => entriesNameSet.has(alias))) {\n if (!override)\n throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`);\n for (const alias of aliases) {\n const toOverrideIndex = absoluteEntries.findIndex(\n (entry2) => entry2.name === alias || entry2.aliases?.some((a) => a === alias)\n );\n if (toOverrideIndex === -1) {\n continue;\n }\n const toOverride = absoluteEntries[toOverrideIndex];\n if (toOverride.step !== entry.step || entry.priority !== toOverride.priority) {\n throw new Error(\n `\"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}\" middleware with ${toOverride.priority} priority in ${toOverride.step} step cannot be overridden by \"${getMiddlewareNameWithAliases(name, _aliases)}\" middleware with ${entry.priority} priority in ${entry.step} step.`\n );\n }\n absoluteEntries.splice(toOverrideIndex, 1);\n }\n }\n for (const alias of aliases) {\n entriesNameSet.add(alias);\n }\n }\n absoluteEntries.push(entry);\n },\n addRelativeTo: (middleware, options) => {\n const { name, override, aliases: _aliases } = options;\n const entry = {\n middleware,\n ...options\n };\n const aliases = getAllAliases(name, _aliases);\n if (aliases.length > 0) {\n if (aliases.some((alias) => entriesNameSet.has(alias))) {\n if (!override)\n throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`);\n for (const alias of aliases) {\n const toOverrideIndex = relativeEntries.findIndex(\n (entry2) => entry2.name === alias || entry2.aliases?.some((a) => a === alias)\n );\n if (toOverrideIndex === -1) {\n continue;\n }\n const toOverride = relativeEntries[toOverrideIndex];\n if (toOverride.toMiddleware !== entry.toMiddleware || toOverride.relation !== entry.relation) {\n throw new Error(\n `\"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}\" middleware ${toOverride.relation} \"${toOverride.toMiddleware}\" middleware cannot be overridden by \"${getMiddlewareNameWithAliases(name, _aliases)}\" middleware ${entry.relation} \"${entry.toMiddleware}\" middleware.`\n );\n }\n relativeEntries.splice(toOverrideIndex, 1);\n }\n }\n for (const alias of aliases) {\n entriesNameSet.add(alias);\n }\n }\n relativeEntries.push(entry);\n },\n clone: () => cloneTo(constructStack()),\n use: (plugin) => {\n plugin.applyToStack(stack);\n },\n remove: (toRemove) => {\n if (typeof toRemove === \"string\")\n return removeByName(toRemove);\n else\n return removeByReference(toRemove);\n },\n removeByTag: (toRemove) => {\n let isRemoved = false;\n const filterCb = /* @__PURE__ */ __name((entry) => {\n const { tags, name, aliases: _aliases } = entry;\n if (tags && tags.includes(toRemove)) {\n const aliases = getAllAliases(name, _aliases);\n for (const alias of aliases) {\n entriesNameSet.delete(alias);\n }\n isRemoved = true;\n return false;\n }\n return true;\n }, \"filterCb\");\n absoluteEntries = absoluteEntries.filter(filterCb);\n relativeEntries = relativeEntries.filter(filterCb);\n return isRemoved;\n },\n concat: (from) => {\n const cloned = cloneTo(constructStack());\n cloned.use(from);\n cloned.identifyOnResolve(\n identifyOnResolve || cloned.identifyOnResolve() || (from.identifyOnResolve?.() ?? false)\n );\n return cloned;\n },\n applyToStack: cloneTo,\n identify: () => {\n return getMiddlewareList(true).map((mw) => {\n const step = mw.step ?? mw.relation + \" \" + mw.toMiddleware;\n return getMiddlewareNameWithAliases(mw.name, mw.aliases) + \" - \" + step;\n });\n },\n identifyOnResolve(toggle) {\n if (typeof toggle === \"boolean\")\n identifyOnResolve = toggle;\n return identifyOnResolve;\n },\n resolve: (handler, context) => {\n for (const middleware of getMiddlewareList().map((entry) => entry.middleware).reverse()) {\n handler = middleware(handler, context);\n }\n if (identifyOnResolve) {\n console.log(stack.identify());\n }\n return handler;\n }\n };\n return stack;\n}, \"constructStack\");\nvar stepWeights = {\n initialize: 5,\n serialize: 4,\n build: 3,\n finalizeRequest: 2,\n deserialize: 1\n};\nvar priorityWeights = {\n high: 3,\n normal: 2,\n low: 1\n};\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n constructStack\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n loadConfig: () => loadConfig\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/configLoader.ts\n\n\n// src/fromEnv.ts\nvar import_property_provider = require(\"@smithy/property-provider\");\n\n// src/getSelectorName.ts\nfunction getSelectorName(functionString) {\n try {\n const constants = new Set(Array.from(functionString.match(/([A-Z_]){3,}/g) ?? []));\n constants.delete(\"CONFIG\");\n constants.delete(\"CONFIG_PREFIX_SEPARATOR\");\n constants.delete(\"ENV\");\n return [...constants].join(\", \");\n } catch (e) {\n return functionString;\n }\n}\n__name(getSelectorName, \"getSelectorName\");\n\n// src/fromEnv.ts\nvar fromEnv = /* @__PURE__ */ __name((envVarSelector, options) => async () => {\n try {\n const config = envVarSelector(process.env, options);\n if (config === void 0) {\n throw new Error();\n }\n return config;\n } catch (e) {\n throw new import_property_provider.CredentialsProviderError(\n e.message || `Not found in ENV: ${getSelectorName(envVarSelector.toString())}`,\n { logger: options?.logger }\n );\n }\n}, \"fromEnv\");\n\n// src/fromSharedConfigFiles.ts\n\nvar import_shared_ini_file_loader = require(\"@smithy/shared-ini-file-loader\");\nvar fromSharedConfigFiles = /* @__PURE__ */ __name((configSelector, { preferredFile = \"config\", ...init } = {}) => async () => {\n const profile = (0, import_shared_ini_file_loader.getProfileName)(init);\n const { configFile, credentialsFile } = await (0, import_shared_ini_file_loader.loadSharedConfigFiles)(init);\n const profileFromCredentials = credentialsFile[profile] || {};\n const profileFromConfig = configFile[profile] || {};\n const mergedProfile = preferredFile === \"config\" ? { ...profileFromCredentials, ...profileFromConfig } : { ...profileFromConfig, ...profileFromCredentials };\n try {\n const cfgFile = preferredFile === \"config\" ? configFile : credentialsFile;\n const configValue = configSelector(mergedProfile, cfgFile);\n if (configValue === void 0) {\n throw new Error();\n }\n return configValue;\n } catch (e) {\n throw new import_property_provider.CredentialsProviderError(\n e.message || `Not found in config files w/ profile [${profile}]: ${getSelectorName(configSelector.toString())}`,\n { logger: init.logger }\n );\n }\n}, \"fromSharedConfigFiles\");\n\n// src/fromStatic.ts\n\nvar isFunction = /* @__PURE__ */ __name((func) => typeof func === \"function\", \"isFunction\");\nvar fromStatic = /* @__PURE__ */ __name((defaultValue) => isFunction(defaultValue) ? async () => await defaultValue() : (0, import_property_provider.fromStatic)(defaultValue), \"fromStatic\");\n\n// src/configLoader.ts\nvar loadConfig = /* @__PURE__ */ __name(({ environmentVariableSelector, configFileSelector, default: defaultValue }, configuration = {}) => {\n const { signingName, logger } = configuration;\n const envOptions = { signingName, logger };\n return (0, import_property_provider.memoize)(\n (0, import_property_provider.chain)(\n fromEnv(environmentVariableSelector, envOptions),\n fromSharedConfigFiles(configFileSelector, configuration),\n fromStatic(defaultValue)\n )\n );\n}, \"loadConfig\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n loadConfig\n});\n\n","var __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n DEFAULT_REQUEST_TIMEOUT: () => DEFAULT_REQUEST_TIMEOUT,\n NodeHttp2Handler: () => NodeHttp2Handler,\n NodeHttpHandler: () => NodeHttpHandler,\n streamCollector: () => streamCollector\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/node-http-handler.ts\nvar import_protocol_http = require(\"@smithy/protocol-http\");\nvar import_querystring_builder = require(\"@smithy/querystring-builder\");\nvar import_http = require(\"http\");\nvar import_https = require(\"https\");\n\n// src/constants.ts\nvar NODEJS_TIMEOUT_ERROR_CODES = [\"ECONNRESET\", \"EPIPE\", \"ETIMEDOUT\"];\n\n// src/get-transformed-headers.ts\nvar getTransformedHeaders = /* @__PURE__ */ __name((headers) => {\n const transformedHeaders = {};\n for (const name of Object.keys(headers)) {\n const headerValues = headers[name];\n transformedHeaders[name] = Array.isArray(headerValues) ? headerValues.join(\",\") : headerValues;\n }\n return transformedHeaders;\n}, \"getTransformedHeaders\");\n\n// src/timing.ts\nvar timing = {\n setTimeout: (cb, ms) => setTimeout(cb, ms),\n clearTimeout: (timeoutId) => clearTimeout(timeoutId)\n};\n\n// src/set-connection-timeout.ts\nvar DEFER_EVENT_LISTENER_TIME = 1e3;\nvar setConnectionTimeout = /* @__PURE__ */ __name((request, reject, timeoutInMs = 0) => {\n if (!timeoutInMs) {\n return -1;\n }\n const registerTimeout = /* @__PURE__ */ __name((offset) => {\n const timeoutId = timing.setTimeout(() => {\n request.destroy();\n reject(\n Object.assign(new Error(`Socket timed out without establishing a connection within ${timeoutInMs} ms`), {\n name: \"TimeoutError\"\n })\n );\n }, timeoutInMs - offset);\n const doWithSocket = /* @__PURE__ */ __name((socket) => {\n if (socket?.connecting) {\n socket.on(\"connect\", () => {\n timing.clearTimeout(timeoutId);\n });\n } else {\n timing.clearTimeout(timeoutId);\n }\n }, \"doWithSocket\");\n if (request.socket) {\n doWithSocket(request.socket);\n } else {\n request.on(\"socket\", doWithSocket);\n }\n }, \"registerTimeout\");\n if (timeoutInMs < 2e3) {\n registerTimeout(0);\n return 0;\n }\n return timing.setTimeout(registerTimeout.bind(null, DEFER_EVENT_LISTENER_TIME), DEFER_EVENT_LISTENER_TIME);\n}, \"setConnectionTimeout\");\n\n// src/set-socket-keep-alive.ts\nvar DEFER_EVENT_LISTENER_TIME2 = 3e3;\nvar setSocketKeepAlive = /* @__PURE__ */ __name((request, { keepAlive, keepAliveMsecs }, deferTimeMs = DEFER_EVENT_LISTENER_TIME2) => {\n if (keepAlive !== true) {\n return -1;\n }\n const registerListener = /* @__PURE__ */ __name(() => {\n if (request.socket) {\n request.socket.setKeepAlive(keepAlive, keepAliveMsecs || 0);\n } else {\n request.on(\"socket\", (socket) => {\n socket.setKeepAlive(keepAlive, keepAliveMsecs || 0);\n });\n }\n }, \"registerListener\");\n if (deferTimeMs === 0) {\n registerListener();\n return 0;\n }\n return timing.setTimeout(registerListener, deferTimeMs);\n}, \"setSocketKeepAlive\");\n\n// src/set-socket-timeout.ts\nvar DEFER_EVENT_LISTENER_TIME3 = 3e3;\nvar setSocketTimeout = /* @__PURE__ */ __name((request, reject, timeoutInMs = DEFAULT_REQUEST_TIMEOUT) => {\n const registerTimeout = /* @__PURE__ */ __name((offset) => {\n const timeout = timeoutInMs - offset;\n const onTimeout = /* @__PURE__ */ __name(() => {\n request.destroy();\n reject(Object.assign(new Error(`Connection timed out after ${timeoutInMs} ms`), { name: \"TimeoutError\" }));\n }, \"onTimeout\");\n if (request.socket) {\n request.socket.setTimeout(timeout, onTimeout);\n request.on(\"close\", () => request.socket?.removeListener(\"timeout\", onTimeout));\n } else {\n request.setTimeout(timeout, onTimeout);\n }\n }, \"registerTimeout\");\n if (0 < timeoutInMs && timeoutInMs < 6e3) {\n registerTimeout(0);\n return 0;\n }\n return timing.setTimeout(\n registerTimeout.bind(null, timeoutInMs === 0 ? 0 : DEFER_EVENT_LISTENER_TIME3),\n DEFER_EVENT_LISTENER_TIME3\n );\n}, \"setSocketTimeout\");\n\n// src/write-request-body.ts\nvar import_stream = require(\"stream\");\nvar MIN_WAIT_TIME = 6e3;\nasync function writeRequestBody(httpRequest, request, maxContinueTimeoutMs = MIN_WAIT_TIME) {\n const headers = request.headers ?? {};\n const expect = headers[\"Expect\"] || headers[\"expect\"];\n let timeoutId = -1;\n let sendBody = true;\n if (expect === \"100-continue\") {\n sendBody = await Promise.race([\n new Promise((resolve) => {\n timeoutId = Number(timing.setTimeout(() => resolve(true), Math.max(MIN_WAIT_TIME, maxContinueTimeoutMs)));\n }),\n new Promise((resolve) => {\n httpRequest.on(\"continue\", () => {\n timing.clearTimeout(timeoutId);\n resolve(true);\n });\n httpRequest.on(\"response\", () => {\n timing.clearTimeout(timeoutId);\n resolve(false);\n });\n httpRequest.on(\"error\", () => {\n timing.clearTimeout(timeoutId);\n resolve(false);\n });\n })\n ]);\n }\n if (sendBody) {\n writeBody(httpRequest, request.body);\n }\n}\n__name(writeRequestBody, \"writeRequestBody\");\nfunction writeBody(httpRequest, body) {\n if (body instanceof import_stream.Readable) {\n body.pipe(httpRequest);\n return;\n }\n if (body) {\n if (Buffer.isBuffer(body) || typeof body === \"string\") {\n httpRequest.end(body);\n return;\n }\n const uint8 = body;\n if (typeof uint8 === \"object\" && uint8.buffer && typeof uint8.byteOffset === \"number\" && typeof uint8.byteLength === \"number\") {\n httpRequest.end(Buffer.from(uint8.buffer, uint8.byteOffset, uint8.byteLength));\n return;\n }\n httpRequest.end(Buffer.from(body));\n return;\n }\n httpRequest.end();\n}\n__name(writeBody, \"writeBody\");\n\n// src/node-http-handler.ts\nvar DEFAULT_REQUEST_TIMEOUT = 0;\nvar NodeHttpHandler = class _NodeHttpHandler {\n constructor(options) {\n this.socketWarningTimestamp = 0;\n // Node http handler is hard-coded to http/1.1: https://github.com/nodejs/node/blob/ff5664b83b89c55e4ab5d5f60068fb457f1f5872/lib/_http_server.js#L286\n this.metadata = { handlerProtocol: \"http/1.1\" };\n this.configProvider = new Promise((resolve, reject) => {\n if (typeof options === \"function\") {\n options().then((_options) => {\n resolve(this.resolveDefaultConfig(_options));\n }).catch(reject);\n } else {\n resolve(this.resolveDefaultConfig(options));\n }\n });\n }\n static {\n __name(this, \"NodeHttpHandler\");\n }\n /**\n * @returns the input if it is an HttpHandler of any class,\n * or instantiates a new instance of this handler.\n */\n static create(instanceOrOptions) {\n if (typeof instanceOrOptions?.handle === \"function\") {\n return instanceOrOptions;\n }\n return new _NodeHttpHandler(instanceOrOptions);\n }\n /**\n * @internal\n *\n * @param agent - http(s) agent in use by the NodeHttpHandler instance.\n * @param socketWarningTimestamp - last socket usage check timestamp.\n * @param logger - channel for the warning.\n * @returns timestamp of last emitted warning.\n */\n static checkSocketUsage(agent, socketWarningTimestamp, logger = console) {\n const { sockets, requests, maxSockets } = agent;\n if (typeof maxSockets !== \"number\" || maxSockets === Infinity) {\n return socketWarningTimestamp;\n }\n const interval = 15e3;\n if (Date.now() - interval < socketWarningTimestamp) {\n return socketWarningTimestamp;\n }\n if (sockets && requests) {\n for (const origin in sockets) {\n const socketsInUse = sockets[origin]?.length ?? 0;\n const requestsEnqueued = requests[origin]?.length ?? 0;\n if (socketsInUse >= maxSockets && requestsEnqueued >= 2 * maxSockets) {\n logger?.warn?.(\n `@smithy/node-http-handler:WARN - socket usage at capacity=${socketsInUse} and ${requestsEnqueued} additional requests are enqueued.\nSee https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html\nor increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`\n );\n return Date.now();\n }\n }\n }\n return socketWarningTimestamp;\n }\n resolveDefaultConfig(options) {\n const { requestTimeout, connectionTimeout, socketTimeout, socketAcquisitionWarningTimeout, httpAgent, httpsAgent } = options || {};\n const keepAlive = true;\n const maxSockets = 50;\n return {\n connectionTimeout,\n requestTimeout: requestTimeout ?? socketTimeout,\n socketAcquisitionWarningTimeout,\n httpAgent: (() => {\n if (httpAgent instanceof import_http.Agent || typeof httpAgent?.destroy === \"function\") {\n return httpAgent;\n }\n return new import_http.Agent({ keepAlive, maxSockets, ...httpAgent });\n })(),\n httpsAgent: (() => {\n if (httpsAgent instanceof import_https.Agent || typeof httpsAgent?.destroy === \"function\") {\n return httpsAgent;\n }\n return new import_https.Agent({ keepAlive, maxSockets, ...httpsAgent });\n })(),\n logger: console\n };\n }\n destroy() {\n this.config?.httpAgent?.destroy();\n this.config?.httpsAgent?.destroy();\n }\n async handle(request, { abortSignal } = {}) {\n if (!this.config) {\n this.config = await this.configProvider;\n }\n return new Promise((_resolve, _reject) => {\n let writeRequestBodyPromise = void 0;\n const timeouts = [];\n const resolve = /* @__PURE__ */ __name(async (arg) => {\n await writeRequestBodyPromise;\n timeouts.forEach(timing.clearTimeout);\n _resolve(arg);\n }, \"resolve\");\n const reject = /* @__PURE__ */ __name(async (arg) => {\n await writeRequestBodyPromise;\n timeouts.forEach(timing.clearTimeout);\n _reject(arg);\n }, \"reject\");\n if (!this.config) {\n throw new Error(\"Node HTTP request handler config is not resolved\");\n }\n if (abortSignal?.aborted) {\n const abortError = new Error(\"Request aborted\");\n abortError.name = \"AbortError\";\n reject(abortError);\n return;\n }\n const isSSL = request.protocol === \"https:\";\n const agent = isSSL ? this.config.httpsAgent : this.config.httpAgent;\n timeouts.push(\n timing.setTimeout(\n () => {\n this.socketWarningTimestamp = _NodeHttpHandler.checkSocketUsage(\n agent,\n this.socketWarningTimestamp,\n this.config.logger\n );\n },\n this.config.socketAcquisitionWarningTimeout ?? (this.config.requestTimeout ?? 2e3) + (this.config.connectionTimeout ?? 1e3)\n )\n );\n const queryString = (0, import_querystring_builder.buildQueryString)(request.query || {});\n let auth = void 0;\n if (request.username != null || request.password != null) {\n const username = request.username ?? \"\";\n const password = request.password ?? \"\";\n auth = `${username}:${password}`;\n }\n let path = request.path;\n if (queryString) {\n path += `?${queryString}`;\n }\n if (request.fragment) {\n path += `#${request.fragment}`;\n }\n let hostname = request.hostname ?? \"\";\n if (hostname[0] === \"[\" && hostname.endsWith(\"]\")) {\n hostname = request.hostname.slice(1, -1);\n } else {\n hostname = request.hostname;\n }\n const nodeHttpsOptions = {\n headers: request.headers,\n host: hostname,\n method: request.method,\n path,\n port: request.port,\n agent,\n auth\n };\n const requestFunc = isSSL ? import_https.request : import_http.request;\n const req = requestFunc(nodeHttpsOptions, (res) => {\n const httpResponse = new import_protocol_http.HttpResponse({\n statusCode: res.statusCode || -1,\n reason: res.statusMessage,\n headers: getTransformedHeaders(res.headers),\n body: res\n });\n resolve({ response: httpResponse });\n });\n req.on(\"error\", (err) => {\n if (NODEJS_TIMEOUT_ERROR_CODES.includes(err.code)) {\n reject(Object.assign(err, { name: \"TimeoutError\" }));\n } else {\n reject(err);\n }\n });\n if (abortSignal) {\n const onAbort = /* @__PURE__ */ __name(() => {\n req.destroy();\n const abortError = new Error(\"Request aborted\");\n abortError.name = \"AbortError\";\n reject(abortError);\n }, \"onAbort\");\n if (typeof abortSignal.addEventListener === \"function\") {\n const signal = abortSignal;\n signal.addEventListener(\"abort\", onAbort, { once: true });\n req.once(\"close\", () => signal.removeEventListener(\"abort\", onAbort));\n } else {\n abortSignal.onabort = onAbort;\n }\n }\n timeouts.push(setConnectionTimeout(req, reject, this.config.connectionTimeout));\n timeouts.push(setSocketTimeout(req, reject, this.config.requestTimeout));\n const httpAgent = nodeHttpsOptions.agent;\n if (typeof httpAgent === \"object\" && \"keepAlive\" in httpAgent) {\n timeouts.push(\n setSocketKeepAlive(req, {\n // @ts-expect-error keepAlive is not public on httpAgent.\n keepAlive: httpAgent.keepAlive,\n // @ts-expect-error keepAliveMsecs is not public on httpAgent.\n keepAliveMsecs: httpAgent.keepAliveMsecs\n })\n );\n }\n writeRequestBodyPromise = writeRequestBody(req, request, this.config.requestTimeout).catch((e) => {\n timeouts.forEach(timing.clearTimeout);\n return _reject(e);\n });\n });\n }\n updateHttpClientConfig(key, value) {\n this.config = void 0;\n this.configProvider = this.configProvider.then((config) => {\n return {\n ...config,\n [key]: value\n };\n });\n }\n httpHandlerConfigs() {\n return this.config ?? {};\n }\n};\n\n// src/node-http2-handler.ts\n\n\nvar import_http22 = require(\"http2\");\n\n// src/node-http2-connection-manager.ts\nvar import_http2 = __toESM(require(\"http2\"));\n\n// src/node-http2-connection-pool.ts\nvar NodeHttp2ConnectionPool = class {\n constructor(sessions) {\n this.sessions = [];\n this.sessions = sessions ?? [];\n }\n static {\n __name(this, \"NodeHttp2ConnectionPool\");\n }\n poll() {\n if (this.sessions.length > 0) {\n return this.sessions.shift();\n }\n }\n offerLast(session) {\n this.sessions.push(session);\n }\n contains(session) {\n return this.sessions.includes(session);\n }\n remove(session) {\n this.sessions = this.sessions.filter((s) => s !== session);\n }\n [Symbol.iterator]() {\n return this.sessions[Symbol.iterator]();\n }\n destroy(connection) {\n for (const session of this.sessions) {\n if (session === connection) {\n if (!session.destroyed) {\n session.destroy();\n }\n }\n }\n }\n};\n\n// src/node-http2-connection-manager.ts\nvar NodeHttp2ConnectionManager = class {\n constructor(config) {\n this.sessionCache = /* @__PURE__ */ new Map();\n this.config = config;\n if (this.config.maxConcurrency && this.config.maxConcurrency <= 0) {\n throw new RangeError(\"maxConcurrency must be greater than zero.\");\n }\n }\n static {\n __name(this, \"NodeHttp2ConnectionManager\");\n }\n lease(requestContext, connectionConfiguration) {\n const url = this.getUrlString(requestContext);\n const existingPool = this.sessionCache.get(url);\n if (existingPool) {\n const existingSession = existingPool.poll();\n if (existingSession && !this.config.disableConcurrency) {\n return existingSession;\n }\n }\n const session = import_http2.default.connect(url);\n if (this.config.maxConcurrency) {\n session.settings({ maxConcurrentStreams: this.config.maxConcurrency }, (err) => {\n if (err) {\n throw new Error(\n \"Fail to set maxConcurrentStreams to \" + this.config.maxConcurrency + \"when creating new session for \" + requestContext.destination.toString()\n );\n }\n });\n }\n session.unref();\n const destroySessionCb = /* @__PURE__ */ __name(() => {\n session.destroy();\n this.deleteSession(url, session);\n }, \"destroySessionCb\");\n session.on(\"goaway\", destroySessionCb);\n session.on(\"error\", destroySessionCb);\n session.on(\"frameError\", destroySessionCb);\n session.on(\"close\", () => this.deleteSession(url, session));\n if (connectionConfiguration.requestTimeout) {\n session.setTimeout(connectionConfiguration.requestTimeout, destroySessionCb);\n }\n const connectionPool = this.sessionCache.get(url) || new NodeHttp2ConnectionPool();\n connectionPool.offerLast(session);\n this.sessionCache.set(url, connectionPool);\n return session;\n }\n /**\n * Delete a session from the connection pool.\n * @param authority The authority of the session to delete.\n * @param session The session to delete.\n */\n deleteSession(authority, session) {\n const existingConnectionPool = this.sessionCache.get(authority);\n if (!existingConnectionPool) {\n return;\n }\n if (!existingConnectionPool.contains(session)) {\n return;\n }\n existingConnectionPool.remove(session);\n this.sessionCache.set(authority, existingConnectionPool);\n }\n release(requestContext, session) {\n const cacheKey = this.getUrlString(requestContext);\n this.sessionCache.get(cacheKey)?.offerLast(session);\n }\n destroy() {\n for (const [key, connectionPool] of this.sessionCache) {\n for (const session of connectionPool) {\n if (!session.destroyed) {\n session.destroy();\n }\n connectionPool.remove(session);\n }\n this.sessionCache.delete(key);\n }\n }\n setMaxConcurrentStreams(maxConcurrentStreams) {\n if (maxConcurrentStreams && maxConcurrentStreams <= 0) {\n throw new RangeError(\"maxConcurrentStreams must be greater than zero.\");\n }\n this.config.maxConcurrency = maxConcurrentStreams;\n }\n setDisableConcurrentStreams(disableConcurrentStreams) {\n this.config.disableConcurrency = disableConcurrentStreams;\n }\n getUrlString(request) {\n return request.destination.toString();\n }\n};\n\n// src/node-http2-handler.ts\nvar NodeHttp2Handler = class _NodeHttp2Handler {\n constructor(options) {\n this.metadata = { handlerProtocol: \"h2\" };\n this.connectionManager = new NodeHttp2ConnectionManager({});\n this.configProvider = new Promise((resolve, reject) => {\n if (typeof options === \"function\") {\n options().then((opts) => {\n resolve(opts || {});\n }).catch(reject);\n } else {\n resolve(options || {});\n }\n });\n }\n static {\n __name(this, \"NodeHttp2Handler\");\n }\n /**\n * @returns the input if it is an HttpHandler of any class,\n * or instantiates a new instance of this handler.\n */\n static create(instanceOrOptions) {\n if (typeof instanceOrOptions?.handle === \"function\") {\n return instanceOrOptions;\n }\n return new _NodeHttp2Handler(instanceOrOptions);\n }\n destroy() {\n this.connectionManager.destroy();\n }\n async handle(request, { abortSignal } = {}) {\n if (!this.config) {\n this.config = await this.configProvider;\n this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams || false);\n if (this.config.maxConcurrentStreams) {\n this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams);\n }\n }\n const { requestTimeout, disableConcurrentStreams } = this.config;\n return new Promise((_resolve, _reject) => {\n let fulfilled = false;\n let writeRequestBodyPromise = void 0;\n const resolve = /* @__PURE__ */ __name(async (arg) => {\n await writeRequestBodyPromise;\n _resolve(arg);\n }, \"resolve\");\n const reject = /* @__PURE__ */ __name(async (arg) => {\n await writeRequestBodyPromise;\n _reject(arg);\n }, \"reject\");\n if (abortSignal?.aborted) {\n fulfilled = true;\n const abortError = new Error(\"Request aborted\");\n abortError.name = \"AbortError\";\n reject(abortError);\n return;\n }\n const { hostname, method, port, protocol, query } = request;\n let auth = \"\";\n if (request.username != null || request.password != null) {\n const username = request.username ?? \"\";\n const password = request.password ?? \"\";\n auth = `${username}:${password}@`;\n }\n const authority = `${protocol}//${auth}${hostname}${port ? `:${port}` : \"\"}`;\n const requestContext = { destination: new URL(authority) };\n const session = this.connectionManager.lease(requestContext, {\n requestTimeout: this.config?.sessionTimeout,\n disableConcurrentStreams: disableConcurrentStreams || false\n });\n const rejectWithDestroy = /* @__PURE__ */ __name((err) => {\n if (disableConcurrentStreams) {\n this.destroySession(session);\n }\n fulfilled = true;\n reject(err);\n }, \"rejectWithDestroy\");\n const queryString = (0, import_querystring_builder.buildQueryString)(query || {});\n let path = request.path;\n if (queryString) {\n path += `?${queryString}`;\n }\n if (request.fragment) {\n path += `#${request.fragment}`;\n }\n const req = session.request({\n ...request.headers,\n [import_http22.constants.HTTP2_HEADER_PATH]: path,\n [import_http22.constants.HTTP2_HEADER_METHOD]: method\n });\n session.ref();\n req.on(\"response\", (headers) => {\n const httpResponse = new import_protocol_http.HttpResponse({\n statusCode: headers[\":status\"] || -1,\n headers: getTransformedHeaders(headers),\n body: req\n });\n fulfilled = true;\n resolve({ response: httpResponse });\n if (disableConcurrentStreams) {\n session.close();\n this.connectionManager.deleteSession(authority, session);\n }\n });\n if (requestTimeout) {\n req.setTimeout(requestTimeout, () => {\n req.close();\n const timeoutError = new Error(`Stream timed out because of no activity for ${requestTimeout} ms`);\n timeoutError.name = \"TimeoutError\";\n rejectWithDestroy(timeoutError);\n });\n }\n if (abortSignal) {\n const onAbort = /* @__PURE__ */ __name(() => {\n req.close();\n const abortError = new Error(\"Request aborted\");\n abortError.name = \"AbortError\";\n rejectWithDestroy(abortError);\n }, \"onAbort\");\n if (typeof abortSignal.addEventListener === \"function\") {\n const signal = abortSignal;\n signal.addEventListener(\"abort\", onAbort, { once: true });\n req.once(\"close\", () => signal.removeEventListener(\"abort\", onAbort));\n } else {\n abortSignal.onabort = onAbort;\n }\n }\n req.on(\"frameError\", (type, code, id) => {\n rejectWithDestroy(new Error(`Frame type id ${type} in stream id ${id} has failed with code ${code}.`));\n });\n req.on(\"error\", rejectWithDestroy);\n req.on(\"aborted\", () => {\n rejectWithDestroy(\n new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${req.rstCode}.`)\n );\n });\n req.on(\"close\", () => {\n session.unref();\n if (disableConcurrentStreams) {\n session.destroy();\n }\n if (!fulfilled) {\n rejectWithDestroy(new Error(\"Unexpected error: http2 request did not get a response\"));\n }\n });\n writeRequestBodyPromise = writeRequestBody(req, request, requestTimeout);\n });\n }\n updateHttpClientConfig(key, value) {\n this.config = void 0;\n this.configProvider = this.configProvider.then((config) => {\n return {\n ...config,\n [key]: value\n };\n });\n }\n httpHandlerConfigs() {\n return this.config ?? {};\n }\n /**\n * Destroys a session.\n * @param session - the session to destroy.\n */\n destroySession(session) {\n if (!session.destroyed) {\n session.destroy();\n }\n }\n};\n\n// src/stream-collector/collector.ts\n\nvar Collector = class extends import_stream.Writable {\n constructor() {\n super(...arguments);\n this.bufferedBytes = [];\n }\n static {\n __name(this, \"Collector\");\n }\n _write(chunk, encoding, callback) {\n this.bufferedBytes.push(chunk);\n callback();\n }\n};\n\n// src/stream-collector/index.ts\nvar streamCollector = /* @__PURE__ */ __name((stream) => {\n if (isReadableStreamInstance(stream)) {\n return collectReadableStream(stream);\n }\n return new Promise((resolve, reject) => {\n const collector = new Collector();\n stream.pipe(collector);\n stream.on(\"error\", (err) => {\n collector.end();\n reject(err);\n });\n collector.on(\"error\", reject);\n collector.on(\"finish\", function() {\n const bytes = new Uint8Array(Buffer.concat(this.bufferedBytes));\n resolve(bytes);\n });\n });\n}, \"streamCollector\");\nvar isReadableStreamInstance = /* @__PURE__ */ __name((stream) => typeof ReadableStream === \"function\" && stream instanceof ReadableStream, \"isReadableStreamInstance\");\nasync function collectReadableStream(stream) {\n const chunks = [];\n const reader = stream.getReader();\n let isDone = false;\n let length = 0;\n while (!isDone) {\n const { done, value } = await reader.read();\n if (value) {\n chunks.push(value);\n length += value.length;\n }\n isDone = done;\n }\n const collected = new Uint8Array(length);\n let offset = 0;\n for (const chunk of chunks) {\n collected.set(chunk, offset);\n offset += chunk.length;\n }\n return collected;\n}\n__name(collectReadableStream, \"collectReadableStream\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n DEFAULT_REQUEST_TIMEOUT,\n NodeHttpHandler,\n NodeHttp2Handler,\n streamCollector\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n CredentialsProviderError: () => CredentialsProviderError,\n ProviderError: () => ProviderError,\n TokenProviderError: () => TokenProviderError,\n chain: () => chain,\n fromStatic: () => fromStatic,\n memoize: () => memoize\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/ProviderError.ts\nvar ProviderError = class _ProviderError extends Error {\n constructor(message, options = true) {\n let logger;\n let tryNextLink = true;\n if (typeof options === \"boolean\") {\n logger = void 0;\n tryNextLink = options;\n } else if (options != null && typeof options === \"object\") {\n logger = options.logger;\n tryNextLink = options.tryNextLink ?? true;\n }\n super(message);\n this.name = \"ProviderError\";\n this.tryNextLink = tryNextLink;\n Object.setPrototypeOf(this, _ProviderError.prototype);\n logger?.debug?.(`@smithy/property-provider ${tryNextLink ? \"->\" : \"(!)\"} ${message}`);\n }\n static {\n __name(this, \"ProviderError\");\n }\n /**\n * @deprecated use new operator.\n */\n static from(error, options = true) {\n return Object.assign(new this(error.message, options), error);\n }\n};\n\n// src/CredentialsProviderError.ts\nvar CredentialsProviderError = class _CredentialsProviderError extends ProviderError {\n /**\n * @override\n */\n constructor(message, options = true) {\n super(message, options);\n this.name = \"CredentialsProviderError\";\n Object.setPrototypeOf(this, _CredentialsProviderError.prototype);\n }\n static {\n __name(this, \"CredentialsProviderError\");\n }\n};\n\n// src/TokenProviderError.ts\nvar TokenProviderError = class _TokenProviderError extends ProviderError {\n /**\n * @override\n */\n constructor(message, options = true) {\n super(message, options);\n this.name = \"TokenProviderError\";\n Object.setPrototypeOf(this, _TokenProviderError.prototype);\n }\n static {\n __name(this, \"TokenProviderError\");\n }\n};\n\n// src/chain.ts\nvar chain = /* @__PURE__ */ __name((...providers) => async () => {\n if (providers.length === 0) {\n throw new ProviderError(\"No providers in chain\");\n }\n let lastProviderError;\n for (const provider of providers) {\n try {\n const credentials = await provider();\n return credentials;\n } catch (err) {\n lastProviderError = err;\n if (err?.tryNextLink) {\n continue;\n }\n throw err;\n }\n }\n throw lastProviderError;\n}, \"chain\");\n\n// src/fromStatic.ts\nvar fromStatic = /* @__PURE__ */ __name((staticValue) => () => Promise.resolve(staticValue), \"fromStatic\");\n\n// src/memoize.ts\nvar memoize = /* @__PURE__ */ __name((provider, isExpired, requiresRefresh) => {\n let resolved;\n let pending;\n let hasResult;\n let isConstant = false;\n const coalesceProvider = /* @__PURE__ */ __name(async () => {\n if (!pending) {\n pending = provider();\n }\n try {\n resolved = await pending;\n hasResult = true;\n isConstant = false;\n } finally {\n pending = void 0;\n }\n return resolved;\n }, \"coalesceProvider\");\n if (isExpired === void 0) {\n return async (options) => {\n if (!hasResult || options?.forceRefresh) {\n resolved = await coalesceProvider();\n }\n return resolved;\n };\n }\n return async (options) => {\n if (!hasResult || options?.forceRefresh) {\n resolved = await coalesceProvider();\n }\n if (isConstant) {\n return resolved;\n }\n if (requiresRefresh && !requiresRefresh(resolved)) {\n isConstant = true;\n return resolved;\n }\n if (isExpired(resolved)) {\n await coalesceProvider();\n return resolved;\n }\n return resolved;\n };\n}, \"memoize\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n CredentialsProviderError,\n ProviderError,\n TokenProviderError,\n chain,\n fromStatic,\n memoize\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n Field: () => Field,\n Fields: () => Fields,\n HttpRequest: () => HttpRequest,\n HttpResponse: () => HttpResponse,\n IHttpRequest: () => import_types.HttpRequest,\n getHttpHandlerExtensionConfiguration: () => getHttpHandlerExtensionConfiguration,\n isValidHostname: () => isValidHostname,\n resolveHttpHandlerRuntimeConfig: () => resolveHttpHandlerRuntimeConfig\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/extensions/httpExtensionConfiguration.ts\nvar getHttpHandlerExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {\n return {\n setHttpHandler(handler) {\n runtimeConfig.httpHandler = handler;\n },\n httpHandler() {\n return runtimeConfig.httpHandler;\n },\n updateHttpClientConfig(key, value) {\n runtimeConfig.httpHandler?.updateHttpClientConfig(key, value);\n },\n httpHandlerConfigs() {\n return runtimeConfig.httpHandler.httpHandlerConfigs();\n }\n };\n}, \"getHttpHandlerExtensionConfiguration\");\nvar resolveHttpHandlerRuntimeConfig = /* @__PURE__ */ __name((httpHandlerExtensionConfiguration) => {\n return {\n httpHandler: httpHandlerExtensionConfiguration.httpHandler()\n };\n}, \"resolveHttpHandlerRuntimeConfig\");\n\n// src/Field.ts\nvar import_types = require(\"@smithy/types\");\nvar Field = class {\n static {\n __name(this, \"Field\");\n }\n constructor({ name, kind = import_types.FieldPosition.HEADER, values = [] }) {\n this.name = name;\n this.kind = kind;\n this.values = values;\n }\n /**\n * Appends a value to the field.\n *\n * @param value The value to append.\n */\n add(value) {\n this.values.push(value);\n }\n /**\n * Overwrite existing field values.\n *\n * @param values The new field values.\n */\n set(values) {\n this.values = values;\n }\n /**\n * Remove all matching entries from list.\n *\n * @param value Value to remove.\n */\n remove(value) {\n this.values = this.values.filter((v) => v !== value);\n }\n /**\n * Get comma-delimited string.\n *\n * @returns String representation of {@link Field}.\n */\n toString() {\n return this.values.map((v) => v.includes(\",\") || v.includes(\" \") ? `\"${v}\"` : v).join(\", \");\n }\n /**\n * Get string values as a list\n *\n * @returns Values in {@link Field} as a list.\n */\n get() {\n return this.values;\n }\n};\n\n// src/Fields.ts\nvar Fields = class {\n constructor({ fields = [], encoding = \"utf-8\" }) {\n this.entries = {};\n fields.forEach(this.setField.bind(this));\n this.encoding = encoding;\n }\n static {\n __name(this, \"Fields\");\n }\n /**\n * Set entry for a {@link Field} name. The `name`\n * attribute will be used to key the collection.\n *\n * @param field The {@link Field} to set.\n */\n setField(field) {\n this.entries[field.name.toLowerCase()] = field;\n }\n /**\n * Retrieve {@link Field} entry by name.\n *\n * @param name The name of the {@link Field} entry\n * to retrieve\n * @returns The {@link Field} if it exists.\n */\n getField(name) {\n return this.entries[name.toLowerCase()];\n }\n /**\n * Delete entry from collection.\n *\n * @param name Name of the entry to delete.\n */\n removeField(name) {\n delete this.entries[name.toLowerCase()];\n }\n /**\n * Helper function for retrieving specific types of fields.\n * Used to grab all headers or all trailers.\n *\n * @param kind {@link FieldPosition} of entries to retrieve.\n * @returns The {@link Field} entries with the specified\n * {@link FieldPosition}.\n */\n getByType(kind) {\n return Object.values(this.entries).filter((field) => field.kind === kind);\n }\n};\n\n// src/httpRequest.ts\n\nvar HttpRequest = class _HttpRequest {\n static {\n __name(this, \"HttpRequest\");\n }\n constructor(options) {\n this.method = options.method || \"GET\";\n this.hostname = options.hostname || \"localhost\";\n this.port = options.port;\n this.query = options.query || {};\n this.headers = options.headers || {};\n this.body = options.body;\n this.protocol = options.protocol ? options.protocol.slice(-1) !== \":\" ? `${options.protocol}:` : options.protocol : \"https:\";\n this.path = options.path ? options.path.charAt(0) !== \"/\" ? `/${options.path}` : options.path : \"/\";\n this.username = options.username;\n this.password = options.password;\n this.fragment = options.fragment;\n }\n /**\n * Note: this does not deep-clone the body.\n */\n static clone(request) {\n const cloned = new _HttpRequest({\n ...request,\n headers: { ...request.headers }\n });\n if (cloned.query) {\n cloned.query = cloneQuery(cloned.query);\n }\n return cloned;\n }\n /**\n * This method only actually asserts that request is the interface {@link IHttpRequest},\n * and not necessarily this concrete class. Left in place for API stability.\n *\n * Do not call instance methods on the input of this function, and\n * do not assume it has the HttpRequest prototype.\n */\n static isInstance(request) {\n if (!request) {\n return false;\n }\n const req = request;\n return \"method\" in req && \"protocol\" in req && \"hostname\" in req && \"path\" in req && typeof req[\"query\"] === \"object\" && typeof req[\"headers\"] === \"object\";\n }\n /**\n * @deprecated use static HttpRequest.clone(request) instead. It's not safe to call\n * this method because {@link HttpRequest.isInstance} incorrectly\n * asserts that IHttpRequest (interface) objects are of type HttpRequest (class).\n */\n clone() {\n return _HttpRequest.clone(this);\n }\n};\nfunction cloneQuery(query) {\n return Object.keys(query).reduce((carry, paramName) => {\n const param = query[paramName];\n return {\n ...carry,\n [paramName]: Array.isArray(param) ? [...param] : param\n };\n }, {});\n}\n__name(cloneQuery, \"cloneQuery\");\n\n// src/httpResponse.ts\nvar HttpResponse = class {\n static {\n __name(this, \"HttpResponse\");\n }\n constructor(options) {\n this.statusCode = options.statusCode;\n this.reason = options.reason;\n this.headers = options.headers || {};\n this.body = options.body;\n }\n static isInstance(response) {\n if (!response)\n return false;\n const resp = response;\n return typeof resp.statusCode === \"number\" && typeof resp.headers === \"object\";\n }\n};\n\n// src/isValidHostname.ts\nfunction isValidHostname(hostname) {\n const hostPattern = /^[a-z0-9][a-z0-9\\.\\-]*[a-z0-9]$/;\n return hostPattern.test(hostname);\n}\n__name(isValidHostname, \"isValidHostname\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n getHttpHandlerExtensionConfiguration,\n resolveHttpHandlerRuntimeConfig,\n Field,\n Fields,\n HttpRequest,\n HttpResponse,\n isValidHostname\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n AlgorithmId: () => AlgorithmId,\n EndpointURLScheme: () => EndpointURLScheme,\n FieldPosition: () => FieldPosition,\n HttpApiKeyAuthLocation: () => HttpApiKeyAuthLocation,\n HttpAuthLocation: () => HttpAuthLocation,\n IniSectionType: () => IniSectionType,\n RequestHandlerProtocol: () => RequestHandlerProtocol,\n SMITHY_CONTEXT_KEY: () => SMITHY_CONTEXT_KEY,\n getDefaultClientConfiguration: () => getDefaultClientConfiguration,\n resolveDefaultRuntimeConfig: () => resolveDefaultRuntimeConfig\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/auth/auth.ts\nvar HttpAuthLocation = /* @__PURE__ */ ((HttpAuthLocation2) => {\n HttpAuthLocation2[\"HEADER\"] = \"header\";\n HttpAuthLocation2[\"QUERY\"] = \"query\";\n return HttpAuthLocation2;\n})(HttpAuthLocation || {});\n\n// src/auth/HttpApiKeyAuth.ts\nvar HttpApiKeyAuthLocation = /* @__PURE__ */ ((HttpApiKeyAuthLocation2) => {\n HttpApiKeyAuthLocation2[\"HEADER\"] = \"header\";\n HttpApiKeyAuthLocation2[\"QUERY\"] = \"query\";\n return HttpApiKeyAuthLocation2;\n})(HttpApiKeyAuthLocation || {});\n\n// src/endpoint.ts\nvar EndpointURLScheme = /* @__PURE__ */ ((EndpointURLScheme2) => {\n EndpointURLScheme2[\"HTTP\"] = \"http\";\n EndpointURLScheme2[\"HTTPS\"] = \"https\";\n return EndpointURLScheme2;\n})(EndpointURLScheme || {});\n\n// src/extensions/checksum.ts\nvar AlgorithmId = /* @__PURE__ */ ((AlgorithmId2) => {\n AlgorithmId2[\"MD5\"] = \"md5\";\n AlgorithmId2[\"CRC32\"] = \"crc32\";\n AlgorithmId2[\"CRC32C\"] = \"crc32c\";\n AlgorithmId2[\"SHA1\"] = \"sha1\";\n AlgorithmId2[\"SHA256\"] = \"sha256\";\n return AlgorithmId2;\n})(AlgorithmId || {});\nvar getChecksumConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {\n const checksumAlgorithms = [];\n if (runtimeConfig.sha256 !== void 0) {\n checksumAlgorithms.push({\n algorithmId: () => \"sha256\" /* SHA256 */,\n checksumConstructor: () => runtimeConfig.sha256\n });\n }\n if (runtimeConfig.md5 != void 0) {\n checksumAlgorithms.push({\n algorithmId: () => \"md5\" /* MD5 */,\n checksumConstructor: () => runtimeConfig.md5\n });\n }\n return {\n addChecksumAlgorithm(algo) {\n checksumAlgorithms.push(algo);\n },\n checksumAlgorithms() {\n return checksumAlgorithms;\n }\n };\n}, \"getChecksumConfiguration\");\nvar resolveChecksumRuntimeConfig = /* @__PURE__ */ __name((clientConfig) => {\n const runtimeConfig = {};\n clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => {\n runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor();\n });\n return runtimeConfig;\n}, \"resolveChecksumRuntimeConfig\");\n\n// src/extensions/defaultClientConfiguration.ts\nvar getDefaultClientConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {\n return getChecksumConfiguration(runtimeConfig);\n}, \"getDefaultClientConfiguration\");\nvar resolveDefaultRuntimeConfig = /* @__PURE__ */ __name((config) => {\n return resolveChecksumRuntimeConfig(config);\n}, \"resolveDefaultRuntimeConfig\");\n\n// src/http.ts\nvar FieldPosition = /* @__PURE__ */ ((FieldPosition2) => {\n FieldPosition2[FieldPosition2[\"HEADER\"] = 0] = \"HEADER\";\n FieldPosition2[FieldPosition2[\"TRAILER\"] = 1] = \"TRAILER\";\n return FieldPosition2;\n})(FieldPosition || {});\n\n// src/middleware.ts\nvar SMITHY_CONTEXT_KEY = \"__smithy_context\";\n\n// src/profile.ts\nvar IniSectionType = /* @__PURE__ */ ((IniSectionType2) => {\n IniSectionType2[\"PROFILE\"] = \"profile\";\n IniSectionType2[\"SSO_SESSION\"] = \"sso-session\";\n IniSectionType2[\"SERVICES\"] = \"services\";\n return IniSectionType2;\n})(IniSectionType || {});\n\n// src/transfer.ts\nvar RequestHandlerProtocol = /* @__PURE__ */ ((RequestHandlerProtocol2) => {\n RequestHandlerProtocol2[\"HTTP_0_9\"] = \"http/0.9\";\n RequestHandlerProtocol2[\"HTTP_1_0\"] = \"http/1.0\";\n RequestHandlerProtocol2[\"TDS_8_0\"] = \"tds/8.0\";\n return RequestHandlerProtocol2;\n})(RequestHandlerProtocol || {});\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n HttpAuthLocation,\n HttpApiKeyAuthLocation,\n EndpointURLScheme,\n AlgorithmId,\n getDefaultClientConfiguration,\n resolveDefaultRuntimeConfig,\n FieldPosition,\n SMITHY_CONTEXT_KEY,\n IniSectionType,\n RequestHandlerProtocol\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n buildQueryString: () => buildQueryString\n});\nmodule.exports = __toCommonJS(src_exports);\nvar import_util_uri_escape = require(\"@smithy/util-uri-escape\");\nfunction buildQueryString(query) {\n const parts = [];\n for (let key of Object.keys(query).sort()) {\n const value = query[key];\n key = (0, import_util_uri_escape.escapeUri)(key);\n if (Array.isArray(value)) {\n for (let i = 0, iLen = value.length; i < iLen; i++) {\n parts.push(`${key}=${(0, import_util_uri_escape.escapeUri)(value[i])}`);\n }\n } else {\n let qsEntry = key;\n if (value || typeof value === \"string\") {\n qsEntry += `=${(0, import_util_uri_escape.escapeUri)(value)}`;\n }\n parts.push(qsEntry);\n }\n }\n return parts.join(\"&\");\n}\n__name(buildQueryString, \"buildQueryString\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n buildQueryString\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n parseQueryString: () => parseQueryString\n});\nmodule.exports = __toCommonJS(src_exports);\nfunction parseQueryString(querystring) {\n const query = {};\n querystring = querystring.replace(/^\\?/, \"\");\n if (querystring) {\n for (const pair of querystring.split(\"&\")) {\n let [key, value = null] = pair.split(\"=\");\n key = decodeURIComponent(key);\n if (value) {\n value = decodeURIComponent(value);\n }\n if (!(key in query)) {\n query[key] = value;\n } else if (Array.isArray(query[key])) {\n query[key].push(value);\n } else {\n query[key] = [query[key], value];\n }\n }\n }\n return query;\n}\n__name(parseQueryString, \"parseQueryString\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n parseQueryString\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n isBrowserNetworkError: () => isBrowserNetworkError,\n isClockSkewCorrectedError: () => isClockSkewCorrectedError,\n isClockSkewError: () => isClockSkewError,\n isRetryableByTrait: () => isRetryableByTrait,\n isServerError: () => isServerError,\n isThrottlingError: () => isThrottlingError,\n isTransientError: () => isTransientError\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/constants.ts\nvar CLOCK_SKEW_ERROR_CODES = [\n \"AuthFailure\",\n \"InvalidSignatureException\",\n \"RequestExpired\",\n \"RequestInTheFuture\",\n \"RequestTimeTooSkewed\",\n \"SignatureDoesNotMatch\"\n];\nvar THROTTLING_ERROR_CODES = [\n \"BandwidthLimitExceeded\",\n \"EC2ThrottledException\",\n \"LimitExceededException\",\n \"PriorRequestNotComplete\",\n \"ProvisionedThroughputExceededException\",\n \"RequestLimitExceeded\",\n \"RequestThrottled\",\n \"RequestThrottledException\",\n \"SlowDown\",\n \"ThrottledException\",\n \"Throttling\",\n \"ThrottlingException\",\n \"TooManyRequestsException\",\n \"TransactionInProgressException\"\n // DynamoDB\n];\nvar TRANSIENT_ERROR_CODES = [\"TimeoutError\", \"RequestTimeout\", \"RequestTimeoutException\"];\nvar TRANSIENT_ERROR_STATUS_CODES = [500, 502, 503, 504];\nvar NODEJS_TIMEOUT_ERROR_CODES = [\"ECONNRESET\", \"ECONNREFUSED\", \"EPIPE\", \"ETIMEDOUT\"];\n\n// src/index.ts\nvar isRetryableByTrait = /* @__PURE__ */ __name((error) => error.$retryable !== void 0, \"isRetryableByTrait\");\nvar isClockSkewError = /* @__PURE__ */ __name((error) => CLOCK_SKEW_ERROR_CODES.includes(error.name), \"isClockSkewError\");\nvar isClockSkewCorrectedError = /* @__PURE__ */ __name((error) => error.$metadata?.clockSkewCorrected, \"isClockSkewCorrectedError\");\nvar isBrowserNetworkError = /* @__PURE__ */ __name((error) => {\n const errorMessages = /* @__PURE__ */ new Set([\n \"Failed to fetch\",\n // Chrome\n \"NetworkError when attempting to fetch resource\",\n // Firefox\n \"The Internet connection appears to be offline\",\n // Safari 16\n \"Load failed\",\n // Safari 17+\n \"Network request failed\"\n // `cross-fetch`\n ]);\n const isValid = error && error instanceof TypeError;\n if (!isValid) {\n return false;\n }\n return errorMessages.has(error.message);\n}, \"isBrowserNetworkError\");\nvar isThrottlingError = /* @__PURE__ */ __name((error) => error.$metadata?.httpStatusCode === 429 || THROTTLING_ERROR_CODES.includes(error.name) || error.$retryable?.throttling == true, \"isThrottlingError\");\nvar isTransientError = /* @__PURE__ */ __name((error, depth = 0) => isClockSkewCorrectedError(error) || TRANSIENT_ERROR_CODES.includes(error.name) || NODEJS_TIMEOUT_ERROR_CODES.includes(error?.code || \"\") || TRANSIENT_ERROR_STATUS_CODES.includes(error.$metadata?.httpStatusCode || 0) || isBrowserNetworkError(error) || error.cause !== void 0 && depth <= 10 && isTransientError(error.cause, depth + 1), \"isTransientError\");\nvar isServerError = /* @__PURE__ */ __name((error) => {\n if (error.$metadata?.httpStatusCode !== void 0) {\n const statusCode = error.$metadata.httpStatusCode;\n if (500 <= statusCode && statusCode <= 599 && !isTransientError(error)) {\n return true;\n }\n return false;\n }\n return false;\n}, \"isServerError\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n isRetryableByTrait,\n isClockSkewError,\n isClockSkewCorrectedError,\n isBrowserNetworkError,\n isThrottlingError,\n isTransientError,\n isServerError\n});\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getHomeDir = void 0;\nconst os_1 = require(\"os\");\nconst path_1 = require(\"path\");\nconst homeDirCache = {};\nconst getHomeDirCacheKey = () => {\n if (process && process.geteuid) {\n return `${process.geteuid()}`;\n }\n return \"DEFAULT\";\n};\nconst getHomeDir = () => {\n const { HOME, USERPROFILE, HOMEPATH, HOMEDRIVE = `C:${path_1.sep}` } = process.env;\n if (HOME)\n return HOME;\n if (USERPROFILE)\n return USERPROFILE;\n if (HOMEPATH)\n return `${HOMEDRIVE}${HOMEPATH}`;\n const homeDirCacheKey = getHomeDirCacheKey();\n if (!homeDirCache[homeDirCacheKey])\n homeDirCache[homeDirCacheKey] = (0, os_1.homedir)();\n return homeDirCache[homeDirCacheKey];\n};\nexports.getHomeDir = getHomeDir;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getSSOTokenFilepath = void 0;\nconst crypto_1 = require(\"crypto\");\nconst path_1 = require(\"path\");\nconst getHomeDir_1 = require(\"./getHomeDir\");\nconst getSSOTokenFilepath = (id) => {\n const hasher = (0, crypto_1.createHash)(\"sha1\");\n const cacheName = hasher.update(id).digest(\"hex\");\n return (0, path_1.join)((0, getHomeDir_1.getHomeDir)(), \".aws\", \"sso\", \"cache\", `${cacheName}.json`);\n};\nexports.getSSOTokenFilepath = getSSOTokenFilepath;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getSSOTokenFromFile = void 0;\nconst fs_1 = require(\"fs\");\nconst getSSOTokenFilepath_1 = require(\"./getSSOTokenFilepath\");\nconst { readFile } = fs_1.promises;\nconst getSSOTokenFromFile = async (id) => {\n const ssoTokenFilepath = (0, getSSOTokenFilepath_1.getSSOTokenFilepath)(id);\n const ssoTokenText = await readFile(ssoTokenFilepath, \"utf8\");\n return JSON.parse(ssoTokenText);\n};\nexports.getSSOTokenFromFile = getSSOTokenFromFile;\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n CONFIG_PREFIX_SEPARATOR: () => CONFIG_PREFIX_SEPARATOR,\n DEFAULT_PROFILE: () => DEFAULT_PROFILE,\n ENV_PROFILE: () => ENV_PROFILE,\n getProfileName: () => getProfileName,\n loadSharedConfigFiles: () => loadSharedConfigFiles,\n loadSsoSessionData: () => loadSsoSessionData,\n parseKnownFiles: () => parseKnownFiles\n});\nmodule.exports = __toCommonJS(src_exports);\n__reExport(src_exports, require(\"././getHomeDir\"), module.exports);\n\n// src/getProfileName.ts\nvar ENV_PROFILE = \"AWS_PROFILE\";\nvar DEFAULT_PROFILE = \"default\";\nvar getProfileName = /* @__PURE__ */ __name((init) => init.profile || process.env[ENV_PROFILE] || DEFAULT_PROFILE, \"getProfileName\");\n\n// src/index.ts\n__reExport(src_exports, require(\"././getSSOTokenFilepath\"), module.exports);\n__reExport(src_exports, require(\"././getSSOTokenFromFile\"), module.exports);\n\n// src/loadSharedConfigFiles.ts\n\n\n// src/getConfigData.ts\nvar import_types = require(\"@smithy/types\");\nvar getConfigData = /* @__PURE__ */ __name((data) => Object.entries(data).filter(([key]) => {\n const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR);\n if (indexOfSeparator === -1) {\n return false;\n }\n return Object.values(import_types.IniSectionType).includes(key.substring(0, indexOfSeparator));\n}).reduce(\n (acc, [key, value]) => {\n const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR);\n const updatedKey = key.substring(0, indexOfSeparator) === import_types.IniSectionType.PROFILE ? key.substring(indexOfSeparator + 1) : key;\n acc[updatedKey] = value;\n return acc;\n },\n {\n // Populate default profile, if present.\n ...data.default && { default: data.default }\n }\n), \"getConfigData\");\n\n// src/getConfigFilepath.ts\nvar import_path = require(\"path\");\nvar import_getHomeDir = require(\"././getHomeDir\");\nvar ENV_CONFIG_PATH = \"AWS_CONFIG_FILE\";\nvar getConfigFilepath = /* @__PURE__ */ __name(() => process.env[ENV_CONFIG_PATH] || (0, import_path.join)((0, import_getHomeDir.getHomeDir)(), \".aws\", \"config\"), \"getConfigFilepath\");\n\n// src/getCredentialsFilepath.ts\n\nvar import_getHomeDir2 = require(\"././getHomeDir\");\nvar ENV_CREDENTIALS_PATH = \"AWS_SHARED_CREDENTIALS_FILE\";\nvar getCredentialsFilepath = /* @__PURE__ */ __name(() => process.env[ENV_CREDENTIALS_PATH] || (0, import_path.join)((0, import_getHomeDir2.getHomeDir)(), \".aws\", \"credentials\"), \"getCredentialsFilepath\");\n\n// src/loadSharedConfigFiles.ts\nvar import_getHomeDir3 = require(\"././getHomeDir\");\n\n// src/parseIni.ts\n\nvar prefixKeyRegex = /^([\\w-]+)\\s([\"'])?([\\w-@\\+\\.%:/]+)\\2$/;\nvar profileNameBlockList = [\"__proto__\", \"profile __proto__\"];\nvar parseIni = /* @__PURE__ */ __name((iniData) => {\n const map = {};\n let currentSection;\n let currentSubSection;\n for (const iniLine of iniData.split(/\\r?\\n/)) {\n const trimmedLine = iniLine.split(/(^|\\s)[;#]/)[0].trim();\n const isSection = trimmedLine[0] === \"[\" && trimmedLine[trimmedLine.length - 1] === \"]\";\n if (isSection) {\n currentSection = void 0;\n currentSubSection = void 0;\n const sectionName = trimmedLine.substring(1, trimmedLine.length - 1);\n const matches = prefixKeyRegex.exec(sectionName);\n if (matches) {\n const [, prefix, , name] = matches;\n if (Object.values(import_types.IniSectionType).includes(prefix)) {\n currentSection = [prefix, name].join(CONFIG_PREFIX_SEPARATOR);\n }\n } else {\n currentSection = sectionName;\n }\n if (profileNameBlockList.includes(sectionName)) {\n throw new Error(`Found invalid profile name \"${sectionName}\"`);\n }\n } else if (currentSection) {\n const indexOfEqualsSign = trimmedLine.indexOf(\"=\");\n if (![0, -1].includes(indexOfEqualsSign)) {\n const [name, value] = [\n trimmedLine.substring(0, indexOfEqualsSign).trim(),\n trimmedLine.substring(indexOfEqualsSign + 1).trim()\n ];\n if (value === \"\") {\n currentSubSection = name;\n } else {\n if (currentSubSection && iniLine.trimStart() === iniLine) {\n currentSubSection = void 0;\n }\n map[currentSection] = map[currentSection] || {};\n const key = currentSubSection ? [currentSubSection, name].join(CONFIG_PREFIX_SEPARATOR) : name;\n map[currentSection][key] = value;\n }\n }\n }\n }\n return map;\n}, \"parseIni\");\n\n// src/loadSharedConfigFiles.ts\nvar import_slurpFile = require(\"././slurpFile\");\nvar swallowError = /* @__PURE__ */ __name(() => ({}), \"swallowError\");\nvar CONFIG_PREFIX_SEPARATOR = \".\";\nvar loadSharedConfigFiles = /* @__PURE__ */ __name(async (init = {}) => {\n const { filepath = getCredentialsFilepath(), configFilepath = getConfigFilepath() } = init;\n const homeDir = (0, import_getHomeDir3.getHomeDir)();\n const relativeHomeDirPrefix = \"~/\";\n let resolvedFilepath = filepath;\n if (filepath.startsWith(relativeHomeDirPrefix)) {\n resolvedFilepath = (0, import_path.join)(homeDir, filepath.slice(2));\n }\n let resolvedConfigFilepath = configFilepath;\n if (configFilepath.startsWith(relativeHomeDirPrefix)) {\n resolvedConfigFilepath = (0, import_path.join)(homeDir, configFilepath.slice(2));\n }\n const parsedFiles = await Promise.all([\n (0, import_slurpFile.slurpFile)(resolvedConfigFilepath, {\n ignoreCache: init.ignoreCache\n }).then(parseIni).then(getConfigData).catch(swallowError),\n (0, import_slurpFile.slurpFile)(resolvedFilepath, {\n ignoreCache: init.ignoreCache\n }).then(parseIni).catch(swallowError)\n ]);\n return {\n configFile: parsedFiles[0],\n credentialsFile: parsedFiles[1]\n };\n}, \"loadSharedConfigFiles\");\n\n// src/getSsoSessionData.ts\n\nvar getSsoSessionData = /* @__PURE__ */ __name((data) => Object.entries(data).filter(([key]) => key.startsWith(import_types.IniSectionType.SSO_SESSION + CONFIG_PREFIX_SEPARATOR)).reduce((acc, [key, value]) => ({ ...acc, [key.substring(key.indexOf(CONFIG_PREFIX_SEPARATOR) + 1)]: value }), {}), \"getSsoSessionData\");\n\n// src/loadSsoSessionData.ts\nvar import_slurpFile2 = require(\"././slurpFile\");\nvar swallowError2 = /* @__PURE__ */ __name(() => ({}), \"swallowError\");\nvar loadSsoSessionData = /* @__PURE__ */ __name(async (init = {}) => (0, import_slurpFile2.slurpFile)(init.configFilepath ?? getConfigFilepath()).then(parseIni).then(getSsoSessionData).catch(swallowError2), \"loadSsoSessionData\");\n\n// src/mergeConfigFiles.ts\nvar mergeConfigFiles = /* @__PURE__ */ __name((...files) => {\n const merged = {};\n for (const file of files) {\n for (const [key, values] of Object.entries(file)) {\n if (merged[key] !== void 0) {\n Object.assign(merged[key], values);\n } else {\n merged[key] = values;\n }\n }\n }\n return merged;\n}, \"mergeConfigFiles\");\n\n// src/parseKnownFiles.ts\nvar parseKnownFiles = /* @__PURE__ */ __name(async (init) => {\n const parsedFiles = await loadSharedConfigFiles(init);\n return mergeConfigFiles(parsedFiles.configFile, parsedFiles.credentialsFile);\n}, \"parseKnownFiles\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n getHomeDir,\n ENV_PROFILE,\n DEFAULT_PROFILE,\n getProfileName,\n getSSOTokenFilepath,\n getSSOTokenFromFile,\n CONFIG_PREFIX_SEPARATOR,\n loadSharedConfigFiles,\n loadSsoSessionData,\n parseKnownFiles\n});\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.slurpFile = void 0;\nconst fs_1 = require(\"fs\");\nconst { readFile } = fs_1.promises;\nconst filePromisesHash = {};\nconst slurpFile = (path, options) => {\n if (!filePromisesHash[path] || (options === null || options === void 0 ? void 0 : options.ignoreCache)) {\n filePromisesHash[path] = readFile(path, \"utf8\");\n }\n return filePromisesHash[path];\n};\nexports.slurpFile = slurpFile;\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n AlgorithmId: () => AlgorithmId,\n EndpointURLScheme: () => EndpointURLScheme,\n FieldPosition: () => FieldPosition,\n HttpApiKeyAuthLocation: () => HttpApiKeyAuthLocation,\n HttpAuthLocation: () => HttpAuthLocation,\n IniSectionType: () => IniSectionType,\n RequestHandlerProtocol: () => RequestHandlerProtocol,\n SMITHY_CONTEXT_KEY: () => SMITHY_CONTEXT_KEY,\n getDefaultClientConfiguration: () => getDefaultClientConfiguration,\n resolveDefaultRuntimeConfig: () => resolveDefaultRuntimeConfig\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/auth/auth.ts\nvar HttpAuthLocation = /* @__PURE__ */ ((HttpAuthLocation2) => {\n HttpAuthLocation2[\"HEADER\"] = \"header\";\n HttpAuthLocation2[\"QUERY\"] = \"query\";\n return HttpAuthLocation2;\n})(HttpAuthLocation || {});\n\n// src/auth/HttpApiKeyAuth.ts\nvar HttpApiKeyAuthLocation = /* @__PURE__ */ ((HttpApiKeyAuthLocation2) => {\n HttpApiKeyAuthLocation2[\"HEADER\"] = \"header\";\n HttpApiKeyAuthLocation2[\"QUERY\"] = \"query\";\n return HttpApiKeyAuthLocation2;\n})(HttpApiKeyAuthLocation || {});\n\n// src/endpoint.ts\nvar EndpointURLScheme = /* @__PURE__ */ ((EndpointURLScheme2) => {\n EndpointURLScheme2[\"HTTP\"] = \"http\";\n EndpointURLScheme2[\"HTTPS\"] = \"https\";\n return EndpointURLScheme2;\n})(EndpointURLScheme || {});\n\n// src/extensions/checksum.ts\nvar AlgorithmId = /* @__PURE__ */ ((AlgorithmId2) => {\n AlgorithmId2[\"MD5\"] = \"md5\";\n AlgorithmId2[\"CRC32\"] = \"crc32\";\n AlgorithmId2[\"CRC32C\"] = \"crc32c\";\n AlgorithmId2[\"SHA1\"] = \"sha1\";\n AlgorithmId2[\"SHA256\"] = \"sha256\";\n return AlgorithmId2;\n})(AlgorithmId || {});\nvar getChecksumConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {\n const checksumAlgorithms = [];\n if (runtimeConfig.sha256 !== void 0) {\n checksumAlgorithms.push({\n algorithmId: () => \"sha256\" /* SHA256 */,\n checksumConstructor: () => runtimeConfig.sha256\n });\n }\n if (runtimeConfig.md5 != void 0) {\n checksumAlgorithms.push({\n algorithmId: () => \"md5\" /* MD5 */,\n checksumConstructor: () => runtimeConfig.md5\n });\n }\n return {\n addChecksumAlgorithm(algo) {\n checksumAlgorithms.push(algo);\n },\n checksumAlgorithms() {\n return checksumAlgorithms;\n }\n };\n}, \"getChecksumConfiguration\");\nvar resolveChecksumRuntimeConfig = /* @__PURE__ */ __name((clientConfig) => {\n const runtimeConfig = {};\n clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => {\n runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor();\n });\n return runtimeConfig;\n}, \"resolveChecksumRuntimeConfig\");\n\n// src/extensions/defaultClientConfiguration.ts\nvar getDefaultClientConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {\n return getChecksumConfiguration(runtimeConfig);\n}, \"getDefaultClientConfiguration\");\nvar resolveDefaultRuntimeConfig = /* @__PURE__ */ __name((config) => {\n return resolveChecksumRuntimeConfig(config);\n}, \"resolveDefaultRuntimeConfig\");\n\n// src/http.ts\nvar FieldPosition = /* @__PURE__ */ ((FieldPosition2) => {\n FieldPosition2[FieldPosition2[\"HEADER\"] = 0] = \"HEADER\";\n FieldPosition2[FieldPosition2[\"TRAILER\"] = 1] = \"TRAILER\";\n return FieldPosition2;\n})(FieldPosition || {});\n\n// src/middleware.ts\nvar SMITHY_CONTEXT_KEY = \"__smithy_context\";\n\n// src/profile.ts\nvar IniSectionType = /* @__PURE__ */ ((IniSectionType2) => {\n IniSectionType2[\"PROFILE\"] = \"profile\";\n IniSectionType2[\"SSO_SESSION\"] = \"sso-session\";\n IniSectionType2[\"SERVICES\"] = \"services\";\n return IniSectionType2;\n})(IniSectionType || {});\n\n// src/transfer.ts\nvar RequestHandlerProtocol = /* @__PURE__ */ ((RequestHandlerProtocol2) => {\n RequestHandlerProtocol2[\"HTTP_0_9\"] = \"http/0.9\";\n RequestHandlerProtocol2[\"HTTP_1_0\"] = \"http/1.0\";\n RequestHandlerProtocol2[\"TDS_8_0\"] = \"tds/8.0\";\n return RequestHandlerProtocol2;\n})(RequestHandlerProtocol || {});\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n HttpAuthLocation,\n HttpApiKeyAuthLocation,\n EndpointURLScheme,\n AlgorithmId,\n getDefaultClientConfiguration,\n resolveDefaultRuntimeConfig,\n FieldPosition,\n SMITHY_CONTEXT_KEY,\n IniSectionType,\n RequestHandlerProtocol\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n ALGORITHM_IDENTIFIER: () => ALGORITHM_IDENTIFIER,\n ALGORITHM_IDENTIFIER_V4A: () => ALGORITHM_IDENTIFIER_V4A,\n ALGORITHM_QUERY_PARAM: () => ALGORITHM_QUERY_PARAM,\n ALWAYS_UNSIGNABLE_HEADERS: () => ALWAYS_UNSIGNABLE_HEADERS,\n AMZ_DATE_HEADER: () => AMZ_DATE_HEADER,\n AMZ_DATE_QUERY_PARAM: () => AMZ_DATE_QUERY_PARAM,\n AUTH_HEADER: () => AUTH_HEADER,\n CREDENTIAL_QUERY_PARAM: () => CREDENTIAL_QUERY_PARAM,\n DATE_HEADER: () => DATE_HEADER,\n EVENT_ALGORITHM_IDENTIFIER: () => EVENT_ALGORITHM_IDENTIFIER,\n EXPIRES_QUERY_PARAM: () => EXPIRES_QUERY_PARAM,\n GENERATED_HEADERS: () => GENERATED_HEADERS,\n HOST_HEADER: () => HOST_HEADER,\n KEY_TYPE_IDENTIFIER: () => KEY_TYPE_IDENTIFIER,\n MAX_CACHE_SIZE: () => MAX_CACHE_SIZE,\n MAX_PRESIGNED_TTL: () => MAX_PRESIGNED_TTL,\n PROXY_HEADER_PATTERN: () => PROXY_HEADER_PATTERN,\n REGION_SET_PARAM: () => REGION_SET_PARAM,\n SEC_HEADER_PATTERN: () => SEC_HEADER_PATTERN,\n SHA256_HEADER: () => SHA256_HEADER,\n SIGNATURE_HEADER: () => SIGNATURE_HEADER,\n SIGNATURE_QUERY_PARAM: () => SIGNATURE_QUERY_PARAM,\n SIGNED_HEADERS_QUERY_PARAM: () => SIGNED_HEADERS_QUERY_PARAM,\n SignatureV4: () => SignatureV4,\n SignatureV4Base: () => SignatureV4Base,\n TOKEN_HEADER: () => TOKEN_HEADER,\n TOKEN_QUERY_PARAM: () => TOKEN_QUERY_PARAM,\n UNSIGNABLE_PATTERNS: () => UNSIGNABLE_PATTERNS,\n UNSIGNED_PAYLOAD: () => UNSIGNED_PAYLOAD,\n clearCredentialCache: () => clearCredentialCache,\n createScope: () => createScope,\n getCanonicalHeaders: () => getCanonicalHeaders,\n getCanonicalQuery: () => getCanonicalQuery,\n getPayloadHash: () => getPayloadHash,\n getSigningKey: () => getSigningKey,\n hasHeader: () => hasHeader,\n moveHeadersToQuery: () => moveHeadersToQuery,\n prepareRequest: () => prepareRequest,\n signatureV4aContainer: () => signatureV4aContainer\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/SignatureV4.ts\n\nvar import_util_utf85 = require(\"@smithy/util-utf8\");\n\n// src/constants.ts\nvar ALGORITHM_QUERY_PARAM = \"X-Amz-Algorithm\";\nvar CREDENTIAL_QUERY_PARAM = \"X-Amz-Credential\";\nvar AMZ_DATE_QUERY_PARAM = \"X-Amz-Date\";\nvar SIGNED_HEADERS_QUERY_PARAM = \"X-Amz-SignedHeaders\";\nvar EXPIRES_QUERY_PARAM = \"X-Amz-Expires\";\nvar SIGNATURE_QUERY_PARAM = \"X-Amz-Signature\";\nvar TOKEN_QUERY_PARAM = \"X-Amz-Security-Token\";\nvar REGION_SET_PARAM = \"X-Amz-Region-Set\";\nvar AUTH_HEADER = \"authorization\";\nvar AMZ_DATE_HEADER = AMZ_DATE_QUERY_PARAM.toLowerCase();\nvar DATE_HEADER = \"date\";\nvar GENERATED_HEADERS = [AUTH_HEADER, AMZ_DATE_HEADER, DATE_HEADER];\nvar SIGNATURE_HEADER = SIGNATURE_QUERY_PARAM.toLowerCase();\nvar SHA256_HEADER = \"x-amz-content-sha256\";\nvar TOKEN_HEADER = TOKEN_QUERY_PARAM.toLowerCase();\nvar HOST_HEADER = \"host\";\nvar ALWAYS_UNSIGNABLE_HEADERS = {\n authorization: true,\n \"cache-control\": true,\n connection: true,\n expect: true,\n from: true,\n \"keep-alive\": true,\n \"max-forwards\": true,\n pragma: true,\n referer: true,\n te: true,\n trailer: true,\n \"transfer-encoding\": true,\n upgrade: true,\n \"user-agent\": true,\n \"x-amzn-trace-id\": true\n};\nvar PROXY_HEADER_PATTERN = /^proxy-/;\nvar SEC_HEADER_PATTERN = /^sec-/;\nvar UNSIGNABLE_PATTERNS = [/^proxy-/i, /^sec-/i];\nvar ALGORITHM_IDENTIFIER = \"AWS4-HMAC-SHA256\";\nvar ALGORITHM_IDENTIFIER_V4A = \"AWS4-ECDSA-P256-SHA256\";\nvar EVENT_ALGORITHM_IDENTIFIER = \"AWS4-HMAC-SHA256-PAYLOAD\";\nvar UNSIGNED_PAYLOAD = \"UNSIGNED-PAYLOAD\";\nvar MAX_CACHE_SIZE = 50;\nvar KEY_TYPE_IDENTIFIER = \"aws4_request\";\nvar MAX_PRESIGNED_TTL = 60 * 60 * 24 * 7;\n\n// src/credentialDerivation.ts\nvar import_util_hex_encoding = require(\"@smithy/util-hex-encoding\");\nvar import_util_utf8 = require(\"@smithy/util-utf8\");\nvar signingKeyCache = {};\nvar cacheQueue = [];\nvar createScope = /* @__PURE__ */ __name((shortDate, region, service) => `${shortDate}/${region}/${service}/${KEY_TYPE_IDENTIFIER}`, \"createScope\");\nvar getSigningKey = /* @__PURE__ */ __name(async (sha256Constructor, credentials, shortDate, region, service) => {\n const credsHash = await hmac(sha256Constructor, credentials.secretAccessKey, credentials.accessKeyId);\n const cacheKey = `${shortDate}:${region}:${service}:${(0, import_util_hex_encoding.toHex)(credsHash)}:${credentials.sessionToken}`;\n if (cacheKey in signingKeyCache) {\n return signingKeyCache[cacheKey];\n }\n cacheQueue.push(cacheKey);\n while (cacheQueue.length > MAX_CACHE_SIZE) {\n delete signingKeyCache[cacheQueue.shift()];\n }\n let key = `AWS4${credentials.secretAccessKey}`;\n for (const signable of [shortDate, region, service, KEY_TYPE_IDENTIFIER]) {\n key = await hmac(sha256Constructor, key, signable);\n }\n return signingKeyCache[cacheKey] = key;\n}, \"getSigningKey\");\nvar clearCredentialCache = /* @__PURE__ */ __name(() => {\n cacheQueue.length = 0;\n Object.keys(signingKeyCache).forEach((cacheKey) => {\n delete signingKeyCache[cacheKey];\n });\n}, \"clearCredentialCache\");\nvar hmac = /* @__PURE__ */ __name((ctor, secret, data) => {\n const hash = new ctor(secret);\n hash.update((0, import_util_utf8.toUint8Array)(data));\n return hash.digest();\n}, \"hmac\");\n\n// src/getCanonicalHeaders.ts\nvar getCanonicalHeaders = /* @__PURE__ */ __name(({ headers }, unsignableHeaders, signableHeaders) => {\n const canonical = {};\n for (const headerName of Object.keys(headers).sort()) {\n if (headers[headerName] == void 0) {\n continue;\n }\n const canonicalHeaderName = headerName.toLowerCase();\n if (canonicalHeaderName in ALWAYS_UNSIGNABLE_HEADERS || unsignableHeaders?.has(canonicalHeaderName) || PROXY_HEADER_PATTERN.test(canonicalHeaderName) || SEC_HEADER_PATTERN.test(canonicalHeaderName)) {\n if (!signableHeaders || signableHeaders && !signableHeaders.has(canonicalHeaderName)) {\n continue;\n }\n }\n canonical[canonicalHeaderName] = headers[headerName].trim().replace(/\\s+/g, \" \");\n }\n return canonical;\n}, \"getCanonicalHeaders\");\n\n// src/getPayloadHash.ts\nvar import_is_array_buffer = require(\"@smithy/is-array-buffer\");\n\nvar import_util_utf82 = require(\"@smithy/util-utf8\");\nvar getPayloadHash = /* @__PURE__ */ __name(async ({ headers, body }, hashConstructor) => {\n for (const headerName of Object.keys(headers)) {\n if (headerName.toLowerCase() === SHA256_HEADER) {\n return headers[headerName];\n }\n }\n if (body == void 0) {\n return \"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\";\n } else if (typeof body === \"string\" || ArrayBuffer.isView(body) || (0, import_is_array_buffer.isArrayBuffer)(body)) {\n const hashCtor = new hashConstructor();\n hashCtor.update((0, import_util_utf82.toUint8Array)(body));\n return (0, import_util_hex_encoding.toHex)(await hashCtor.digest());\n }\n return UNSIGNED_PAYLOAD;\n}, \"getPayloadHash\");\n\n// src/HeaderFormatter.ts\n\nvar import_util_utf83 = require(\"@smithy/util-utf8\");\nvar HeaderFormatter = class {\n static {\n __name(this, \"HeaderFormatter\");\n }\n format(headers) {\n const chunks = [];\n for (const headerName of Object.keys(headers)) {\n const bytes = (0, import_util_utf83.fromUtf8)(headerName);\n chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName]));\n }\n const out = new Uint8Array(chunks.reduce((carry, bytes) => carry + bytes.byteLength, 0));\n let position = 0;\n for (const chunk of chunks) {\n out.set(chunk, position);\n position += chunk.byteLength;\n }\n return out;\n }\n formatHeaderValue(header) {\n switch (header.type) {\n case \"boolean\":\n return Uint8Array.from([header.value ? 0 /* boolTrue */ : 1 /* boolFalse */]);\n case \"byte\":\n return Uint8Array.from([2 /* byte */, header.value]);\n case \"short\":\n const shortView = new DataView(new ArrayBuffer(3));\n shortView.setUint8(0, 3 /* short */);\n shortView.setInt16(1, header.value, false);\n return new Uint8Array(shortView.buffer);\n case \"integer\":\n const intView = new DataView(new ArrayBuffer(5));\n intView.setUint8(0, 4 /* integer */);\n intView.setInt32(1, header.value, false);\n return new Uint8Array(intView.buffer);\n case \"long\":\n const longBytes = new Uint8Array(9);\n longBytes[0] = 5 /* long */;\n longBytes.set(header.value.bytes, 1);\n return longBytes;\n case \"binary\":\n const binView = new DataView(new ArrayBuffer(3 + header.value.byteLength));\n binView.setUint8(0, 6 /* byteArray */);\n binView.setUint16(1, header.value.byteLength, false);\n const binBytes = new Uint8Array(binView.buffer);\n binBytes.set(header.value, 3);\n return binBytes;\n case \"string\":\n const utf8Bytes = (0, import_util_utf83.fromUtf8)(header.value);\n const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength));\n strView.setUint8(0, 7 /* string */);\n strView.setUint16(1, utf8Bytes.byteLength, false);\n const strBytes = new Uint8Array(strView.buffer);\n strBytes.set(utf8Bytes, 3);\n return strBytes;\n case \"timestamp\":\n const tsBytes = new Uint8Array(9);\n tsBytes[0] = 8 /* timestamp */;\n tsBytes.set(Int64.fromNumber(header.value.valueOf()).bytes, 1);\n return tsBytes;\n case \"uuid\":\n if (!UUID_PATTERN.test(header.value)) {\n throw new Error(`Invalid UUID received: ${header.value}`);\n }\n const uuidBytes = new Uint8Array(17);\n uuidBytes[0] = 9 /* uuid */;\n uuidBytes.set((0, import_util_hex_encoding.fromHex)(header.value.replace(/\\-/g, \"\")), 1);\n return uuidBytes;\n }\n }\n};\nvar UUID_PATTERN = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;\nvar Int64 = class _Int64 {\n constructor(bytes) {\n this.bytes = bytes;\n if (bytes.byteLength !== 8) {\n throw new Error(\"Int64 buffers must be exactly 8 bytes\");\n }\n }\n static {\n __name(this, \"Int64\");\n }\n static fromNumber(number) {\n if (number > 9223372036854776e3 || number < -9223372036854776e3) {\n throw new Error(`${number} is too large (or, if negative, too small) to represent as an Int64`);\n }\n const bytes = new Uint8Array(8);\n for (let i = 7, remaining = Math.abs(Math.round(number)); i > -1 && remaining > 0; i--, remaining /= 256) {\n bytes[i] = remaining;\n }\n if (number < 0) {\n negate(bytes);\n }\n return new _Int64(bytes);\n }\n /**\n * Called implicitly by infix arithmetic operators.\n */\n valueOf() {\n const bytes = this.bytes.slice(0);\n const negative = bytes[0] & 128;\n if (negative) {\n negate(bytes);\n }\n return parseInt((0, import_util_hex_encoding.toHex)(bytes), 16) * (negative ? -1 : 1);\n }\n toString() {\n return String(this.valueOf());\n }\n};\nfunction negate(bytes) {\n for (let i = 0; i < 8; i++) {\n bytes[i] ^= 255;\n }\n for (let i = 7; i > -1; i--) {\n bytes[i]++;\n if (bytes[i] !== 0)\n break;\n }\n}\n__name(negate, \"negate\");\n\n// src/headerUtil.ts\nvar hasHeader = /* @__PURE__ */ __name((soughtHeader, headers) => {\n soughtHeader = soughtHeader.toLowerCase();\n for (const headerName of Object.keys(headers)) {\n if (soughtHeader === headerName.toLowerCase()) {\n return true;\n }\n }\n return false;\n}, \"hasHeader\");\n\n// src/moveHeadersToQuery.ts\nvar import_protocol_http = require(\"@smithy/protocol-http\");\nvar moveHeadersToQuery = /* @__PURE__ */ __name((request, options = {}) => {\n const { headers, query = {} } = import_protocol_http.HttpRequest.clone(request);\n for (const name of Object.keys(headers)) {\n const lname = name.toLowerCase();\n if (lname.slice(0, 6) === \"x-amz-\" && !options.unhoistableHeaders?.has(lname) || options.hoistableHeaders?.has(lname)) {\n query[name] = headers[name];\n delete headers[name];\n }\n }\n return {\n ...request,\n headers,\n query\n };\n}, \"moveHeadersToQuery\");\n\n// src/prepareRequest.ts\n\nvar prepareRequest = /* @__PURE__ */ __name((request) => {\n request = import_protocol_http.HttpRequest.clone(request);\n for (const headerName of Object.keys(request.headers)) {\n if (GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) {\n delete request.headers[headerName];\n }\n }\n return request;\n}, \"prepareRequest\");\n\n// src/SignatureV4Base.ts\n\nvar import_util_middleware = require(\"@smithy/util-middleware\");\n\nvar import_util_utf84 = require(\"@smithy/util-utf8\");\n\n// src/getCanonicalQuery.ts\nvar import_util_uri_escape = require(\"@smithy/util-uri-escape\");\nvar getCanonicalQuery = /* @__PURE__ */ __name(({ query = {} }) => {\n const keys = [];\n const serialized = {};\n for (const key of Object.keys(query)) {\n if (key.toLowerCase() === SIGNATURE_HEADER) {\n continue;\n }\n const encodedKey = (0, import_util_uri_escape.escapeUri)(key);\n keys.push(encodedKey);\n const value = query[key];\n if (typeof value === \"string\") {\n serialized[encodedKey] = `${encodedKey}=${(0, import_util_uri_escape.escapeUri)(value)}`;\n } else if (Array.isArray(value)) {\n serialized[encodedKey] = value.slice(0).reduce((encoded, value2) => encoded.concat([`${encodedKey}=${(0, import_util_uri_escape.escapeUri)(value2)}`]), []).sort().join(\"&\");\n }\n }\n return keys.sort().map((key) => serialized[key]).filter((serialized2) => serialized2).join(\"&\");\n}, \"getCanonicalQuery\");\n\n// src/utilDate.ts\nvar iso8601 = /* @__PURE__ */ __name((time) => toDate(time).toISOString().replace(/\\.\\d{3}Z$/, \"Z\"), \"iso8601\");\nvar toDate = /* @__PURE__ */ __name((time) => {\n if (typeof time === \"number\") {\n return new Date(time * 1e3);\n }\n if (typeof time === \"string\") {\n if (Number(time)) {\n return new Date(Number(time) * 1e3);\n }\n return new Date(time);\n }\n return time;\n}, \"toDate\");\n\n// src/SignatureV4Base.ts\nvar SignatureV4Base = class {\n static {\n __name(this, \"SignatureV4Base\");\n }\n constructor({\n applyChecksum,\n credentials,\n region,\n service,\n sha256,\n uriEscapePath = true\n }) {\n this.service = service;\n this.sha256 = sha256;\n this.uriEscapePath = uriEscapePath;\n this.applyChecksum = typeof applyChecksum === \"boolean\" ? applyChecksum : true;\n this.regionProvider = (0, import_util_middleware.normalizeProvider)(region);\n this.credentialProvider = (0, import_util_middleware.normalizeProvider)(credentials);\n }\n createCanonicalRequest(request, canonicalHeaders, payloadHash) {\n const sortedHeaders = Object.keys(canonicalHeaders).sort();\n return `${request.method}\n${this.getCanonicalPath(request)}\n${getCanonicalQuery(request)}\n${sortedHeaders.map((name) => `${name}:${canonicalHeaders[name]}`).join(\"\\n\")}\n\n${sortedHeaders.join(\";\")}\n${payloadHash}`;\n }\n async createStringToSign(longDate, credentialScope, canonicalRequest, algorithmIdentifier) {\n const hash = new this.sha256();\n hash.update((0, import_util_utf84.toUint8Array)(canonicalRequest));\n const hashedRequest = await hash.digest();\n return `${algorithmIdentifier}\n${longDate}\n${credentialScope}\n${(0, import_util_hex_encoding.toHex)(hashedRequest)}`;\n }\n getCanonicalPath({ path }) {\n if (this.uriEscapePath) {\n const normalizedPathSegments = [];\n for (const pathSegment of path.split(\"/\")) {\n if (pathSegment?.length === 0)\n continue;\n if (pathSegment === \".\")\n continue;\n if (pathSegment === \"..\") {\n normalizedPathSegments.pop();\n } else {\n normalizedPathSegments.push(pathSegment);\n }\n }\n const normalizedPath = `${path?.startsWith(\"/\") ? \"/\" : \"\"}${normalizedPathSegments.join(\"/\")}${normalizedPathSegments.length > 0 && path?.endsWith(\"/\") ? \"/\" : \"\"}`;\n const doubleEncoded = (0, import_util_uri_escape.escapeUri)(normalizedPath);\n return doubleEncoded.replace(/%2F/g, \"/\");\n }\n return path;\n }\n validateResolvedCredentials(credentials) {\n if (typeof credentials !== \"object\" || // @ts-expect-error: Property 'accessKeyId' does not exist on type 'object'.ts(2339)\n typeof credentials.accessKeyId !== \"string\" || // @ts-expect-error: Property 'secretAccessKey' does not exist on type 'object'.ts(2339)\n typeof credentials.secretAccessKey !== \"string\") {\n throw new Error(\"Resolved credential object is not valid\");\n }\n }\n formatDate(now) {\n const longDate = iso8601(now).replace(/[\\-:]/g, \"\");\n return {\n longDate,\n shortDate: longDate.slice(0, 8)\n };\n }\n getCanonicalHeaderList(headers) {\n return Object.keys(headers).sort().join(\";\");\n }\n};\n\n// src/SignatureV4.ts\nvar SignatureV4 = class extends SignatureV4Base {\n constructor({\n applyChecksum,\n credentials,\n region,\n service,\n sha256,\n uriEscapePath = true\n }) {\n super({\n applyChecksum,\n credentials,\n region,\n service,\n sha256,\n uriEscapePath\n });\n this.headerFormatter = new HeaderFormatter();\n }\n static {\n __name(this, \"SignatureV4\");\n }\n async presign(originalRequest, options = {}) {\n const {\n signingDate = /* @__PURE__ */ new Date(),\n expiresIn = 3600,\n unsignableHeaders,\n unhoistableHeaders,\n signableHeaders,\n hoistableHeaders,\n signingRegion,\n signingService\n } = options;\n const credentials = await this.credentialProvider();\n this.validateResolvedCredentials(credentials);\n const region = signingRegion ?? await this.regionProvider();\n const { longDate, shortDate } = this.formatDate(signingDate);\n if (expiresIn > MAX_PRESIGNED_TTL) {\n return Promise.reject(\n \"Signature version 4 presigned URLs must have an expiration date less than one week in the future\"\n );\n }\n const scope = createScope(shortDate, region, signingService ?? this.service);\n const request = moveHeadersToQuery(prepareRequest(originalRequest), { unhoistableHeaders, hoistableHeaders });\n if (credentials.sessionToken) {\n request.query[TOKEN_QUERY_PARAM] = credentials.sessionToken;\n }\n request.query[ALGORITHM_QUERY_PARAM] = ALGORITHM_IDENTIFIER;\n request.query[CREDENTIAL_QUERY_PARAM] = `${credentials.accessKeyId}/${scope}`;\n request.query[AMZ_DATE_QUERY_PARAM] = longDate;\n request.query[EXPIRES_QUERY_PARAM] = expiresIn.toString(10);\n const canonicalHeaders = getCanonicalHeaders(request, unsignableHeaders, signableHeaders);\n request.query[SIGNED_HEADERS_QUERY_PARAM] = this.getCanonicalHeaderList(canonicalHeaders);\n request.query[SIGNATURE_QUERY_PARAM] = await this.getSignature(\n longDate,\n scope,\n this.getSigningKey(credentials, region, shortDate, signingService),\n this.createCanonicalRequest(request, canonicalHeaders, await getPayloadHash(originalRequest, this.sha256))\n );\n return request;\n }\n async sign(toSign, options) {\n if (typeof toSign === \"string\") {\n return this.signString(toSign, options);\n } else if (toSign.headers && toSign.payload) {\n return this.signEvent(toSign, options);\n } else if (toSign.message) {\n return this.signMessage(toSign, options);\n } else {\n return this.signRequest(toSign, options);\n }\n }\n async signEvent({ headers, payload }, { signingDate = /* @__PURE__ */ new Date(), priorSignature, signingRegion, signingService }) {\n const region = signingRegion ?? await this.regionProvider();\n const { shortDate, longDate } = this.formatDate(signingDate);\n const scope = createScope(shortDate, region, signingService ?? this.service);\n const hashedPayload = await getPayloadHash({ headers: {}, body: payload }, this.sha256);\n const hash = new this.sha256();\n hash.update(headers);\n const hashedHeaders = (0, import_util_hex_encoding.toHex)(await hash.digest());\n const stringToSign = [\n EVENT_ALGORITHM_IDENTIFIER,\n longDate,\n scope,\n priorSignature,\n hashedHeaders,\n hashedPayload\n ].join(\"\\n\");\n return this.signString(stringToSign, { signingDate, signingRegion: region, signingService });\n }\n async signMessage(signableMessage, { signingDate = /* @__PURE__ */ new Date(), signingRegion, signingService }) {\n const promise = this.signEvent(\n {\n headers: this.headerFormatter.format(signableMessage.message.headers),\n payload: signableMessage.message.body\n },\n {\n signingDate,\n signingRegion,\n signingService,\n priorSignature: signableMessage.priorSignature\n }\n );\n return promise.then((signature) => {\n return { message: signableMessage.message, signature };\n });\n }\n async signString(stringToSign, { signingDate = /* @__PURE__ */ new Date(), signingRegion, signingService } = {}) {\n const credentials = await this.credentialProvider();\n this.validateResolvedCredentials(credentials);\n const region = signingRegion ?? await this.regionProvider();\n const { shortDate } = this.formatDate(signingDate);\n const hash = new this.sha256(await this.getSigningKey(credentials, region, shortDate, signingService));\n hash.update((0, import_util_utf85.toUint8Array)(stringToSign));\n return (0, import_util_hex_encoding.toHex)(await hash.digest());\n }\n async signRequest(requestToSign, {\n signingDate = /* @__PURE__ */ new Date(),\n signableHeaders,\n unsignableHeaders,\n signingRegion,\n signingService\n } = {}) {\n const credentials = await this.credentialProvider();\n this.validateResolvedCredentials(credentials);\n const region = signingRegion ?? await this.regionProvider();\n const request = prepareRequest(requestToSign);\n const { longDate, shortDate } = this.formatDate(signingDate);\n const scope = createScope(shortDate, region, signingService ?? this.service);\n request.headers[AMZ_DATE_HEADER] = longDate;\n if (credentials.sessionToken) {\n request.headers[TOKEN_HEADER] = credentials.sessionToken;\n }\n const payloadHash = await getPayloadHash(request, this.sha256);\n if (!hasHeader(SHA256_HEADER, request.headers) && this.applyChecksum) {\n request.headers[SHA256_HEADER] = payloadHash;\n }\n const canonicalHeaders = getCanonicalHeaders(request, unsignableHeaders, signableHeaders);\n const signature = await this.getSignature(\n longDate,\n scope,\n this.getSigningKey(credentials, region, shortDate, signingService),\n this.createCanonicalRequest(request, canonicalHeaders, payloadHash)\n );\n request.headers[AUTH_HEADER] = `${ALGORITHM_IDENTIFIER} Credential=${credentials.accessKeyId}/${scope}, SignedHeaders=${this.getCanonicalHeaderList(canonicalHeaders)}, Signature=${signature}`;\n return request;\n }\n async getSignature(longDate, credentialScope, keyPromise, canonicalRequest) {\n const stringToSign = await this.createStringToSign(\n longDate,\n credentialScope,\n canonicalRequest,\n ALGORITHM_IDENTIFIER\n );\n const hash = new this.sha256(await keyPromise);\n hash.update((0, import_util_utf85.toUint8Array)(stringToSign));\n return (0, import_util_hex_encoding.toHex)(await hash.digest());\n }\n getSigningKey(credentials, region, shortDate, service) {\n return getSigningKey(this.sha256, credentials, shortDate, region, service || this.service);\n }\n};\n\n// src/signature-v4a-container.ts\nvar signatureV4aContainer = {\n SignatureV4a: null\n};\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n getCanonicalHeaders,\n getCanonicalQuery,\n getPayloadHash,\n moveHeadersToQuery,\n prepareRequest,\n SignatureV4Base,\n hasHeader,\n SignatureV4,\n ALGORITHM_QUERY_PARAM,\n CREDENTIAL_QUERY_PARAM,\n AMZ_DATE_QUERY_PARAM,\n SIGNED_HEADERS_QUERY_PARAM,\n EXPIRES_QUERY_PARAM,\n SIGNATURE_QUERY_PARAM,\n TOKEN_QUERY_PARAM,\n REGION_SET_PARAM,\n AUTH_HEADER,\n AMZ_DATE_HEADER,\n DATE_HEADER,\n GENERATED_HEADERS,\n SIGNATURE_HEADER,\n SHA256_HEADER,\n TOKEN_HEADER,\n HOST_HEADER,\n ALWAYS_UNSIGNABLE_HEADERS,\n PROXY_HEADER_PATTERN,\n SEC_HEADER_PATTERN,\n UNSIGNABLE_PATTERNS,\n ALGORITHM_IDENTIFIER,\n ALGORITHM_IDENTIFIER_V4A,\n EVENT_ALGORITHM_IDENTIFIER,\n UNSIGNED_PAYLOAD,\n MAX_CACHE_SIZE,\n KEY_TYPE_IDENTIFIER,\n MAX_PRESIGNED_TTL,\n createScope,\n getSigningKey,\n clearCredentialCache,\n signatureV4aContainer\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n Client: () => Client,\n Command: () => Command,\n NoOpLogger: () => NoOpLogger,\n SENSITIVE_STRING: () => SENSITIVE_STRING,\n ServiceException: () => ServiceException,\n _json: () => _json,\n collectBody: () => import_protocols.collectBody,\n convertMap: () => convertMap,\n createAggregatedClient: () => createAggregatedClient,\n decorateServiceException: () => decorateServiceException,\n emitWarningIfUnsupportedVersion: () => emitWarningIfUnsupportedVersion,\n extendedEncodeURIComponent: () => import_protocols.extendedEncodeURIComponent,\n getArrayIfSingleItem: () => getArrayIfSingleItem,\n getDefaultClientConfiguration: () => getDefaultClientConfiguration,\n getDefaultExtensionConfiguration: () => getDefaultExtensionConfiguration,\n getValueFromTextNode: () => getValueFromTextNode,\n isSerializableHeaderValue: () => isSerializableHeaderValue,\n loadConfigsForDefaultMode: () => loadConfigsForDefaultMode,\n map: () => map,\n resolveDefaultRuntimeConfig: () => resolveDefaultRuntimeConfig,\n resolvedPath: () => import_protocols.resolvedPath,\n serializeDateTime: () => serializeDateTime,\n serializeFloat: () => serializeFloat,\n take: () => take,\n throwDefaultError: () => throwDefaultError,\n withBaseException: () => withBaseException\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/client.ts\nvar import_middleware_stack = require(\"@smithy/middleware-stack\");\nvar Client = class {\n constructor(config) {\n this.config = config;\n this.middlewareStack = (0, import_middleware_stack.constructStack)();\n }\n static {\n __name(this, \"Client\");\n }\n send(command, optionsOrCb, cb) {\n const options = typeof optionsOrCb !== \"function\" ? optionsOrCb : void 0;\n const callback = typeof optionsOrCb === \"function\" ? optionsOrCb : cb;\n const useHandlerCache = options === void 0 && this.config.cacheMiddleware === true;\n let handler;\n if (useHandlerCache) {\n if (!this.handlers) {\n this.handlers = /* @__PURE__ */ new WeakMap();\n }\n const handlers = this.handlers;\n if (handlers.has(command.constructor)) {\n handler = handlers.get(command.constructor);\n } else {\n handler = command.resolveMiddleware(this.middlewareStack, this.config, options);\n handlers.set(command.constructor, handler);\n }\n } else {\n delete this.handlers;\n handler = command.resolveMiddleware(this.middlewareStack, this.config, options);\n }\n if (callback) {\n handler(command).then(\n (result) => callback(null, result.output),\n (err) => callback(err)\n ).catch(\n // prevent any errors thrown in the callback from triggering an\n // unhandled promise rejection\n () => {\n }\n );\n } else {\n return handler(command).then((result) => result.output);\n }\n }\n destroy() {\n this.config?.requestHandler?.destroy?.();\n delete this.handlers;\n }\n};\n\n// src/collect-stream-body.ts\nvar import_protocols = require(\"@smithy/core/protocols\");\n\n// src/command.ts\n\nvar import_types = require(\"@smithy/types\");\nvar Command = class {\n constructor() {\n this.middlewareStack = (0, import_middleware_stack.constructStack)();\n }\n static {\n __name(this, \"Command\");\n }\n /**\n * Factory for Command ClassBuilder.\n * @internal\n */\n static classBuilder() {\n return new ClassBuilder();\n }\n /**\n * @internal\n */\n resolveMiddlewareWithContext(clientStack, configuration, options, {\n middlewareFn,\n clientName,\n commandName,\n inputFilterSensitiveLog,\n outputFilterSensitiveLog,\n smithyContext,\n additionalContext,\n CommandCtor\n }) {\n for (const mw of middlewareFn.bind(this)(CommandCtor, clientStack, configuration, options)) {\n this.middlewareStack.use(mw);\n }\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog,\n outputFilterSensitiveLog,\n [import_types.SMITHY_CONTEXT_KEY]: {\n commandInstance: this,\n ...smithyContext\n },\n ...additionalContext\n };\n const { requestHandler } = configuration;\n return stack.resolve(\n (request) => requestHandler.handle(request.request, options || {}),\n handlerExecutionContext\n );\n }\n};\nvar ClassBuilder = class {\n constructor() {\n this._init = () => {\n };\n this._ep = {};\n this._middlewareFn = () => [];\n this._commandName = \"\";\n this._clientName = \"\";\n this._additionalContext = {};\n this._smithyContext = {};\n this._inputFilterSensitiveLog = (_) => _;\n this._outputFilterSensitiveLog = (_) => _;\n this._serializer = null;\n this._deserializer = null;\n }\n static {\n __name(this, \"ClassBuilder\");\n }\n /**\n * Optional init callback.\n */\n init(cb) {\n this._init = cb;\n }\n /**\n * Set the endpoint parameter instructions.\n */\n ep(endpointParameterInstructions) {\n this._ep = endpointParameterInstructions;\n return this;\n }\n /**\n * Add any number of middleware.\n */\n m(middlewareSupplier) {\n this._middlewareFn = middlewareSupplier;\n return this;\n }\n /**\n * Set the initial handler execution context Smithy field.\n */\n s(service, operation, smithyContext = {}) {\n this._smithyContext = {\n service,\n operation,\n ...smithyContext\n };\n return this;\n }\n /**\n * Set the initial handler execution context.\n */\n c(additionalContext = {}) {\n this._additionalContext = additionalContext;\n return this;\n }\n /**\n * Set constant string identifiers for the operation.\n */\n n(clientName, commandName) {\n this._clientName = clientName;\n this._commandName = commandName;\n return this;\n }\n /**\n * Set the input and output sensistive log filters.\n */\n f(inputFilter = (_) => _, outputFilter = (_) => _) {\n this._inputFilterSensitiveLog = inputFilter;\n this._outputFilterSensitiveLog = outputFilter;\n return this;\n }\n /**\n * Sets the serializer.\n */\n ser(serializer) {\n this._serializer = serializer;\n return this;\n }\n /**\n * Sets the deserializer.\n */\n de(deserializer) {\n this._deserializer = deserializer;\n return this;\n }\n /**\n * Sets input/output schema for the operation.\n */\n sc(operation) {\n this._operationSchema = operation;\n this._smithyContext.operationSchema = operation;\n return this;\n }\n /**\n * @returns a Command class with the classBuilder properties.\n */\n build() {\n const closure = this;\n let CommandRef;\n return CommandRef = class extends Command {\n /**\n * @public\n */\n constructor(...[input]) {\n super();\n /**\n * @internal\n */\n // @ts-ignore used in middlewareFn closure.\n this.serialize = closure._serializer;\n /**\n * @internal\n */\n // @ts-ignore used in middlewareFn closure.\n this.deserialize = closure._deserializer;\n this.input = input ?? {};\n closure._init(this);\n this.schema = closure._operationSchema;\n }\n static {\n __name(this, \"CommandRef\");\n }\n /**\n * @public\n */\n static getEndpointParameterInstructions() {\n return closure._ep;\n }\n /**\n * @internal\n */\n resolveMiddleware(stack, configuration, options) {\n return this.resolveMiddlewareWithContext(stack, configuration, options, {\n CommandCtor: CommandRef,\n middlewareFn: closure._middlewareFn,\n clientName: closure._clientName,\n commandName: closure._commandName,\n inputFilterSensitiveLog: closure._inputFilterSensitiveLog,\n outputFilterSensitiveLog: closure._outputFilterSensitiveLog,\n smithyContext: closure._smithyContext,\n additionalContext: closure._additionalContext\n });\n }\n };\n }\n};\n\n// src/constants.ts\nvar SENSITIVE_STRING = \"***SensitiveInformation***\";\n\n// src/create-aggregated-client.ts\nvar createAggregatedClient = /* @__PURE__ */ __name((commands, Client2) => {\n for (const command of Object.keys(commands)) {\n const CommandCtor = commands[command];\n const methodImpl = /* @__PURE__ */ __name(async function(args, optionsOrCb, cb) {\n const command2 = new CommandCtor(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command2, optionsOrCb);\n } else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expected http options but got ${typeof optionsOrCb}`);\n this.send(command2, optionsOrCb || {}, cb);\n } else {\n return this.send(command2, optionsOrCb);\n }\n }, \"methodImpl\");\n const methodName = (command[0].toLowerCase() + command.slice(1)).replace(/Command$/, \"\");\n Client2.prototype[methodName] = methodImpl;\n }\n}, \"createAggregatedClient\");\n\n// src/exceptions.ts\nvar ServiceException = class _ServiceException extends Error {\n static {\n __name(this, \"ServiceException\");\n }\n constructor(options) {\n super(options.message);\n Object.setPrototypeOf(this, Object.getPrototypeOf(this).constructor.prototype);\n this.name = options.name;\n this.$fault = options.$fault;\n this.$metadata = options.$metadata;\n }\n /**\n * Checks if a value is an instance of ServiceException (duck typed)\n */\n static isInstance(value) {\n if (!value)\n return false;\n const candidate = value;\n return _ServiceException.prototype.isPrototypeOf(candidate) || Boolean(candidate.$fault) && Boolean(candidate.$metadata) && (candidate.$fault === \"client\" || candidate.$fault === \"server\");\n }\n /**\n * Custom instanceof check to support the operator for ServiceException base class\n */\n static [Symbol.hasInstance](instance) {\n if (!instance)\n return false;\n const candidate = instance;\n if (this === _ServiceException) {\n return _ServiceException.isInstance(instance);\n }\n if (_ServiceException.isInstance(instance)) {\n if (candidate.name && this.name) {\n return this.prototype.isPrototypeOf(instance) || candidate.name === this.name;\n }\n return this.prototype.isPrototypeOf(instance);\n }\n return false;\n }\n};\nvar decorateServiceException = /* @__PURE__ */ __name((exception, additions = {}) => {\n Object.entries(additions).filter(([, v]) => v !== void 0).forEach(([k, v]) => {\n if (exception[k] == void 0 || exception[k] === \"\") {\n exception[k] = v;\n }\n });\n const message = exception.message || exception.Message || \"UnknownError\";\n exception.message = message;\n delete exception.Message;\n return exception;\n}, \"decorateServiceException\");\n\n// src/default-error-handler.ts\nvar throwDefaultError = /* @__PURE__ */ __name(({ output, parsedBody, exceptionCtor, errorCode }) => {\n const $metadata = deserializeMetadata(output);\n const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + \"\" : void 0;\n const response = new exceptionCtor({\n name: parsedBody?.code || parsedBody?.Code || errorCode || statusCode || \"UnknownError\",\n $fault: \"client\",\n $metadata\n });\n throw decorateServiceException(response, parsedBody);\n}, \"throwDefaultError\");\nvar withBaseException = /* @__PURE__ */ __name((ExceptionCtor) => {\n return ({ output, parsedBody, errorCode }) => {\n throwDefaultError({ output, parsedBody, exceptionCtor: ExceptionCtor, errorCode });\n };\n}, \"withBaseException\");\nvar deserializeMetadata = /* @__PURE__ */ __name((output) => ({\n httpStatusCode: output.statusCode,\n requestId: output.headers[\"x-amzn-requestid\"] ?? output.headers[\"x-amzn-request-id\"] ?? output.headers[\"x-amz-request-id\"],\n extendedRequestId: output.headers[\"x-amz-id-2\"],\n cfId: output.headers[\"x-amz-cf-id\"]\n}), \"deserializeMetadata\");\n\n// src/defaults-mode.ts\nvar loadConfigsForDefaultMode = /* @__PURE__ */ __name((mode) => {\n switch (mode) {\n case \"standard\":\n return {\n retryMode: \"standard\",\n connectionTimeout: 3100\n };\n case \"in-region\":\n return {\n retryMode: \"standard\",\n connectionTimeout: 1100\n };\n case \"cross-region\":\n return {\n retryMode: \"standard\",\n connectionTimeout: 3100\n };\n case \"mobile\":\n return {\n retryMode: \"standard\",\n connectionTimeout: 3e4\n };\n default:\n return {};\n }\n}, \"loadConfigsForDefaultMode\");\n\n// src/emitWarningIfUnsupportedVersion.ts\nvar warningEmitted = false;\nvar emitWarningIfUnsupportedVersion = /* @__PURE__ */ __name((version) => {\n if (version && !warningEmitted && parseInt(version.substring(1, version.indexOf(\".\"))) < 16) {\n warningEmitted = true;\n }\n}, \"emitWarningIfUnsupportedVersion\");\n\n// src/extended-encode-uri-component.ts\n\n\n// src/extensions/checksum.ts\n\nvar getChecksumConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {\n const checksumAlgorithms = [];\n for (const id in import_types.AlgorithmId) {\n const algorithmId = import_types.AlgorithmId[id];\n if (runtimeConfig[algorithmId] === void 0) {\n continue;\n }\n checksumAlgorithms.push({\n algorithmId: () => algorithmId,\n checksumConstructor: () => runtimeConfig[algorithmId]\n });\n }\n return {\n addChecksumAlgorithm(algo) {\n checksumAlgorithms.push(algo);\n },\n checksumAlgorithms() {\n return checksumAlgorithms;\n }\n };\n}, \"getChecksumConfiguration\");\nvar resolveChecksumRuntimeConfig = /* @__PURE__ */ __name((clientConfig) => {\n const runtimeConfig = {};\n clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => {\n runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor();\n });\n return runtimeConfig;\n}, \"resolveChecksumRuntimeConfig\");\n\n// src/extensions/retry.ts\nvar getRetryConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {\n return {\n setRetryStrategy(retryStrategy) {\n runtimeConfig.retryStrategy = retryStrategy;\n },\n retryStrategy() {\n return runtimeConfig.retryStrategy;\n }\n };\n}, \"getRetryConfiguration\");\nvar resolveRetryRuntimeConfig = /* @__PURE__ */ __name((retryStrategyConfiguration) => {\n const runtimeConfig = {};\n runtimeConfig.retryStrategy = retryStrategyConfiguration.retryStrategy();\n return runtimeConfig;\n}, \"resolveRetryRuntimeConfig\");\n\n// src/extensions/defaultExtensionConfiguration.ts\nvar getDefaultExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {\n return Object.assign(getChecksumConfiguration(runtimeConfig), getRetryConfiguration(runtimeConfig));\n}, \"getDefaultExtensionConfiguration\");\nvar getDefaultClientConfiguration = getDefaultExtensionConfiguration;\nvar resolveDefaultRuntimeConfig = /* @__PURE__ */ __name((config) => {\n return Object.assign(resolveChecksumRuntimeConfig(config), resolveRetryRuntimeConfig(config));\n}, \"resolveDefaultRuntimeConfig\");\n\n// src/get-array-if-single-item.ts\nvar getArrayIfSingleItem = /* @__PURE__ */ __name((mayBeArray) => Array.isArray(mayBeArray) ? mayBeArray : [mayBeArray], \"getArrayIfSingleItem\");\n\n// src/get-value-from-text-node.ts\nvar getValueFromTextNode = /* @__PURE__ */ __name((obj) => {\n const textNodeName = \"#text\";\n for (const key in obj) {\n if (obj.hasOwnProperty(key) && obj[key][textNodeName] !== void 0) {\n obj[key] = obj[key][textNodeName];\n } else if (typeof obj[key] === \"object\" && obj[key] !== null) {\n obj[key] = getValueFromTextNode(obj[key]);\n }\n }\n return obj;\n}, \"getValueFromTextNode\");\n\n// src/is-serializable-header-value.ts\nvar isSerializableHeaderValue = /* @__PURE__ */ __name((value) => {\n return value != null;\n}, \"isSerializableHeaderValue\");\n\n// src/NoOpLogger.ts\nvar NoOpLogger = class {\n static {\n __name(this, \"NoOpLogger\");\n }\n trace() {\n }\n debug() {\n }\n info() {\n }\n warn() {\n }\n error() {\n }\n};\n\n// src/object-mapping.ts\nfunction map(arg0, arg1, arg2) {\n let target;\n let filter;\n let instructions;\n if (typeof arg1 === \"undefined\" && typeof arg2 === \"undefined\") {\n target = {};\n instructions = arg0;\n } else {\n target = arg0;\n if (typeof arg1 === \"function\") {\n filter = arg1;\n instructions = arg2;\n return mapWithFilter(target, filter, instructions);\n } else {\n instructions = arg1;\n }\n }\n for (const key of Object.keys(instructions)) {\n if (!Array.isArray(instructions[key])) {\n target[key] = instructions[key];\n continue;\n }\n applyInstruction(target, null, instructions, key);\n }\n return target;\n}\n__name(map, \"map\");\nvar convertMap = /* @__PURE__ */ __name((target) => {\n const output = {};\n for (const [k, v] of Object.entries(target || {})) {\n output[k] = [, v];\n }\n return output;\n}, \"convertMap\");\nvar take = /* @__PURE__ */ __name((source, instructions) => {\n const out = {};\n for (const key in instructions) {\n applyInstruction(out, source, instructions, key);\n }\n return out;\n}, \"take\");\nvar mapWithFilter = /* @__PURE__ */ __name((target, filter, instructions) => {\n return map(\n target,\n Object.entries(instructions).reduce(\n (_instructions, [key, value]) => {\n if (Array.isArray(value)) {\n _instructions[key] = value;\n } else {\n if (typeof value === \"function\") {\n _instructions[key] = [filter, value()];\n } else {\n _instructions[key] = [filter, value];\n }\n }\n return _instructions;\n },\n {}\n )\n );\n}, \"mapWithFilter\");\nvar applyInstruction = /* @__PURE__ */ __name((target, source, instructions, targetKey) => {\n if (source !== null) {\n let instruction = instructions[targetKey];\n if (typeof instruction === \"function\") {\n instruction = [, instruction];\n }\n const [filter2 = nonNullish, valueFn = pass, sourceKey = targetKey] = instruction;\n if (typeof filter2 === \"function\" && filter2(source[sourceKey]) || typeof filter2 !== \"function\" && !!filter2) {\n target[targetKey] = valueFn(source[sourceKey]);\n }\n return;\n }\n let [filter, value] = instructions[targetKey];\n if (typeof value === \"function\") {\n let _value;\n const defaultFilterPassed = filter === void 0 && (_value = value()) != null;\n const customFilterPassed = typeof filter === \"function\" && !!filter(void 0) || typeof filter !== \"function\" && !!filter;\n if (defaultFilterPassed) {\n target[targetKey] = _value;\n } else if (customFilterPassed) {\n target[targetKey] = value();\n }\n } else {\n const defaultFilterPassed = filter === void 0 && value != null;\n const customFilterPassed = typeof filter === \"function\" && !!filter(value) || typeof filter !== \"function\" && !!filter;\n if (defaultFilterPassed || customFilterPassed) {\n target[targetKey] = value;\n }\n }\n}, \"applyInstruction\");\nvar nonNullish = /* @__PURE__ */ __name((_) => _ != null, \"nonNullish\");\nvar pass = /* @__PURE__ */ __name((_) => _, \"pass\");\n\n// src/resolve-path.ts\n\n\n// src/ser-utils.ts\nvar serializeFloat = /* @__PURE__ */ __name((value) => {\n if (value !== value) {\n return \"NaN\";\n }\n switch (value) {\n case Infinity:\n return \"Infinity\";\n case -Infinity:\n return \"-Infinity\";\n default:\n return value;\n }\n}, \"serializeFloat\");\nvar serializeDateTime = /* @__PURE__ */ __name((date) => date.toISOString().replace(\".000Z\", \"Z\"), \"serializeDateTime\");\n\n// src/serde-json.ts\nvar _json = /* @__PURE__ */ __name((obj) => {\n if (obj == null) {\n return {};\n }\n if (Array.isArray(obj)) {\n return obj.filter((_) => _ != null).map(_json);\n }\n if (typeof obj === \"object\") {\n const target = {};\n for (const key of Object.keys(obj)) {\n if (obj[key] == null) {\n continue;\n }\n target[key] = _json(obj[key]);\n }\n return target;\n }\n return obj;\n}, \"_json\");\n\n// src/index.ts\n__reExport(src_exports, require(\"@smithy/core/serde\"), module.exports);\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n Client,\n collectBody,\n Command,\n SENSITIVE_STRING,\n createAggregatedClient,\n throwDefaultError,\n withBaseException,\n loadConfigsForDefaultMode,\n emitWarningIfUnsupportedVersion,\n ServiceException,\n decorateServiceException,\n extendedEncodeURIComponent,\n getDefaultExtensionConfiguration,\n getDefaultClientConfiguration,\n resolveDefaultRuntimeConfig,\n getArrayIfSingleItem,\n getValueFromTextNode,\n isSerializableHeaderValue,\n NoOpLogger,\n convertMap,\n take,\n map,\n resolvedPath,\n serializeFloat,\n serializeDateTime,\n _json,\n LazyJsonString,\n NumericValue,\n copyDocumentWithTransform,\n dateToUtcString,\n expectBoolean,\n expectByte,\n expectFloat32,\n expectInt,\n expectInt32,\n expectLong,\n expectNonNull,\n expectNumber,\n expectObject,\n expectShort,\n expectString,\n expectUnion,\n handleFloat,\n limitedParseDouble,\n limitedParseFloat,\n limitedParseFloat32,\n logger,\n nv,\n parseBoolean,\n parseEpochTimestamp,\n parseRfc3339DateTime,\n parseRfc3339DateTimeWithOffset,\n parseRfc7231DateTime,\n quoteHeader,\n splitEvery,\n splitHeader,\n strictParseByte,\n strictParseDouble,\n strictParseFloat,\n strictParseFloat32,\n strictParseInt,\n strictParseInt32,\n strictParseLong,\n strictParseShort\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n AlgorithmId: () => AlgorithmId,\n EndpointURLScheme: () => EndpointURLScheme,\n FieldPosition: () => FieldPosition,\n HttpApiKeyAuthLocation: () => HttpApiKeyAuthLocation,\n HttpAuthLocation: () => HttpAuthLocation,\n IniSectionType: () => IniSectionType,\n RequestHandlerProtocol: () => RequestHandlerProtocol,\n SMITHY_CONTEXT_KEY: () => SMITHY_CONTEXT_KEY,\n getDefaultClientConfiguration: () => getDefaultClientConfiguration,\n resolveDefaultRuntimeConfig: () => resolveDefaultRuntimeConfig\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/auth/auth.ts\nvar HttpAuthLocation = /* @__PURE__ */ ((HttpAuthLocation2) => {\n HttpAuthLocation2[\"HEADER\"] = \"header\";\n HttpAuthLocation2[\"QUERY\"] = \"query\";\n return HttpAuthLocation2;\n})(HttpAuthLocation || {});\n\n// src/auth/HttpApiKeyAuth.ts\nvar HttpApiKeyAuthLocation = /* @__PURE__ */ ((HttpApiKeyAuthLocation2) => {\n HttpApiKeyAuthLocation2[\"HEADER\"] = \"header\";\n HttpApiKeyAuthLocation2[\"QUERY\"] = \"query\";\n return HttpApiKeyAuthLocation2;\n})(HttpApiKeyAuthLocation || {});\n\n// src/endpoint.ts\nvar EndpointURLScheme = /* @__PURE__ */ ((EndpointURLScheme2) => {\n EndpointURLScheme2[\"HTTP\"] = \"http\";\n EndpointURLScheme2[\"HTTPS\"] = \"https\";\n return EndpointURLScheme2;\n})(EndpointURLScheme || {});\n\n// src/extensions/checksum.ts\nvar AlgorithmId = /* @__PURE__ */ ((AlgorithmId2) => {\n AlgorithmId2[\"MD5\"] = \"md5\";\n AlgorithmId2[\"CRC32\"] = \"crc32\";\n AlgorithmId2[\"CRC32C\"] = \"crc32c\";\n AlgorithmId2[\"SHA1\"] = \"sha1\";\n AlgorithmId2[\"SHA256\"] = \"sha256\";\n return AlgorithmId2;\n})(AlgorithmId || {});\nvar getChecksumConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {\n const checksumAlgorithms = [];\n if (runtimeConfig.sha256 !== void 0) {\n checksumAlgorithms.push({\n algorithmId: () => \"sha256\" /* SHA256 */,\n checksumConstructor: () => runtimeConfig.sha256\n });\n }\n if (runtimeConfig.md5 != void 0) {\n checksumAlgorithms.push({\n algorithmId: () => \"md5\" /* MD5 */,\n checksumConstructor: () => runtimeConfig.md5\n });\n }\n return {\n addChecksumAlgorithm(algo) {\n checksumAlgorithms.push(algo);\n },\n checksumAlgorithms() {\n return checksumAlgorithms;\n }\n };\n}, \"getChecksumConfiguration\");\nvar resolveChecksumRuntimeConfig = /* @__PURE__ */ __name((clientConfig) => {\n const runtimeConfig = {};\n clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => {\n runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor();\n });\n return runtimeConfig;\n}, \"resolveChecksumRuntimeConfig\");\n\n// src/extensions/defaultClientConfiguration.ts\nvar getDefaultClientConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {\n return getChecksumConfiguration(runtimeConfig);\n}, \"getDefaultClientConfiguration\");\nvar resolveDefaultRuntimeConfig = /* @__PURE__ */ __name((config) => {\n return resolveChecksumRuntimeConfig(config);\n}, \"resolveDefaultRuntimeConfig\");\n\n// src/http.ts\nvar FieldPosition = /* @__PURE__ */ ((FieldPosition2) => {\n FieldPosition2[FieldPosition2[\"HEADER\"] = 0] = \"HEADER\";\n FieldPosition2[FieldPosition2[\"TRAILER\"] = 1] = \"TRAILER\";\n return FieldPosition2;\n})(FieldPosition || {});\n\n// src/middleware.ts\nvar SMITHY_CONTEXT_KEY = \"__smithy_context\";\n\n// src/profile.ts\nvar IniSectionType = /* @__PURE__ */ ((IniSectionType2) => {\n IniSectionType2[\"PROFILE\"] = \"profile\";\n IniSectionType2[\"SSO_SESSION\"] = \"sso-session\";\n IniSectionType2[\"SERVICES\"] = \"services\";\n return IniSectionType2;\n})(IniSectionType || {});\n\n// src/transfer.ts\nvar RequestHandlerProtocol = /* @__PURE__ */ ((RequestHandlerProtocol2) => {\n RequestHandlerProtocol2[\"HTTP_0_9\"] = \"http/0.9\";\n RequestHandlerProtocol2[\"HTTP_1_0\"] = \"http/1.0\";\n RequestHandlerProtocol2[\"TDS_8_0\"] = \"tds/8.0\";\n return RequestHandlerProtocol2;\n})(RequestHandlerProtocol || {});\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n HttpAuthLocation,\n HttpApiKeyAuthLocation,\n EndpointURLScheme,\n AlgorithmId,\n getDefaultClientConfiguration,\n resolveDefaultRuntimeConfig,\n FieldPosition,\n SMITHY_CONTEXT_KEY,\n IniSectionType,\n RequestHandlerProtocol\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n parseUrl: () => parseUrl\n});\nmodule.exports = __toCommonJS(src_exports);\nvar import_querystring_parser = require(\"@smithy/querystring-parser\");\nvar parseUrl = /* @__PURE__ */ __name((url) => {\n if (typeof url === \"string\") {\n return parseUrl(new URL(url));\n }\n const { hostname, pathname, port, protocol, search } = url;\n let query;\n if (search) {\n query = (0, import_querystring_parser.parseQueryString)(search);\n }\n return {\n hostname,\n port: port ? parseInt(port) : void 0,\n protocol,\n path: pathname,\n query\n };\n}, \"parseUrl\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n parseUrl\n});\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromBase64 = void 0;\nconst util_buffer_from_1 = require(\"@smithy/util-buffer-from\");\nconst BASE64_REGEX = /^[A-Za-z0-9+/]*={0,2}$/;\nconst fromBase64 = (input) => {\n if ((input.length * 3) % 4 !== 0) {\n throw new TypeError(`Incorrect padding on base64 string.`);\n }\n if (!BASE64_REGEX.exec(input)) {\n throw new TypeError(`Invalid base64 string.`);\n }\n const buffer = (0, util_buffer_from_1.fromString)(input, \"base64\");\n return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength);\n};\nexports.fromBase64 = fromBase64;\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\nmodule.exports = __toCommonJS(src_exports);\n__reExport(src_exports, require(\"././fromBase64\"), module.exports);\n__reExport(src_exports, require(\"././toBase64\"), module.exports);\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n fromBase64,\n toBase64\n});\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toBase64 = void 0;\nconst util_buffer_from_1 = require(\"@smithy/util-buffer-from\");\nconst util_utf8_1 = require(\"@smithy/util-utf8\");\nconst toBase64 = (_input) => {\n let input;\n if (typeof _input === \"string\") {\n input = (0, util_utf8_1.fromUtf8)(_input);\n }\n else {\n input = _input;\n }\n if (typeof input !== \"object\" || typeof input.byteOffset !== \"number\" || typeof input.byteLength !== \"number\") {\n throw new Error(\"@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.\");\n }\n return (0, util_buffer_from_1.fromArrayBuffer)(input.buffer, input.byteOffset, input.byteLength).toString(\"base64\");\n};\nexports.toBase64 = toBase64;\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n calculateBodyLength: () => calculateBodyLength\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/calculateBodyLength.ts\nvar import_fs = require(\"fs\");\nvar calculateBodyLength = /* @__PURE__ */ __name((body) => {\n if (!body) {\n return 0;\n }\n if (typeof body === \"string\") {\n return Buffer.byteLength(body);\n } else if (typeof body.byteLength === \"number\") {\n return body.byteLength;\n } else if (typeof body.size === \"number\") {\n return body.size;\n } else if (typeof body.start === \"number\" && typeof body.end === \"number\") {\n return body.end + 1 - body.start;\n } else if (typeof body.path === \"string\" || Buffer.isBuffer(body.path)) {\n return (0, import_fs.lstatSync)(body.path).size;\n } else if (typeof body.fd === \"number\") {\n return (0, import_fs.fstatSync)(body.fd).size;\n }\n throw new Error(`Body Length computation failed for ${body}`);\n}, \"calculateBodyLength\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n calculateBodyLength\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n fromArrayBuffer: () => fromArrayBuffer,\n fromString: () => fromString\n});\nmodule.exports = __toCommonJS(src_exports);\nvar import_is_array_buffer = require(\"@smithy/is-array-buffer\");\nvar import_buffer = require(\"buffer\");\nvar fromArrayBuffer = /* @__PURE__ */ __name((input, offset = 0, length = input.byteLength - offset) => {\n if (!(0, import_is_array_buffer.isArrayBuffer)(input)) {\n throw new TypeError(`The \"input\" argument must be ArrayBuffer. Received type ${typeof input} (${input})`);\n }\n return import_buffer.Buffer.from(input, offset, length);\n}, \"fromArrayBuffer\");\nvar fromString = /* @__PURE__ */ __name((input, encoding) => {\n if (typeof input !== \"string\") {\n throw new TypeError(`The \"input\" argument must be of type string. Received type ${typeof input} (${input})`);\n }\n return encoding ? import_buffer.Buffer.from(input, encoding) : import_buffer.Buffer.from(input);\n}, \"fromString\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n fromArrayBuffer,\n fromString\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n SelectorType: () => SelectorType,\n booleanSelector: () => booleanSelector,\n numberSelector: () => numberSelector\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/booleanSelector.ts\nvar booleanSelector = /* @__PURE__ */ __name((obj, key, type) => {\n if (!(key in obj))\n return void 0;\n if (obj[key] === \"true\")\n return true;\n if (obj[key] === \"false\")\n return false;\n throw new Error(`Cannot load ${type} \"${key}\". Expected \"true\" or \"false\", got ${obj[key]}.`);\n}, \"booleanSelector\");\n\n// src/numberSelector.ts\nvar numberSelector = /* @__PURE__ */ __name((obj, key, type) => {\n if (!(key in obj))\n return void 0;\n const numberValue = parseInt(obj[key], 10);\n if (Number.isNaN(numberValue)) {\n throw new TypeError(`Cannot load ${type} '${key}'. Expected number, got '${obj[key]}'.`);\n }\n return numberValue;\n}, \"numberSelector\");\n\n// src/types.ts\nvar SelectorType = /* @__PURE__ */ ((SelectorType2) => {\n SelectorType2[\"ENV\"] = \"env\";\n SelectorType2[\"CONFIG\"] = \"shared config entry\";\n return SelectorType2;\n})(SelectorType || {});\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n booleanSelector,\n numberSelector,\n SelectorType\n});\n\n","var __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n resolveDefaultsModeConfig: () => resolveDefaultsModeConfig\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/resolveDefaultsModeConfig.ts\nvar import_config_resolver = require(\"@smithy/config-resolver\");\nvar import_node_config_provider = require(\"@smithy/node-config-provider\");\nvar import_property_provider = require(\"@smithy/property-provider\");\n\n// src/constants.ts\nvar AWS_EXECUTION_ENV = \"AWS_EXECUTION_ENV\";\nvar AWS_REGION_ENV = \"AWS_REGION\";\nvar AWS_DEFAULT_REGION_ENV = \"AWS_DEFAULT_REGION\";\nvar ENV_IMDS_DISABLED = \"AWS_EC2_METADATA_DISABLED\";\nvar DEFAULTS_MODE_OPTIONS = [\"in-region\", \"cross-region\", \"mobile\", \"standard\", \"legacy\"];\nvar IMDS_REGION_PATH = \"/latest/meta-data/placement/region\";\n\n// src/defaultsModeConfig.ts\nvar AWS_DEFAULTS_MODE_ENV = \"AWS_DEFAULTS_MODE\";\nvar AWS_DEFAULTS_MODE_CONFIG = \"defaults_mode\";\nvar NODE_DEFAULTS_MODE_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => {\n return env[AWS_DEFAULTS_MODE_ENV];\n },\n configFileSelector: (profile) => {\n return profile[AWS_DEFAULTS_MODE_CONFIG];\n },\n default: \"legacy\"\n};\n\n// src/resolveDefaultsModeConfig.ts\nvar resolveDefaultsModeConfig = /* @__PURE__ */ __name(({\n region = (0, import_node_config_provider.loadConfig)(import_config_resolver.NODE_REGION_CONFIG_OPTIONS),\n defaultsMode = (0, import_node_config_provider.loadConfig)(NODE_DEFAULTS_MODE_CONFIG_OPTIONS)\n} = {}) => (0, import_property_provider.memoize)(async () => {\n const mode = typeof defaultsMode === \"function\" ? await defaultsMode() : defaultsMode;\n switch (mode?.toLowerCase()) {\n case \"auto\":\n return resolveNodeDefaultsModeAuto(region);\n case \"in-region\":\n case \"cross-region\":\n case \"mobile\":\n case \"standard\":\n case \"legacy\":\n return Promise.resolve(mode?.toLocaleLowerCase());\n case void 0:\n return Promise.resolve(\"legacy\");\n default:\n throw new Error(\n `Invalid parameter for \"defaultsMode\", expect ${DEFAULTS_MODE_OPTIONS.join(\", \")}, got ${mode}`\n );\n }\n}), \"resolveDefaultsModeConfig\");\nvar resolveNodeDefaultsModeAuto = /* @__PURE__ */ __name(async (clientRegion) => {\n if (clientRegion) {\n const resolvedRegion = typeof clientRegion === \"function\" ? await clientRegion() : clientRegion;\n const inferredRegion = await inferPhysicalRegion();\n if (!inferredRegion) {\n return \"standard\";\n }\n if (resolvedRegion === inferredRegion) {\n return \"in-region\";\n } else {\n return \"cross-region\";\n }\n }\n return \"standard\";\n}, \"resolveNodeDefaultsModeAuto\");\nvar inferPhysicalRegion = /* @__PURE__ */ __name(async () => {\n if (process.env[AWS_EXECUTION_ENV] && (process.env[AWS_REGION_ENV] || process.env[AWS_DEFAULT_REGION_ENV])) {\n return process.env[AWS_REGION_ENV] ?? process.env[AWS_DEFAULT_REGION_ENV];\n }\n if (!process.env[ENV_IMDS_DISABLED]) {\n try {\n const { getInstanceMetadataEndpoint, httpRequest } = await Promise.resolve().then(() => __toESM(require(\"@smithy/credential-provider-imds\")));\n const endpoint = await getInstanceMetadataEndpoint();\n return (await httpRequest({ ...endpoint, path: IMDS_REGION_PATH })).toString();\n } catch (e) {\n }\n }\n}, \"inferPhysicalRegion\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n resolveDefaultsModeConfig\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n EndpointCache: () => EndpointCache,\n EndpointError: () => EndpointError,\n customEndpointFunctions: () => customEndpointFunctions,\n isIpAddress: () => isIpAddress,\n isValidHostLabel: () => isValidHostLabel,\n resolveEndpoint: () => resolveEndpoint\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/cache/EndpointCache.ts\nvar EndpointCache = class {\n /**\n * @param [size] - desired average maximum capacity. A buffer of 10 additional keys will be allowed\n * before keys are dropped.\n * @param [params] - list of params to consider as part of the cache key.\n *\n * If the params list is not populated, no caching will happen.\n * This may be out of order depending on how the object is created and arrives to this class.\n */\n constructor({ size, params }) {\n this.data = /* @__PURE__ */ new Map();\n this.parameters = [];\n this.capacity = size ?? 50;\n if (params) {\n this.parameters = params;\n }\n }\n static {\n __name(this, \"EndpointCache\");\n }\n /**\n * @param endpointParams - query for endpoint.\n * @param resolver - provider of the value if not present.\n * @returns endpoint corresponding to the query.\n */\n get(endpointParams, resolver) {\n const key = this.hash(endpointParams);\n if (key === false) {\n return resolver();\n }\n if (!this.data.has(key)) {\n if (this.data.size > this.capacity + 10) {\n const keys = this.data.keys();\n let i = 0;\n while (true) {\n const { value, done } = keys.next();\n this.data.delete(value);\n if (done || ++i > 10) {\n break;\n }\n }\n }\n this.data.set(key, resolver());\n }\n return this.data.get(key);\n }\n size() {\n return this.data.size;\n }\n /**\n * @returns cache key or false if not cachable.\n */\n hash(endpointParams) {\n let buffer = \"\";\n const { parameters } = this;\n if (parameters.length === 0) {\n return false;\n }\n for (const param of parameters) {\n const val = String(endpointParams[param] ?? \"\");\n if (val.includes(\"|;\")) {\n return false;\n }\n buffer += val + \"|;\";\n }\n return buffer;\n }\n};\n\n// src/lib/isIpAddress.ts\nvar IP_V4_REGEX = new RegExp(\n `^(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)(?:\\\\.(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)){3}$`\n);\nvar isIpAddress = /* @__PURE__ */ __name((value) => IP_V4_REGEX.test(value) || value.startsWith(\"[\") && value.endsWith(\"]\"), \"isIpAddress\");\n\n// src/lib/isValidHostLabel.ts\nvar VALID_HOST_LABEL_REGEX = new RegExp(`^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$`);\nvar isValidHostLabel = /* @__PURE__ */ __name((value, allowSubDomains = false) => {\n if (!allowSubDomains) {\n return VALID_HOST_LABEL_REGEX.test(value);\n }\n const labels = value.split(\".\");\n for (const label of labels) {\n if (!isValidHostLabel(label)) {\n return false;\n }\n }\n return true;\n}, \"isValidHostLabel\");\n\n// src/utils/customEndpointFunctions.ts\nvar customEndpointFunctions = {};\n\n// src/debug/debugId.ts\nvar debugId = \"endpoints\";\n\n// src/debug/toDebugString.ts\nfunction toDebugString(input) {\n if (typeof input !== \"object\" || input == null) {\n return input;\n }\n if (\"ref\" in input) {\n return `$${toDebugString(input.ref)}`;\n }\n if (\"fn\" in input) {\n return `${input.fn}(${(input.argv || []).map(toDebugString).join(\", \")})`;\n }\n return JSON.stringify(input, null, 2);\n}\n__name(toDebugString, \"toDebugString\");\n\n// src/types/EndpointError.ts\nvar EndpointError = class extends Error {\n static {\n __name(this, \"EndpointError\");\n }\n constructor(message) {\n super(message);\n this.name = \"EndpointError\";\n }\n};\n\n// src/lib/booleanEquals.ts\nvar booleanEquals = /* @__PURE__ */ __name((value1, value2) => value1 === value2, \"booleanEquals\");\n\n// src/lib/getAttrPathList.ts\nvar getAttrPathList = /* @__PURE__ */ __name((path) => {\n const parts = path.split(\".\");\n const pathList = [];\n for (const part of parts) {\n const squareBracketIndex = part.indexOf(\"[\");\n if (squareBracketIndex !== -1) {\n if (part.indexOf(\"]\") !== part.length - 1) {\n throw new EndpointError(`Path: '${path}' does not end with ']'`);\n }\n const arrayIndex = part.slice(squareBracketIndex + 1, -1);\n if (Number.isNaN(parseInt(arrayIndex))) {\n throw new EndpointError(`Invalid array index: '${arrayIndex}' in path: '${path}'`);\n }\n if (squareBracketIndex !== 0) {\n pathList.push(part.slice(0, squareBracketIndex));\n }\n pathList.push(arrayIndex);\n } else {\n pathList.push(part);\n }\n }\n return pathList;\n}, \"getAttrPathList\");\n\n// src/lib/getAttr.ts\nvar getAttr = /* @__PURE__ */ __name((value, path) => getAttrPathList(path).reduce((acc, index) => {\n if (typeof acc !== \"object\") {\n throw new EndpointError(`Index '${index}' in '${path}' not found in '${JSON.stringify(value)}'`);\n } else if (Array.isArray(acc)) {\n return acc[parseInt(index)];\n }\n return acc[index];\n}, value), \"getAttr\");\n\n// src/lib/isSet.ts\nvar isSet = /* @__PURE__ */ __name((value) => value != null, \"isSet\");\n\n// src/lib/not.ts\nvar not = /* @__PURE__ */ __name((value) => !value, \"not\");\n\n// src/lib/parseURL.ts\nvar import_types3 = require(\"@smithy/types\");\nvar DEFAULT_PORTS = {\n [import_types3.EndpointURLScheme.HTTP]: 80,\n [import_types3.EndpointURLScheme.HTTPS]: 443\n};\nvar parseURL = /* @__PURE__ */ __name((value) => {\n const whatwgURL = (() => {\n try {\n if (value instanceof URL) {\n return value;\n }\n if (typeof value === \"object\" && \"hostname\" in value) {\n const { hostname: hostname2, port, protocol: protocol2 = \"\", path = \"\", query = {} } = value;\n const url = new URL(`${protocol2}//${hostname2}${port ? `:${port}` : \"\"}${path}`);\n url.search = Object.entries(query).map(([k, v]) => `${k}=${v}`).join(\"&\");\n return url;\n }\n return new URL(value);\n } catch (error) {\n return null;\n }\n })();\n if (!whatwgURL) {\n console.error(`Unable to parse ${JSON.stringify(value)} as a whatwg URL.`);\n return null;\n }\n const urlString = whatwgURL.href;\n const { host, hostname, pathname, protocol, search } = whatwgURL;\n if (search) {\n return null;\n }\n const scheme = protocol.slice(0, -1);\n if (!Object.values(import_types3.EndpointURLScheme).includes(scheme)) {\n return null;\n }\n const isIp = isIpAddress(hostname);\n const inputContainsDefaultPort = urlString.includes(`${host}:${DEFAULT_PORTS[scheme]}`) || typeof value === \"string\" && value.includes(`${host}:${DEFAULT_PORTS[scheme]}`);\n const authority = `${host}${inputContainsDefaultPort ? `:${DEFAULT_PORTS[scheme]}` : ``}`;\n return {\n scheme,\n authority,\n path: pathname,\n normalizedPath: pathname.endsWith(\"/\") ? pathname : `${pathname}/`,\n isIp\n };\n}, \"parseURL\");\n\n// src/lib/stringEquals.ts\nvar stringEquals = /* @__PURE__ */ __name((value1, value2) => value1 === value2, \"stringEquals\");\n\n// src/lib/substring.ts\nvar substring = /* @__PURE__ */ __name((input, start, stop, reverse) => {\n if (start >= stop || input.length < stop) {\n return null;\n }\n if (!reverse) {\n return input.substring(start, stop);\n }\n return input.substring(input.length - stop, input.length - start);\n}, \"substring\");\n\n// src/lib/uriEncode.ts\nvar uriEncode = /* @__PURE__ */ __name((value) => encodeURIComponent(value).replace(/[!*'()]/g, (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`), \"uriEncode\");\n\n// src/utils/endpointFunctions.ts\nvar endpointFunctions = {\n booleanEquals,\n getAttr,\n isSet,\n isValidHostLabel,\n not,\n parseURL,\n stringEquals,\n substring,\n uriEncode\n};\n\n// src/utils/evaluateTemplate.ts\nvar evaluateTemplate = /* @__PURE__ */ __name((template, options) => {\n const evaluatedTemplateArr = [];\n const templateContext = {\n ...options.endpointParams,\n ...options.referenceRecord\n };\n let currentIndex = 0;\n while (currentIndex < template.length) {\n const openingBraceIndex = template.indexOf(\"{\", currentIndex);\n if (openingBraceIndex === -1) {\n evaluatedTemplateArr.push(template.slice(currentIndex));\n break;\n }\n evaluatedTemplateArr.push(template.slice(currentIndex, openingBraceIndex));\n const closingBraceIndex = template.indexOf(\"}\", openingBraceIndex);\n if (closingBraceIndex === -1) {\n evaluatedTemplateArr.push(template.slice(openingBraceIndex));\n break;\n }\n if (template[openingBraceIndex + 1] === \"{\" && template[closingBraceIndex + 1] === \"}\") {\n evaluatedTemplateArr.push(template.slice(openingBraceIndex + 1, closingBraceIndex));\n currentIndex = closingBraceIndex + 2;\n }\n const parameterName = template.substring(openingBraceIndex + 1, closingBraceIndex);\n if (parameterName.includes(\"#\")) {\n const [refName, attrName] = parameterName.split(\"#\");\n evaluatedTemplateArr.push(getAttr(templateContext[refName], attrName));\n } else {\n evaluatedTemplateArr.push(templateContext[parameterName]);\n }\n currentIndex = closingBraceIndex + 1;\n }\n return evaluatedTemplateArr.join(\"\");\n}, \"evaluateTemplate\");\n\n// src/utils/getReferenceValue.ts\nvar getReferenceValue = /* @__PURE__ */ __name(({ ref }, options) => {\n const referenceRecord = {\n ...options.endpointParams,\n ...options.referenceRecord\n };\n return referenceRecord[ref];\n}, \"getReferenceValue\");\n\n// src/utils/evaluateExpression.ts\nvar evaluateExpression = /* @__PURE__ */ __name((obj, keyName, options) => {\n if (typeof obj === \"string\") {\n return evaluateTemplate(obj, options);\n } else if (obj[\"fn\"]) {\n return callFunction(obj, options);\n } else if (obj[\"ref\"]) {\n return getReferenceValue(obj, options);\n }\n throw new EndpointError(`'${keyName}': ${String(obj)} is not a string, function or reference.`);\n}, \"evaluateExpression\");\n\n// src/utils/callFunction.ts\nvar callFunction = /* @__PURE__ */ __name(({ fn, argv }, options) => {\n const evaluatedArgs = argv.map(\n (arg) => [\"boolean\", \"number\"].includes(typeof arg) ? arg : evaluateExpression(arg, \"arg\", options)\n );\n const fnSegments = fn.split(\".\");\n if (fnSegments[0] in customEndpointFunctions && fnSegments[1] != null) {\n return customEndpointFunctions[fnSegments[0]][fnSegments[1]](...evaluatedArgs);\n }\n return endpointFunctions[fn](...evaluatedArgs);\n}, \"callFunction\");\n\n// src/utils/evaluateCondition.ts\nvar evaluateCondition = /* @__PURE__ */ __name(({ assign, ...fnArgs }, options) => {\n if (assign && assign in options.referenceRecord) {\n throw new EndpointError(`'${assign}' is already defined in Reference Record.`);\n }\n const value = callFunction(fnArgs, options);\n options.logger?.debug?.(`${debugId} evaluateCondition: ${toDebugString(fnArgs)} = ${toDebugString(value)}`);\n return {\n result: value === \"\" ? true : !!value,\n ...assign != null && { toAssign: { name: assign, value } }\n };\n}, \"evaluateCondition\");\n\n// src/utils/evaluateConditions.ts\nvar evaluateConditions = /* @__PURE__ */ __name((conditions = [], options) => {\n const conditionsReferenceRecord = {};\n for (const condition of conditions) {\n const { result, toAssign } = evaluateCondition(condition, {\n ...options,\n referenceRecord: {\n ...options.referenceRecord,\n ...conditionsReferenceRecord\n }\n });\n if (!result) {\n return { result };\n }\n if (toAssign) {\n conditionsReferenceRecord[toAssign.name] = toAssign.value;\n options.logger?.debug?.(`${debugId} assign: ${toAssign.name} := ${toDebugString(toAssign.value)}`);\n }\n }\n return { result: true, referenceRecord: conditionsReferenceRecord };\n}, \"evaluateConditions\");\n\n// src/utils/getEndpointHeaders.ts\nvar getEndpointHeaders = /* @__PURE__ */ __name((headers, options) => Object.entries(headers).reduce(\n (acc, [headerKey, headerVal]) => ({\n ...acc,\n [headerKey]: headerVal.map((headerValEntry) => {\n const processedExpr = evaluateExpression(headerValEntry, \"Header value entry\", options);\n if (typeof processedExpr !== \"string\") {\n throw new EndpointError(`Header '${headerKey}' value '${processedExpr}' is not a string`);\n }\n return processedExpr;\n })\n }),\n {}\n), \"getEndpointHeaders\");\n\n// src/utils/getEndpointProperty.ts\nvar getEndpointProperty = /* @__PURE__ */ __name((property, options) => {\n if (Array.isArray(property)) {\n return property.map((propertyEntry) => getEndpointProperty(propertyEntry, options));\n }\n switch (typeof property) {\n case \"string\":\n return evaluateTemplate(property, options);\n case \"object\":\n if (property === null) {\n throw new EndpointError(`Unexpected endpoint property: ${property}`);\n }\n return getEndpointProperties(property, options);\n case \"boolean\":\n return property;\n default:\n throw new EndpointError(`Unexpected endpoint property type: ${typeof property}`);\n }\n}, \"getEndpointProperty\");\n\n// src/utils/getEndpointProperties.ts\nvar getEndpointProperties = /* @__PURE__ */ __name((properties, options) => Object.entries(properties).reduce(\n (acc, [propertyKey, propertyVal]) => ({\n ...acc,\n [propertyKey]: getEndpointProperty(propertyVal, options)\n }),\n {}\n), \"getEndpointProperties\");\n\n// src/utils/getEndpointUrl.ts\nvar getEndpointUrl = /* @__PURE__ */ __name((endpointUrl, options) => {\n const expression = evaluateExpression(endpointUrl, \"Endpoint URL\", options);\n if (typeof expression === \"string\") {\n try {\n return new URL(expression);\n } catch (error) {\n console.error(`Failed to construct URL with ${expression}`, error);\n throw error;\n }\n }\n throw new EndpointError(`Endpoint URL must be a string, got ${typeof expression}`);\n}, \"getEndpointUrl\");\n\n// src/utils/evaluateEndpointRule.ts\nvar evaluateEndpointRule = /* @__PURE__ */ __name((endpointRule, options) => {\n const { conditions, endpoint } = endpointRule;\n const { result, referenceRecord } = evaluateConditions(conditions, options);\n if (!result) {\n return;\n }\n const endpointRuleOptions = {\n ...options,\n referenceRecord: { ...options.referenceRecord, ...referenceRecord }\n };\n const { url, properties, headers } = endpoint;\n options.logger?.debug?.(`${debugId} Resolving endpoint from template: ${toDebugString(endpoint)}`);\n return {\n ...headers != void 0 && {\n headers: getEndpointHeaders(headers, endpointRuleOptions)\n },\n ...properties != void 0 && {\n properties: getEndpointProperties(properties, endpointRuleOptions)\n },\n url: getEndpointUrl(url, endpointRuleOptions)\n };\n}, \"evaluateEndpointRule\");\n\n// src/utils/evaluateErrorRule.ts\nvar evaluateErrorRule = /* @__PURE__ */ __name((errorRule, options) => {\n const { conditions, error } = errorRule;\n const { result, referenceRecord } = evaluateConditions(conditions, options);\n if (!result) {\n return;\n }\n throw new EndpointError(\n evaluateExpression(error, \"Error\", {\n ...options,\n referenceRecord: { ...options.referenceRecord, ...referenceRecord }\n })\n );\n}, \"evaluateErrorRule\");\n\n// src/utils/evaluateTreeRule.ts\nvar evaluateTreeRule = /* @__PURE__ */ __name((treeRule, options) => {\n const { conditions, rules } = treeRule;\n const { result, referenceRecord } = evaluateConditions(conditions, options);\n if (!result) {\n return;\n }\n return evaluateRules(rules, {\n ...options,\n referenceRecord: { ...options.referenceRecord, ...referenceRecord }\n });\n}, \"evaluateTreeRule\");\n\n// src/utils/evaluateRules.ts\nvar evaluateRules = /* @__PURE__ */ __name((rules, options) => {\n for (const rule of rules) {\n if (rule.type === \"endpoint\") {\n const endpointOrUndefined = evaluateEndpointRule(rule, options);\n if (endpointOrUndefined) {\n return endpointOrUndefined;\n }\n } else if (rule.type === \"error\") {\n evaluateErrorRule(rule, options);\n } else if (rule.type === \"tree\") {\n const endpointOrUndefined = evaluateTreeRule(rule, options);\n if (endpointOrUndefined) {\n return endpointOrUndefined;\n }\n } else {\n throw new EndpointError(`Unknown endpoint rule: ${rule}`);\n }\n }\n throw new EndpointError(`Rules evaluation failed`);\n}, \"evaluateRules\");\n\n// src/resolveEndpoint.ts\nvar resolveEndpoint = /* @__PURE__ */ __name((ruleSetObject, options) => {\n const { endpointParams, logger } = options;\n const { parameters, rules } = ruleSetObject;\n options.logger?.debug?.(`${debugId} Initial EndpointParams: ${toDebugString(endpointParams)}`);\n const paramsWithDefault = Object.entries(parameters).filter(([, v]) => v.default != null).map(([k, v]) => [k, v.default]);\n if (paramsWithDefault.length > 0) {\n for (const [paramKey, paramDefaultValue] of paramsWithDefault) {\n endpointParams[paramKey] = endpointParams[paramKey] ?? paramDefaultValue;\n }\n }\n const requiredParams = Object.entries(parameters).filter(([, v]) => v.required).map(([k]) => k);\n for (const requiredParam of requiredParams) {\n if (endpointParams[requiredParam] == null) {\n throw new EndpointError(`Missing required parameter: '${requiredParam}'`);\n }\n }\n const endpoint = evaluateRules(rules, { endpointParams, logger, referenceRecord: {} });\n options.logger?.debug?.(`${debugId} Resolved endpoint: ${toDebugString(endpoint)}`);\n return endpoint;\n}, \"resolveEndpoint\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n EndpointCache,\n isIpAddress,\n isValidHostLabel,\n customEndpointFunctions,\n resolveEndpoint,\n EndpointError\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n AlgorithmId: () => AlgorithmId,\n EndpointURLScheme: () => EndpointURLScheme,\n FieldPosition: () => FieldPosition,\n HttpApiKeyAuthLocation: () => HttpApiKeyAuthLocation,\n HttpAuthLocation: () => HttpAuthLocation,\n IniSectionType: () => IniSectionType,\n RequestHandlerProtocol: () => RequestHandlerProtocol,\n SMITHY_CONTEXT_KEY: () => SMITHY_CONTEXT_KEY,\n getDefaultClientConfiguration: () => getDefaultClientConfiguration,\n resolveDefaultRuntimeConfig: () => resolveDefaultRuntimeConfig\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/auth/auth.ts\nvar HttpAuthLocation = /* @__PURE__ */ ((HttpAuthLocation2) => {\n HttpAuthLocation2[\"HEADER\"] = \"header\";\n HttpAuthLocation2[\"QUERY\"] = \"query\";\n return HttpAuthLocation2;\n})(HttpAuthLocation || {});\n\n// src/auth/HttpApiKeyAuth.ts\nvar HttpApiKeyAuthLocation = /* @__PURE__ */ ((HttpApiKeyAuthLocation2) => {\n HttpApiKeyAuthLocation2[\"HEADER\"] = \"header\";\n HttpApiKeyAuthLocation2[\"QUERY\"] = \"query\";\n return HttpApiKeyAuthLocation2;\n})(HttpApiKeyAuthLocation || {});\n\n// src/endpoint.ts\nvar EndpointURLScheme = /* @__PURE__ */ ((EndpointURLScheme2) => {\n EndpointURLScheme2[\"HTTP\"] = \"http\";\n EndpointURLScheme2[\"HTTPS\"] = \"https\";\n return EndpointURLScheme2;\n})(EndpointURLScheme || {});\n\n// src/extensions/checksum.ts\nvar AlgorithmId = /* @__PURE__ */ ((AlgorithmId2) => {\n AlgorithmId2[\"MD5\"] = \"md5\";\n AlgorithmId2[\"CRC32\"] = \"crc32\";\n AlgorithmId2[\"CRC32C\"] = \"crc32c\";\n AlgorithmId2[\"SHA1\"] = \"sha1\";\n AlgorithmId2[\"SHA256\"] = \"sha256\";\n return AlgorithmId2;\n})(AlgorithmId || {});\nvar getChecksumConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {\n const checksumAlgorithms = [];\n if (runtimeConfig.sha256 !== void 0) {\n checksumAlgorithms.push({\n algorithmId: () => \"sha256\" /* SHA256 */,\n checksumConstructor: () => runtimeConfig.sha256\n });\n }\n if (runtimeConfig.md5 != void 0) {\n checksumAlgorithms.push({\n algorithmId: () => \"md5\" /* MD5 */,\n checksumConstructor: () => runtimeConfig.md5\n });\n }\n return {\n addChecksumAlgorithm(algo) {\n checksumAlgorithms.push(algo);\n },\n checksumAlgorithms() {\n return checksumAlgorithms;\n }\n };\n}, \"getChecksumConfiguration\");\nvar resolveChecksumRuntimeConfig = /* @__PURE__ */ __name((clientConfig) => {\n const runtimeConfig = {};\n clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => {\n runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor();\n });\n return runtimeConfig;\n}, \"resolveChecksumRuntimeConfig\");\n\n// src/extensions/defaultClientConfiguration.ts\nvar getDefaultClientConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {\n return getChecksumConfiguration(runtimeConfig);\n}, \"getDefaultClientConfiguration\");\nvar resolveDefaultRuntimeConfig = /* @__PURE__ */ __name((config) => {\n return resolveChecksumRuntimeConfig(config);\n}, \"resolveDefaultRuntimeConfig\");\n\n// src/http.ts\nvar FieldPosition = /* @__PURE__ */ ((FieldPosition2) => {\n FieldPosition2[FieldPosition2[\"HEADER\"] = 0] = \"HEADER\";\n FieldPosition2[FieldPosition2[\"TRAILER\"] = 1] = \"TRAILER\";\n return FieldPosition2;\n})(FieldPosition || {});\n\n// src/middleware.ts\nvar SMITHY_CONTEXT_KEY = \"__smithy_context\";\n\n// src/profile.ts\nvar IniSectionType = /* @__PURE__ */ ((IniSectionType2) => {\n IniSectionType2[\"PROFILE\"] = \"profile\";\n IniSectionType2[\"SSO_SESSION\"] = \"sso-session\";\n IniSectionType2[\"SERVICES\"] = \"services\";\n return IniSectionType2;\n})(IniSectionType || {});\n\n// src/transfer.ts\nvar RequestHandlerProtocol = /* @__PURE__ */ ((RequestHandlerProtocol2) => {\n RequestHandlerProtocol2[\"HTTP_0_9\"] = \"http/0.9\";\n RequestHandlerProtocol2[\"HTTP_1_0\"] = \"http/1.0\";\n RequestHandlerProtocol2[\"TDS_8_0\"] = \"tds/8.0\";\n return RequestHandlerProtocol2;\n})(RequestHandlerProtocol || {});\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n HttpAuthLocation,\n HttpApiKeyAuthLocation,\n EndpointURLScheme,\n AlgorithmId,\n getDefaultClientConfiguration,\n resolveDefaultRuntimeConfig,\n FieldPosition,\n SMITHY_CONTEXT_KEY,\n IniSectionType,\n RequestHandlerProtocol\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n fromHex: () => fromHex,\n toHex: () => toHex\n});\nmodule.exports = __toCommonJS(src_exports);\nvar SHORT_TO_HEX = {};\nvar HEX_TO_SHORT = {};\nfor (let i = 0; i < 256; i++) {\n let encodedByte = i.toString(16).toLowerCase();\n if (encodedByte.length === 1) {\n encodedByte = `0${encodedByte}`;\n }\n SHORT_TO_HEX[i] = encodedByte;\n HEX_TO_SHORT[encodedByte] = i;\n}\nfunction fromHex(encoded) {\n if (encoded.length % 2 !== 0) {\n throw new Error(\"Hex encoded strings must have an even number length\");\n }\n const out = new Uint8Array(encoded.length / 2);\n for (let i = 0; i < encoded.length; i += 2) {\n const encodedByte = encoded.slice(i, i + 2).toLowerCase();\n if (encodedByte in HEX_TO_SHORT) {\n out[i / 2] = HEX_TO_SHORT[encodedByte];\n } else {\n throw new Error(`Cannot decode unrecognized sequence ${encodedByte} as hexadecimal`);\n }\n }\n return out;\n}\n__name(fromHex, \"fromHex\");\nfunction toHex(bytes) {\n let out = \"\";\n for (let i = 0; i < bytes.byteLength; i++) {\n out += SHORT_TO_HEX[bytes[i]];\n }\n return out;\n}\n__name(toHex, \"toHex\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n fromHex,\n toHex\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n getSmithyContext: () => getSmithyContext,\n normalizeProvider: () => normalizeProvider\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/getSmithyContext.ts\nvar import_types = require(\"@smithy/types\");\nvar getSmithyContext = /* @__PURE__ */ __name((context) => context[import_types.SMITHY_CONTEXT_KEY] || (context[import_types.SMITHY_CONTEXT_KEY] = {}), \"getSmithyContext\");\n\n// src/normalizeProvider.ts\nvar normalizeProvider = /* @__PURE__ */ __name((input) => {\n if (typeof input === \"function\")\n return input;\n const promisified = Promise.resolve(input);\n return () => promisified;\n}, \"normalizeProvider\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n getSmithyContext,\n normalizeProvider\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n AlgorithmId: () => AlgorithmId,\n EndpointURLScheme: () => EndpointURLScheme,\n FieldPosition: () => FieldPosition,\n HttpApiKeyAuthLocation: () => HttpApiKeyAuthLocation,\n HttpAuthLocation: () => HttpAuthLocation,\n IniSectionType: () => IniSectionType,\n RequestHandlerProtocol: () => RequestHandlerProtocol,\n SMITHY_CONTEXT_KEY: () => SMITHY_CONTEXT_KEY,\n getDefaultClientConfiguration: () => getDefaultClientConfiguration,\n resolveDefaultRuntimeConfig: () => resolveDefaultRuntimeConfig\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/auth/auth.ts\nvar HttpAuthLocation = /* @__PURE__ */ ((HttpAuthLocation2) => {\n HttpAuthLocation2[\"HEADER\"] = \"header\";\n HttpAuthLocation2[\"QUERY\"] = \"query\";\n return HttpAuthLocation2;\n})(HttpAuthLocation || {});\n\n// src/auth/HttpApiKeyAuth.ts\nvar HttpApiKeyAuthLocation = /* @__PURE__ */ ((HttpApiKeyAuthLocation2) => {\n HttpApiKeyAuthLocation2[\"HEADER\"] = \"header\";\n HttpApiKeyAuthLocation2[\"QUERY\"] = \"query\";\n return HttpApiKeyAuthLocation2;\n})(HttpApiKeyAuthLocation || {});\n\n// src/endpoint.ts\nvar EndpointURLScheme = /* @__PURE__ */ ((EndpointURLScheme2) => {\n EndpointURLScheme2[\"HTTP\"] = \"http\";\n EndpointURLScheme2[\"HTTPS\"] = \"https\";\n return EndpointURLScheme2;\n})(EndpointURLScheme || {});\n\n// src/extensions/checksum.ts\nvar AlgorithmId = /* @__PURE__ */ ((AlgorithmId2) => {\n AlgorithmId2[\"MD5\"] = \"md5\";\n AlgorithmId2[\"CRC32\"] = \"crc32\";\n AlgorithmId2[\"CRC32C\"] = \"crc32c\";\n AlgorithmId2[\"SHA1\"] = \"sha1\";\n AlgorithmId2[\"SHA256\"] = \"sha256\";\n return AlgorithmId2;\n})(AlgorithmId || {});\nvar getChecksumConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {\n const checksumAlgorithms = [];\n if (runtimeConfig.sha256 !== void 0) {\n checksumAlgorithms.push({\n algorithmId: () => \"sha256\" /* SHA256 */,\n checksumConstructor: () => runtimeConfig.sha256\n });\n }\n if (runtimeConfig.md5 != void 0) {\n checksumAlgorithms.push({\n algorithmId: () => \"md5\" /* MD5 */,\n checksumConstructor: () => runtimeConfig.md5\n });\n }\n return {\n addChecksumAlgorithm(algo) {\n checksumAlgorithms.push(algo);\n },\n checksumAlgorithms() {\n return checksumAlgorithms;\n }\n };\n}, \"getChecksumConfiguration\");\nvar resolveChecksumRuntimeConfig = /* @__PURE__ */ __name((clientConfig) => {\n const runtimeConfig = {};\n clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => {\n runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor();\n });\n return runtimeConfig;\n}, \"resolveChecksumRuntimeConfig\");\n\n// src/extensions/defaultClientConfiguration.ts\nvar getDefaultClientConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {\n return getChecksumConfiguration(runtimeConfig);\n}, \"getDefaultClientConfiguration\");\nvar resolveDefaultRuntimeConfig = /* @__PURE__ */ __name((config) => {\n return resolveChecksumRuntimeConfig(config);\n}, \"resolveDefaultRuntimeConfig\");\n\n// src/http.ts\nvar FieldPosition = /* @__PURE__ */ ((FieldPosition2) => {\n FieldPosition2[FieldPosition2[\"HEADER\"] = 0] = \"HEADER\";\n FieldPosition2[FieldPosition2[\"TRAILER\"] = 1] = \"TRAILER\";\n return FieldPosition2;\n})(FieldPosition || {});\n\n// src/middleware.ts\nvar SMITHY_CONTEXT_KEY = \"__smithy_context\";\n\n// src/profile.ts\nvar IniSectionType = /* @__PURE__ */ ((IniSectionType2) => {\n IniSectionType2[\"PROFILE\"] = \"profile\";\n IniSectionType2[\"SSO_SESSION\"] = \"sso-session\";\n IniSectionType2[\"SERVICES\"] = \"services\";\n return IniSectionType2;\n})(IniSectionType || {});\n\n// src/transfer.ts\nvar RequestHandlerProtocol = /* @__PURE__ */ ((RequestHandlerProtocol2) => {\n RequestHandlerProtocol2[\"HTTP_0_9\"] = \"http/0.9\";\n RequestHandlerProtocol2[\"HTTP_1_0\"] = \"http/1.0\";\n RequestHandlerProtocol2[\"TDS_8_0\"] = \"tds/8.0\";\n return RequestHandlerProtocol2;\n})(RequestHandlerProtocol || {});\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n HttpAuthLocation,\n HttpApiKeyAuthLocation,\n EndpointURLScheme,\n AlgorithmId,\n getDefaultClientConfiguration,\n resolveDefaultRuntimeConfig,\n FieldPosition,\n SMITHY_CONTEXT_KEY,\n IniSectionType,\n RequestHandlerProtocol\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n AdaptiveRetryStrategy: () => AdaptiveRetryStrategy,\n ConfiguredRetryStrategy: () => ConfiguredRetryStrategy,\n DEFAULT_MAX_ATTEMPTS: () => DEFAULT_MAX_ATTEMPTS,\n DEFAULT_RETRY_DELAY_BASE: () => DEFAULT_RETRY_DELAY_BASE,\n DEFAULT_RETRY_MODE: () => DEFAULT_RETRY_MODE,\n DefaultRateLimiter: () => DefaultRateLimiter,\n INITIAL_RETRY_TOKENS: () => INITIAL_RETRY_TOKENS,\n INVOCATION_ID_HEADER: () => INVOCATION_ID_HEADER,\n MAXIMUM_RETRY_DELAY: () => MAXIMUM_RETRY_DELAY,\n NO_RETRY_INCREMENT: () => NO_RETRY_INCREMENT,\n REQUEST_HEADER: () => REQUEST_HEADER,\n RETRY_COST: () => RETRY_COST,\n RETRY_MODES: () => RETRY_MODES,\n StandardRetryStrategy: () => StandardRetryStrategy,\n THROTTLING_RETRY_DELAY_BASE: () => THROTTLING_RETRY_DELAY_BASE,\n TIMEOUT_RETRY_COST: () => TIMEOUT_RETRY_COST\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/config.ts\nvar RETRY_MODES = /* @__PURE__ */ ((RETRY_MODES2) => {\n RETRY_MODES2[\"STANDARD\"] = \"standard\";\n RETRY_MODES2[\"ADAPTIVE\"] = \"adaptive\";\n return RETRY_MODES2;\n})(RETRY_MODES || {});\nvar DEFAULT_MAX_ATTEMPTS = 3;\nvar DEFAULT_RETRY_MODE = \"standard\" /* STANDARD */;\n\n// src/DefaultRateLimiter.ts\nvar import_service_error_classification = require(\"@smithy/service-error-classification\");\nvar DefaultRateLimiter = class _DefaultRateLimiter {\n constructor(options) {\n // Pre-set state variables\n this.currentCapacity = 0;\n this.enabled = false;\n this.lastMaxRate = 0;\n this.measuredTxRate = 0;\n this.requestCount = 0;\n this.lastTimestamp = 0;\n this.timeWindow = 0;\n this.beta = options?.beta ?? 0.7;\n this.minCapacity = options?.minCapacity ?? 1;\n this.minFillRate = options?.minFillRate ?? 0.5;\n this.scaleConstant = options?.scaleConstant ?? 0.4;\n this.smooth = options?.smooth ?? 0.8;\n const currentTimeInSeconds = this.getCurrentTimeInSeconds();\n this.lastThrottleTime = currentTimeInSeconds;\n this.lastTxRateBucket = Math.floor(this.getCurrentTimeInSeconds());\n this.fillRate = this.minFillRate;\n this.maxCapacity = this.minCapacity;\n }\n static {\n __name(this, \"DefaultRateLimiter\");\n }\n static {\n /**\n * Only used in testing.\n */\n this.setTimeoutFn = setTimeout;\n }\n getCurrentTimeInSeconds() {\n return Date.now() / 1e3;\n }\n async getSendToken() {\n return this.acquireTokenBucket(1);\n }\n async acquireTokenBucket(amount) {\n if (!this.enabled) {\n return;\n }\n this.refillTokenBucket();\n if (amount > this.currentCapacity) {\n const delay = (amount - this.currentCapacity) / this.fillRate * 1e3;\n await new Promise((resolve) => _DefaultRateLimiter.setTimeoutFn(resolve, delay));\n }\n this.currentCapacity = this.currentCapacity - amount;\n }\n refillTokenBucket() {\n const timestamp = this.getCurrentTimeInSeconds();\n if (!this.lastTimestamp) {\n this.lastTimestamp = timestamp;\n return;\n }\n const fillAmount = (timestamp - this.lastTimestamp) * this.fillRate;\n this.currentCapacity = Math.min(this.maxCapacity, this.currentCapacity + fillAmount);\n this.lastTimestamp = timestamp;\n }\n updateClientSendingRate(response) {\n let calculatedRate;\n this.updateMeasuredRate();\n if ((0, import_service_error_classification.isThrottlingError)(response)) {\n const rateToUse = !this.enabled ? this.measuredTxRate : Math.min(this.measuredTxRate, this.fillRate);\n this.lastMaxRate = rateToUse;\n this.calculateTimeWindow();\n this.lastThrottleTime = this.getCurrentTimeInSeconds();\n calculatedRate = this.cubicThrottle(rateToUse);\n this.enableTokenBucket();\n } else {\n this.calculateTimeWindow();\n calculatedRate = this.cubicSuccess(this.getCurrentTimeInSeconds());\n }\n const newRate = Math.min(calculatedRate, 2 * this.measuredTxRate);\n this.updateTokenBucketRate(newRate);\n }\n calculateTimeWindow() {\n this.timeWindow = this.getPrecise(Math.pow(this.lastMaxRate * (1 - this.beta) / this.scaleConstant, 1 / 3));\n }\n cubicThrottle(rateToUse) {\n return this.getPrecise(rateToUse * this.beta);\n }\n cubicSuccess(timestamp) {\n return this.getPrecise(\n this.scaleConstant * Math.pow(timestamp - this.lastThrottleTime - this.timeWindow, 3) + this.lastMaxRate\n );\n }\n enableTokenBucket() {\n this.enabled = true;\n }\n updateTokenBucketRate(newRate) {\n this.refillTokenBucket();\n this.fillRate = Math.max(newRate, this.minFillRate);\n this.maxCapacity = Math.max(newRate, this.minCapacity);\n this.currentCapacity = Math.min(this.currentCapacity, this.maxCapacity);\n }\n updateMeasuredRate() {\n const t = this.getCurrentTimeInSeconds();\n const timeBucket = Math.floor(t * 2) / 2;\n this.requestCount++;\n if (timeBucket > this.lastTxRateBucket) {\n const currentRate = this.requestCount / (timeBucket - this.lastTxRateBucket);\n this.measuredTxRate = this.getPrecise(currentRate * this.smooth + this.measuredTxRate * (1 - this.smooth));\n this.requestCount = 0;\n this.lastTxRateBucket = timeBucket;\n }\n }\n getPrecise(num) {\n return parseFloat(num.toFixed(8));\n }\n};\n\n// src/constants.ts\nvar DEFAULT_RETRY_DELAY_BASE = 100;\nvar MAXIMUM_RETRY_DELAY = 20 * 1e3;\nvar THROTTLING_RETRY_DELAY_BASE = 500;\nvar INITIAL_RETRY_TOKENS = 500;\nvar RETRY_COST = 5;\nvar TIMEOUT_RETRY_COST = 10;\nvar NO_RETRY_INCREMENT = 1;\nvar INVOCATION_ID_HEADER = \"amz-sdk-invocation-id\";\nvar REQUEST_HEADER = \"amz-sdk-request\";\n\n// src/defaultRetryBackoffStrategy.ts\nvar getDefaultRetryBackoffStrategy = /* @__PURE__ */ __name(() => {\n let delayBase = DEFAULT_RETRY_DELAY_BASE;\n const computeNextBackoffDelay = /* @__PURE__ */ __name((attempts) => {\n return Math.floor(Math.min(MAXIMUM_RETRY_DELAY, Math.random() * 2 ** attempts * delayBase));\n }, \"computeNextBackoffDelay\");\n const setDelayBase = /* @__PURE__ */ __name((delay) => {\n delayBase = delay;\n }, \"setDelayBase\");\n return {\n computeNextBackoffDelay,\n setDelayBase\n };\n}, \"getDefaultRetryBackoffStrategy\");\n\n// src/defaultRetryToken.ts\nvar createDefaultRetryToken = /* @__PURE__ */ __name(({\n retryDelay,\n retryCount,\n retryCost\n}) => {\n const getRetryCount = /* @__PURE__ */ __name(() => retryCount, \"getRetryCount\");\n const getRetryDelay = /* @__PURE__ */ __name(() => Math.min(MAXIMUM_RETRY_DELAY, retryDelay), \"getRetryDelay\");\n const getRetryCost = /* @__PURE__ */ __name(() => retryCost, \"getRetryCost\");\n return {\n getRetryCount,\n getRetryDelay,\n getRetryCost\n };\n}, \"createDefaultRetryToken\");\n\n// src/StandardRetryStrategy.ts\nvar StandardRetryStrategy = class {\n constructor(maxAttempts) {\n this.maxAttempts = maxAttempts;\n this.mode = \"standard\" /* STANDARD */;\n this.capacity = INITIAL_RETRY_TOKENS;\n this.retryBackoffStrategy = getDefaultRetryBackoffStrategy();\n this.maxAttemptsProvider = typeof maxAttempts === \"function\" ? maxAttempts : async () => maxAttempts;\n }\n static {\n __name(this, \"StandardRetryStrategy\");\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n async acquireInitialRetryToken(retryTokenScope) {\n return createDefaultRetryToken({\n retryDelay: DEFAULT_RETRY_DELAY_BASE,\n retryCount: 0\n });\n }\n async refreshRetryTokenForRetry(token, errorInfo) {\n const maxAttempts = await this.getMaxAttempts();\n if (this.shouldRetry(token, errorInfo, maxAttempts)) {\n const errorType = errorInfo.errorType;\n this.retryBackoffStrategy.setDelayBase(\n errorType === \"THROTTLING\" ? THROTTLING_RETRY_DELAY_BASE : DEFAULT_RETRY_DELAY_BASE\n );\n const delayFromErrorType = this.retryBackoffStrategy.computeNextBackoffDelay(token.getRetryCount());\n const retryDelay = errorInfo.retryAfterHint ? Math.max(errorInfo.retryAfterHint.getTime() - Date.now() || 0, delayFromErrorType) : delayFromErrorType;\n const capacityCost = this.getCapacityCost(errorType);\n this.capacity -= capacityCost;\n return createDefaultRetryToken({\n retryDelay,\n retryCount: token.getRetryCount() + 1,\n retryCost: capacityCost\n });\n }\n throw new Error(\"No retry token available\");\n }\n recordSuccess(token) {\n this.capacity = Math.max(INITIAL_RETRY_TOKENS, this.capacity + (token.getRetryCost() ?? NO_RETRY_INCREMENT));\n }\n /**\n * @returns the current available retry capacity.\n *\n * This number decreases when retries are executed and refills when requests or retries succeed.\n */\n getCapacity() {\n return this.capacity;\n }\n async getMaxAttempts() {\n try {\n return await this.maxAttemptsProvider();\n } catch (error) {\n console.warn(`Max attempts provider could not resolve. Using default of ${DEFAULT_MAX_ATTEMPTS}`);\n return DEFAULT_MAX_ATTEMPTS;\n }\n }\n shouldRetry(tokenToRenew, errorInfo, maxAttempts) {\n const attempts = tokenToRenew.getRetryCount() + 1;\n return attempts < maxAttempts && this.capacity >= this.getCapacityCost(errorInfo.errorType) && this.isRetryableError(errorInfo.errorType);\n }\n getCapacityCost(errorType) {\n return errorType === \"TRANSIENT\" ? TIMEOUT_RETRY_COST : RETRY_COST;\n }\n isRetryableError(errorType) {\n return errorType === \"THROTTLING\" || errorType === \"TRANSIENT\";\n }\n};\n\n// src/AdaptiveRetryStrategy.ts\nvar AdaptiveRetryStrategy = class {\n constructor(maxAttemptsProvider, options) {\n this.maxAttemptsProvider = maxAttemptsProvider;\n this.mode = \"adaptive\" /* ADAPTIVE */;\n const { rateLimiter } = options ?? {};\n this.rateLimiter = rateLimiter ?? new DefaultRateLimiter();\n this.standardRetryStrategy = new StandardRetryStrategy(maxAttemptsProvider);\n }\n static {\n __name(this, \"AdaptiveRetryStrategy\");\n }\n async acquireInitialRetryToken(retryTokenScope) {\n await this.rateLimiter.getSendToken();\n return this.standardRetryStrategy.acquireInitialRetryToken(retryTokenScope);\n }\n async refreshRetryTokenForRetry(tokenToRenew, errorInfo) {\n this.rateLimiter.updateClientSendingRate(errorInfo);\n return this.standardRetryStrategy.refreshRetryTokenForRetry(tokenToRenew, errorInfo);\n }\n recordSuccess(token) {\n this.rateLimiter.updateClientSendingRate({});\n this.standardRetryStrategy.recordSuccess(token);\n }\n};\n\n// src/ConfiguredRetryStrategy.ts\nvar ConfiguredRetryStrategy = class extends StandardRetryStrategy {\n static {\n __name(this, \"ConfiguredRetryStrategy\");\n }\n /**\n * @param maxAttempts - the maximum number of retry attempts allowed.\n * e.g., if set to 3, then 4 total requests are possible.\n * @param computeNextBackoffDelay - a millisecond delay for each retry or a function that takes the retry attempt\n * and returns the delay.\n *\n * @example exponential backoff.\n * ```js\n * new Client({\n * retryStrategy: new ConfiguredRetryStrategy(3, (attempt) => attempt ** 2)\n * });\n * ```\n * @example constant delay.\n * ```js\n * new Client({\n * retryStrategy: new ConfiguredRetryStrategy(3, 2000)\n * });\n * ```\n */\n constructor(maxAttempts, computeNextBackoffDelay = DEFAULT_RETRY_DELAY_BASE) {\n super(typeof maxAttempts === \"function\" ? maxAttempts : async () => maxAttempts);\n if (typeof computeNextBackoffDelay === \"number\") {\n this.computeNextBackoffDelay = () => computeNextBackoffDelay;\n } else {\n this.computeNextBackoffDelay = computeNextBackoffDelay;\n }\n }\n async refreshRetryTokenForRetry(tokenToRenew, errorInfo) {\n const token = await super.refreshRetryTokenForRetry(tokenToRenew, errorInfo);\n token.getRetryDelay = () => this.computeNextBackoffDelay(token.getRetryCount());\n return token;\n }\n};\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n AdaptiveRetryStrategy,\n ConfiguredRetryStrategy,\n DefaultRateLimiter,\n StandardRetryStrategy,\n RETRY_MODES,\n DEFAULT_MAX_ATTEMPTS,\n DEFAULT_RETRY_MODE,\n DEFAULT_RETRY_DELAY_BASE,\n MAXIMUM_RETRY_DELAY,\n THROTTLING_RETRY_DELAY_BASE,\n INITIAL_RETRY_TOKENS,\n RETRY_COST,\n TIMEOUT_RETRY_COST,\n NO_RETRY_INCREMENT,\n INVOCATION_ID_HEADER,\n REQUEST_HEADER\n});\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ByteArrayCollector = void 0;\nclass ByteArrayCollector {\n constructor(allocByteArray) {\n this.allocByteArray = allocByteArray;\n this.byteLength = 0;\n this.byteArrays = [];\n }\n push(byteArray) {\n this.byteArrays.push(byteArray);\n this.byteLength += byteArray.byteLength;\n }\n flush() {\n if (this.byteArrays.length === 1) {\n const bytes = this.byteArrays[0];\n this.reset();\n return bytes;\n }\n const aggregation = this.allocByteArray(this.byteLength);\n let cursor = 0;\n for (let i = 0; i < this.byteArrays.length; ++i) {\n const bytes = this.byteArrays[i];\n aggregation.set(bytes, cursor);\n cursor += bytes.byteLength;\n }\n this.reset();\n return aggregation;\n }\n reset() {\n this.byteArrays = [];\n this.byteLength = 0;\n }\n}\nexports.ByteArrayCollector = ByteArrayCollector;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ChecksumStream = void 0;\nconst ReadableStreamRef = typeof ReadableStream === \"function\" ? ReadableStream : function () { };\nclass ChecksumStream extends ReadableStreamRef {\n}\nexports.ChecksumStream = ChecksumStream;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ChecksumStream = void 0;\nconst util_base64_1 = require(\"@smithy/util-base64\");\nconst stream_1 = require(\"stream\");\nclass ChecksumStream extends stream_1.Duplex {\n constructor({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder, }) {\n var _a, _b;\n super();\n if (typeof source.pipe === \"function\") {\n this.source = source;\n }\n else {\n throw new Error(`@smithy/util-stream: unsupported source type ${(_b = (_a = source === null || source === void 0 ? void 0 : source.constructor) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : source} in ChecksumStream.`);\n }\n this.base64Encoder = base64Encoder !== null && base64Encoder !== void 0 ? base64Encoder : util_base64_1.toBase64;\n this.expectedChecksum = expectedChecksum;\n this.checksum = checksum;\n this.checksumSourceLocation = checksumSourceLocation;\n this.source.pipe(this);\n }\n _read(size) { }\n _write(chunk, encoding, callback) {\n try {\n this.checksum.update(chunk);\n this.push(chunk);\n }\n catch (e) {\n return callback(e);\n }\n return callback();\n }\n async _final(callback) {\n try {\n const digest = await this.checksum.digest();\n const received = this.base64Encoder(digest);\n if (this.expectedChecksum !== received) {\n return callback(new Error(`Checksum mismatch: expected \"${this.expectedChecksum}\" but received \"${received}\"` +\n ` in response header \"${this.checksumSourceLocation}\".`));\n }\n }\n catch (e) {\n return callback(e);\n }\n this.push(null);\n return callback();\n }\n}\nexports.ChecksumStream = ChecksumStream;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createChecksumStream = void 0;\nconst util_base64_1 = require(\"@smithy/util-base64\");\nconst stream_type_check_1 = require(\"../stream-type-check\");\nconst ChecksumStream_browser_1 = require(\"./ChecksumStream.browser\");\nconst createChecksumStream = ({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder, }) => {\n var _a, _b;\n if (!(0, stream_type_check_1.isReadableStream)(source)) {\n throw new Error(`@smithy/util-stream: unsupported source type ${(_b = (_a = source === null || source === void 0 ? void 0 : source.constructor) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : source} in ChecksumStream.`);\n }\n const encoder = base64Encoder !== null && base64Encoder !== void 0 ? base64Encoder : util_base64_1.toBase64;\n if (typeof TransformStream !== \"function\") {\n throw new Error(\"@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream.\");\n }\n const transform = new TransformStream({\n start() { },\n async transform(chunk, controller) {\n checksum.update(chunk);\n controller.enqueue(chunk);\n },\n async flush(controller) {\n const digest = await checksum.digest();\n const received = encoder(digest);\n if (expectedChecksum !== received) {\n const error = new Error(`Checksum mismatch: expected \"${expectedChecksum}\" but received \"${received}\"` +\n ` in response header \"${checksumSourceLocation}\".`);\n controller.error(error);\n }\n else {\n controller.terminate();\n }\n },\n });\n source.pipeThrough(transform);\n const readable = transform.readable;\n Object.setPrototypeOf(readable, ChecksumStream_browser_1.ChecksumStream.prototype);\n return readable;\n};\nexports.createChecksumStream = createChecksumStream;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createChecksumStream = createChecksumStream;\nconst stream_type_check_1 = require(\"../stream-type-check\");\nconst ChecksumStream_1 = require(\"./ChecksumStream\");\nconst createChecksumStream_browser_1 = require(\"./createChecksumStream.browser\");\nfunction createChecksumStream(init) {\n if (typeof ReadableStream === \"function\" && (0, stream_type_check_1.isReadableStream)(init.source)) {\n return (0, createChecksumStream_browser_1.createChecksumStream)(init);\n }\n return new ChecksumStream_1.ChecksumStream(init);\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createBufferedReadable = createBufferedReadable;\nconst node_stream_1 = require(\"node:stream\");\nconst ByteArrayCollector_1 = require(\"./ByteArrayCollector\");\nconst createBufferedReadableStream_1 = require(\"./createBufferedReadableStream\");\nconst stream_type_check_1 = require(\"./stream-type-check\");\nfunction createBufferedReadable(upstream, size, logger) {\n if ((0, stream_type_check_1.isReadableStream)(upstream)) {\n return (0, createBufferedReadableStream_1.createBufferedReadableStream)(upstream, size, logger);\n }\n const downstream = new node_stream_1.Readable({ read() { } });\n let streamBufferingLoggedWarning = false;\n let bytesSeen = 0;\n const buffers = [\n \"\",\n new ByteArrayCollector_1.ByteArrayCollector((size) => new Uint8Array(size)),\n new ByteArrayCollector_1.ByteArrayCollector((size) => Buffer.from(new Uint8Array(size))),\n ];\n let mode = -1;\n upstream.on(\"data\", (chunk) => {\n const chunkMode = (0, createBufferedReadableStream_1.modeOf)(chunk, true);\n if (mode !== chunkMode) {\n if (mode >= 0) {\n downstream.push((0, createBufferedReadableStream_1.flush)(buffers, mode));\n }\n mode = chunkMode;\n }\n if (mode === -1) {\n downstream.push(chunk);\n return;\n }\n const chunkSize = (0, createBufferedReadableStream_1.sizeOf)(chunk);\n bytesSeen += chunkSize;\n const bufferSize = (0, createBufferedReadableStream_1.sizeOf)(buffers[mode]);\n if (chunkSize >= size && bufferSize === 0) {\n downstream.push(chunk);\n }\n else {\n const newSize = (0, createBufferedReadableStream_1.merge)(buffers, mode, chunk);\n if (!streamBufferingLoggedWarning && bytesSeen > size * 2) {\n streamBufferingLoggedWarning = true;\n logger === null || logger === void 0 ? void 0 : logger.warn(`@smithy/util-stream - stream chunk size ${chunkSize} is below threshold of ${size}, automatically buffering.`);\n }\n if (newSize >= size) {\n downstream.push((0, createBufferedReadableStream_1.flush)(buffers, mode));\n }\n }\n });\n upstream.on(\"end\", () => {\n if (mode !== -1) {\n const remainder = (0, createBufferedReadableStream_1.flush)(buffers, mode);\n if ((0, createBufferedReadableStream_1.sizeOf)(remainder) > 0) {\n downstream.push(remainder);\n }\n }\n downstream.push(null);\n });\n return downstream;\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createBufferedReadable = void 0;\nexports.createBufferedReadableStream = createBufferedReadableStream;\nexports.merge = merge;\nexports.flush = flush;\nexports.sizeOf = sizeOf;\nexports.modeOf = modeOf;\nconst ByteArrayCollector_1 = require(\"./ByteArrayCollector\");\nfunction createBufferedReadableStream(upstream, size, logger) {\n const reader = upstream.getReader();\n let streamBufferingLoggedWarning = false;\n let bytesSeen = 0;\n const buffers = [\"\", new ByteArrayCollector_1.ByteArrayCollector((size) => new Uint8Array(size))];\n let mode = -1;\n const pull = async (controller) => {\n const { value, done } = await reader.read();\n const chunk = value;\n if (done) {\n if (mode !== -1) {\n const remainder = flush(buffers, mode);\n if (sizeOf(remainder) > 0) {\n controller.enqueue(remainder);\n }\n }\n controller.close();\n }\n else {\n const chunkMode = modeOf(chunk, false);\n if (mode !== chunkMode) {\n if (mode >= 0) {\n controller.enqueue(flush(buffers, mode));\n }\n mode = chunkMode;\n }\n if (mode === -1) {\n controller.enqueue(chunk);\n return;\n }\n const chunkSize = sizeOf(chunk);\n bytesSeen += chunkSize;\n const bufferSize = sizeOf(buffers[mode]);\n if (chunkSize >= size && bufferSize === 0) {\n controller.enqueue(chunk);\n }\n else {\n const newSize = merge(buffers, mode, chunk);\n if (!streamBufferingLoggedWarning && bytesSeen > size * 2) {\n streamBufferingLoggedWarning = true;\n logger === null || logger === void 0 ? void 0 : logger.warn(`@smithy/util-stream - stream chunk size ${chunkSize} is below threshold of ${size}, automatically buffering.`);\n }\n if (newSize >= size) {\n controller.enqueue(flush(buffers, mode));\n }\n else {\n await pull(controller);\n }\n }\n }\n };\n return new ReadableStream({\n pull,\n });\n}\nexports.createBufferedReadable = createBufferedReadableStream;\nfunction merge(buffers, mode, chunk) {\n switch (mode) {\n case 0:\n buffers[0] += chunk;\n return sizeOf(buffers[0]);\n case 1:\n case 2:\n buffers[mode].push(chunk);\n return sizeOf(buffers[mode]);\n }\n}\nfunction flush(buffers, mode) {\n switch (mode) {\n case 0:\n const s = buffers[0];\n buffers[0] = \"\";\n return s;\n case 1:\n case 2:\n return buffers[mode].flush();\n }\n throw new Error(`@smithy/util-stream - invalid index ${mode} given to flush()`);\n}\nfunction sizeOf(chunk) {\n var _a, _b;\n return (_b = (_a = chunk === null || chunk === void 0 ? void 0 : chunk.byteLength) !== null && _a !== void 0 ? _a : chunk === null || chunk === void 0 ? void 0 : chunk.length) !== null && _b !== void 0 ? _b : 0;\n}\nfunction modeOf(chunk, allowBuffer = true) {\n if (allowBuffer && typeof Buffer !== \"undefined\" && chunk instanceof Buffer) {\n return 2;\n }\n if (chunk instanceof Uint8Array) {\n return 1;\n }\n if (typeof chunk === \"string\") {\n return 0;\n }\n return -1;\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getAwsChunkedEncodingStream = void 0;\nconst stream_1 = require(\"stream\");\nconst getAwsChunkedEncodingStream = (readableStream, options) => {\n const { base64Encoder, bodyLengthChecker, checksumAlgorithmFn, checksumLocationName, streamHasher } = options;\n const checksumRequired = base64Encoder !== undefined &&\n checksumAlgorithmFn !== undefined &&\n checksumLocationName !== undefined &&\n streamHasher !== undefined;\n const digest = checksumRequired ? streamHasher(checksumAlgorithmFn, readableStream) : undefined;\n const awsChunkedEncodingStream = new stream_1.Readable({ read: () => { } });\n readableStream.on(\"data\", (data) => {\n const length = bodyLengthChecker(data) || 0;\n awsChunkedEncodingStream.push(`${length.toString(16)}\\r\\n`);\n awsChunkedEncodingStream.push(data);\n awsChunkedEncodingStream.push(\"\\r\\n\");\n });\n readableStream.on(\"end\", async () => {\n awsChunkedEncodingStream.push(`0\\r\\n`);\n if (checksumRequired) {\n const checksum = base64Encoder(await digest);\n awsChunkedEncodingStream.push(`${checksumLocationName}:${checksum}\\r\\n`);\n awsChunkedEncodingStream.push(`\\r\\n`);\n }\n awsChunkedEncodingStream.push(null);\n });\n return awsChunkedEncodingStream;\n};\nexports.getAwsChunkedEncodingStream = getAwsChunkedEncodingStream;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.headStream = headStream;\nasync function headStream(stream, bytes) {\n var _a;\n let byteLengthCounter = 0;\n const chunks = [];\n const reader = stream.getReader();\n let isDone = false;\n while (!isDone) {\n const { done, value } = await reader.read();\n if (value) {\n chunks.push(value);\n byteLengthCounter += (_a = value === null || value === void 0 ? void 0 : value.byteLength) !== null && _a !== void 0 ? _a : 0;\n }\n if (byteLengthCounter >= bytes) {\n break;\n }\n isDone = done;\n }\n reader.releaseLock();\n const collected = new Uint8Array(Math.min(bytes, byteLengthCounter));\n let offset = 0;\n for (const chunk of chunks) {\n if (chunk.byteLength > collected.byteLength - offset) {\n collected.set(chunk.subarray(0, collected.byteLength - offset), offset);\n break;\n }\n else {\n collected.set(chunk, offset);\n }\n offset += chunk.length;\n }\n return collected;\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.headStream = void 0;\nconst stream_1 = require(\"stream\");\nconst headStream_browser_1 = require(\"./headStream.browser\");\nconst stream_type_check_1 = require(\"./stream-type-check\");\nconst headStream = (stream, bytes) => {\n if ((0, stream_type_check_1.isReadableStream)(stream)) {\n return (0, headStream_browser_1.headStream)(stream, bytes);\n }\n return new Promise((resolve, reject) => {\n const collector = new Collector();\n collector.limit = bytes;\n stream.pipe(collector);\n stream.on(\"error\", (err) => {\n collector.end();\n reject(err);\n });\n collector.on(\"error\", reject);\n collector.on(\"finish\", function () {\n const bytes = new Uint8Array(Buffer.concat(this.buffers));\n resolve(bytes);\n });\n });\n};\nexports.headStream = headStream;\nclass Collector extends stream_1.Writable {\n constructor() {\n super(...arguments);\n this.buffers = [];\n this.limit = Infinity;\n this.bytesBuffered = 0;\n }\n _write(chunk, encoding, callback) {\n var _a;\n this.buffers.push(chunk);\n this.bytesBuffered += (_a = chunk.byteLength) !== null && _a !== void 0 ? _a : 0;\n if (this.bytesBuffered >= this.limit) {\n const excess = this.bytesBuffered - this.limit;\n const tailBuffer = this.buffers[this.buffers.length - 1];\n this.buffers[this.buffers.length - 1] = tailBuffer.subarray(0, tailBuffer.byteLength - excess);\n this.emit(\"finish\");\n }\n callback();\n }\n}\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n Uint8ArrayBlobAdapter: () => Uint8ArrayBlobAdapter\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/blob/transforms.ts\nvar import_util_base64 = require(\"@smithy/util-base64\");\nvar import_util_utf8 = require(\"@smithy/util-utf8\");\nfunction transformToString(payload, encoding = \"utf-8\") {\n if (encoding === \"base64\") {\n return (0, import_util_base64.toBase64)(payload);\n }\n return (0, import_util_utf8.toUtf8)(payload);\n}\n__name(transformToString, \"transformToString\");\nfunction transformFromString(str, encoding) {\n if (encoding === \"base64\") {\n return Uint8ArrayBlobAdapter.mutate((0, import_util_base64.fromBase64)(str));\n }\n return Uint8ArrayBlobAdapter.mutate((0, import_util_utf8.fromUtf8)(str));\n}\n__name(transformFromString, \"transformFromString\");\n\n// src/blob/Uint8ArrayBlobAdapter.ts\nvar Uint8ArrayBlobAdapter = class _Uint8ArrayBlobAdapter extends Uint8Array {\n static {\n __name(this, \"Uint8ArrayBlobAdapter\");\n }\n /**\n * @param source - such as a string or Stream.\n * @returns a new Uint8ArrayBlobAdapter extending Uint8Array.\n */\n static fromString(source, encoding = \"utf-8\") {\n switch (typeof source) {\n case \"string\":\n return transformFromString(source, encoding);\n default:\n throw new Error(`Unsupported conversion from ${typeof source} to Uint8ArrayBlobAdapter.`);\n }\n }\n /**\n * @param source - Uint8Array to be mutated.\n * @returns the same Uint8Array but with prototype switched to Uint8ArrayBlobAdapter.\n */\n static mutate(source) {\n Object.setPrototypeOf(source, _Uint8ArrayBlobAdapter.prototype);\n return source;\n }\n /**\n * @param encoding - default 'utf-8'.\n * @returns the blob as string.\n */\n transformToString(encoding = \"utf-8\") {\n return transformToString(this, encoding);\n }\n};\n\n// src/index.ts\n__reExport(src_exports, require(\"./checksum/ChecksumStream\"), module.exports);\n__reExport(src_exports, require(\"./checksum/createChecksumStream\"), module.exports);\n__reExport(src_exports, require(\"././createBufferedReadable\"), module.exports);\n__reExport(src_exports, require(\"././getAwsChunkedEncodingStream\"), module.exports);\n__reExport(src_exports, require(\"././headStream\"), module.exports);\n__reExport(src_exports, require(\"././sdk-stream-mixin\"), module.exports);\n__reExport(src_exports, require(\"././splitStream\"), module.exports);\n__reExport(src_exports, require(\"././stream-type-check\"), module.exports);\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n Uint8ArrayBlobAdapter,\n ChecksumStream,\n createChecksumStream,\n createBufferedReadable,\n getAwsChunkedEncodingStream,\n headStream,\n sdkStreamMixin,\n splitStream,\n isReadableStream,\n isBlob\n});\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.sdkStreamMixin = void 0;\nconst fetch_http_handler_1 = require(\"@smithy/fetch-http-handler\");\nconst util_base64_1 = require(\"@smithy/util-base64\");\nconst util_hex_encoding_1 = require(\"@smithy/util-hex-encoding\");\nconst util_utf8_1 = require(\"@smithy/util-utf8\");\nconst stream_type_check_1 = require(\"./stream-type-check\");\nconst ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = \"The stream has already been transformed.\";\nconst sdkStreamMixin = (stream) => {\n var _a, _b;\n if (!isBlobInstance(stream) && !(0, stream_type_check_1.isReadableStream)(stream)) {\n const name = ((_b = (_a = stream === null || stream === void 0 ? void 0 : stream.__proto__) === null || _a === void 0 ? void 0 : _a.constructor) === null || _b === void 0 ? void 0 : _b.name) || stream;\n throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${name}`);\n }\n let transformed = false;\n const transformToByteArray = async () => {\n if (transformed) {\n throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);\n }\n transformed = true;\n return await (0, fetch_http_handler_1.streamCollector)(stream);\n };\n const blobToWebStream = (blob) => {\n if (typeof blob.stream !== \"function\") {\n throw new Error(\"Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\\n\" +\n \"If you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body\");\n }\n return blob.stream();\n };\n return Object.assign(stream, {\n transformToByteArray: transformToByteArray,\n transformToString: async (encoding) => {\n const buf = await transformToByteArray();\n if (encoding === \"base64\") {\n return (0, util_base64_1.toBase64)(buf);\n }\n else if (encoding === \"hex\") {\n return (0, util_hex_encoding_1.toHex)(buf);\n }\n else if (encoding === undefined || encoding === \"utf8\" || encoding === \"utf-8\") {\n return (0, util_utf8_1.toUtf8)(buf);\n }\n else if (typeof TextDecoder === \"function\") {\n return new TextDecoder(encoding).decode(buf);\n }\n else {\n throw new Error(\"TextDecoder is not available, please make sure polyfill is provided.\");\n }\n },\n transformToWebStream: () => {\n if (transformed) {\n throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);\n }\n transformed = true;\n if (isBlobInstance(stream)) {\n return blobToWebStream(stream);\n }\n else if ((0, stream_type_check_1.isReadableStream)(stream)) {\n return stream;\n }\n else {\n throw new Error(`Cannot transform payload to web stream, got ${stream}`);\n }\n },\n });\n};\nexports.sdkStreamMixin = sdkStreamMixin;\nconst isBlobInstance = (stream) => typeof Blob === \"function\" && stream instanceof Blob;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.sdkStreamMixin = void 0;\nconst node_http_handler_1 = require(\"@smithy/node-http-handler\");\nconst util_buffer_from_1 = require(\"@smithy/util-buffer-from\");\nconst stream_1 = require(\"stream\");\nconst sdk_stream_mixin_browser_1 = require(\"./sdk-stream-mixin.browser\");\nconst ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = \"The stream has already been transformed.\";\nconst sdkStreamMixin = (stream) => {\n var _a, _b;\n if (!(stream instanceof stream_1.Readable)) {\n try {\n return (0, sdk_stream_mixin_browser_1.sdkStreamMixin)(stream);\n }\n catch (e) {\n const name = ((_b = (_a = stream === null || stream === void 0 ? void 0 : stream.__proto__) === null || _a === void 0 ? void 0 : _a.constructor) === null || _b === void 0 ? void 0 : _b.name) || stream;\n throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${name}`);\n }\n }\n let transformed = false;\n const transformToByteArray = async () => {\n if (transformed) {\n throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);\n }\n transformed = true;\n return await (0, node_http_handler_1.streamCollector)(stream);\n };\n return Object.assign(stream, {\n transformToByteArray,\n transformToString: async (encoding) => {\n const buf = await transformToByteArray();\n if (encoding === undefined || Buffer.isEncoding(encoding)) {\n return (0, util_buffer_from_1.fromArrayBuffer)(buf.buffer, buf.byteOffset, buf.byteLength).toString(encoding);\n }\n else {\n const decoder = new TextDecoder(encoding);\n return decoder.decode(buf);\n }\n },\n transformToWebStream: () => {\n if (transformed) {\n throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);\n }\n if (stream.readableFlowing !== null) {\n throw new Error(\"The stream has been consumed by other callbacks.\");\n }\n if (typeof stream_1.Readable.toWeb !== \"function\") {\n throw new Error(\"Readable.toWeb() is not supported. Please ensure a polyfill is available.\");\n }\n transformed = true;\n return stream_1.Readable.toWeb(stream);\n },\n });\n};\nexports.sdkStreamMixin = sdkStreamMixin;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.splitStream = splitStream;\nasync function splitStream(stream) {\n if (typeof stream.stream === \"function\") {\n stream = stream.stream();\n }\n const readableStream = stream;\n return readableStream.tee();\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.splitStream = splitStream;\nconst stream_1 = require(\"stream\");\nconst splitStream_browser_1 = require(\"./splitStream.browser\");\nconst stream_type_check_1 = require(\"./stream-type-check\");\nasync function splitStream(stream) {\n if ((0, stream_type_check_1.isReadableStream)(stream) || (0, stream_type_check_1.isBlob)(stream)) {\n return (0, splitStream_browser_1.splitStream)(stream);\n }\n const stream1 = new stream_1.PassThrough();\n const stream2 = new stream_1.PassThrough();\n stream.pipe(stream1);\n stream.pipe(stream2);\n return [stream1, stream2];\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isBlob = exports.isReadableStream = void 0;\nconst isReadableStream = (stream) => {\n var _a;\n return typeof ReadableStream === \"function\" &&\n (((_a = stream === null || stream === void 0 ? void 0 : stream.constructor) === null || _a === void 0 ? void 0 : _a.name) === ReadableStream.name || stream instanceof ReadableStream);\n};\nexports.isReadableStream = isReadableStream;\nconst isBlob = (blob) => {\n var _a;\n return typeof Blob === \"function\" && (((_a = blob === null || blob === void 0 ? void 0 : blob.constructor) === null || _a === void 0 ? void 0 : _a.name) === Blob.name || blob instanceof Blob);\n};\nexports.isBlob = isBlob;\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n escapeUri: () => escapeUri,\n escapeUriPath: () => escapeUriPath\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/escape-uri.ts\nvar escapeUri = /* @__PURE__ */ __name((uri) => (\n // AWS percent-encodes some extra non-standard characters in a URI\n encodeURIComponent(uri).replace(/[!'()*]/g, hexEncode)\n), \"escapeUri\");\nvar hexEncode = /* @__PURE__ */ __name((c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`, \"hexEncode\");\n\n// src/escape-uri-path.ts\nvar escapeUriPath = /* @__PURE__ */ __name((uri) => uri.split(\"/\").map(escapeUri).join(\"/\"), \"escapeUriPath\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n escapeUri,\n escapeUriPath\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n fromUtf8: () => fromUtf8,\n toUint8Array: () => toUint8Array,\n toUtf8: () => toUtf8\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/fromUtf8.ts\nvar import_util_buffer_from = require(\"@smithy/util-buffer-from\");\nvar fromUtf8 = /* @__PURE__ */ __name((input) => {\n const buf = (0, import_util_buffer_from.fromString)(input, \"utf8\");\n return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength / Uint8Array.BYTES_PER_ELEMENT);\n}, \"fromUtf8\");\n\n// src/toUint8Array.ts\nvar toUint8Array = /* @__PURE__ */ __name((data) => {\n if (typeof data === \"string\") {\n return fromUtf8(data);\n }\n if (ArrayBuffer.isView(data)) {\n return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);\n }\n return new Uint8Array(data);\n}, \"toUint8Array\");\n\n// src/toUtf8.ts\n\nvar toUtf8 = /* @__PURE__ */ __name((input) => {\n if (typeof input === \"string\") {\n return input;\n }\n if (typeof input !== \"object\" || typeof input.byteOffset !== \"number\" || typeof input.byteLength !== \"number\") {\n throw new Error(\"@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.\");\n }\n return (0, import_util_buffer_from.fromArrayBuffer)(input.buffer, input.byteOffset, input.byteLength).toString(\"utf8\");\n}, \"toUtf8\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n fromUtf8,\n toUint8Array,\n toUtf8\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n WaiterState: () => WaiterState,\n checkExceptions: () => checkExceptions,\n createWaiter: () => createWaiter,\n waiterServiceDefaults: () => waiterServiceDefaults\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/utils/sleep.ts\nvar sleep = /* @__PURE__ */ __name((seconds) => {\n return new Promise((resolve) => setTimeout(resolve, seconds * 1e3));\n}, \"sleep\");\n\n// src/waiter.ts\nvar waiterServiceDefaults = {\n minDelay: 2,\n maxDelay: 120\n};\nvar WaiterState = /* @__PURE__ */ ((WaiterState2) => {\n WaiterState2[\"ABORTED\"] = \"ABORTED\";\n WaiterState2[\"FAILURE\"] = \"FAILURE\";\n WaiterState2[\"SUCCESS\"] = \"SUCCESS\";\n WaiterState2[\"RETRY\"] = \"RETRY\";\n WaiterState2[\"TIMEOUT\"] = \"TIMEOUT\";\n return WaiterState2;\n})(WaiterState || {});\nvar checkExceptions = /* @__PURE__ */ __name((result) => {\n if (result.state === \"ABORTED\" /* ABORTED */) {\n const abortError = new Error(\n `${JSON.stringify({\n ...result,\n reason: \"Request was aborted\"\n })}`\n );\n abortError.name = \"AbortError\";\n throw abortError;\n } else if (result.state === \"TIMEOUT\" /* TIMEOUT */) {\n const timeoutError = new Error(\n `${JSON.stringify({\n ...result,\n reason: \"Waiter has timed out\"\n })}`\n );\n timeoutError.name = \"TimeoutError\";\n throw timeoutError;\n } else if (result.state !== \"SUCCESS\" /* SUCCESS */) {\n throw new Error(`${JSON.stringify(result)}`);\n }\n return result;\n}, \"checkExceptions\");\n\n// src/poller.ts\nvar exponentialBackoffWithJitter = /* @__PURE__ */ __name((minDelay, maxDelay, attemptCeiling, attempt) => {\n if (attempt > attemptCeiling)\n return maxDelay;\n const delay = minDelay * 2 ** (attempt - 1);\n return randomInRange(minDelay, delay);\n}, \"exponentialBackoffWithJitter\");\nvar randomInRange = /* @__PURE__ */ __name((min, max) => min + Math.random() * (max - min), \"randomInRange\");\nvar runPolling = /* @__PURE__ */ __name(async ({ minDelay, maxDelay, maxWaitTime, abortController, client, abortSignal }, input, acceptorChecks) => {\n const observedResponses = {};\n const { state, reason } = await acceptorChecks(client, input);\n if (reason) {\n const message = createMessageFromResponse(reason);\n observedResponses[message] |= 0;\n observedResponses[message] += 1;\n }\n if (state !== \"RETRY\" /* RETRY */) {\n return { state, reason, observedResponses };\n }\n let currentAttempt = 1;\n const waitUntil = Date.now() + maxWaitTime * 1e3;\n const attemptCeiling = Math.log(maxDelay / minDelay) / Math.log(2) + 1;\n while (true) {\n if (abortController?.signal?.aborted || abortSignal?.aborted) {\n const message = \"AbortController signal aborted.\";\n observedResponses[message] |= 0;\n observedResponses[message] += 1;\n return { state: \"ABORTED\" /* ABORTED */, observedResponses };\n }\n const delay = exponentialBackoffWithJitter(minDelay, maxDelay, attemptCeiling, currentAttempt);\n if (Date.now() + delay * 1e3 > waitUntil) {\n return { state: \"TIMEOUT\" /* TIMEOUT */, observedResponses };\n }\n await sleep(delay);\n const { state: state2, reason: reason2 } = await acceptorChecks(client, input);\n if (reason2) {\n const message = createMessageFromResponse(reason2);\n observedResponses[message] |= 0;\n observedResponses[message] += 1;\n }\n if (state2 !== \"RETRY\" /* RETRY */) {\n return { state: state2, reason: reason2, observedResponses };\n }\n currentAttempt += 1;\n }\n}, \"runPolling\");\nvar createMessageFromResponse = /* @__PURE__ */ __name((reason) => {\n if (reason?.$responseBodyText) {\n return `Deserialization error for body: ${reason.$responseBodyText}`;\n }\n if (reason?.$metadata?.httpStatusCode) {\n if (reason.$response || reason.message) {\n return `${reason.$response.statusCode ?? reason.$metadata.httpStatusCode ?? \"Unknown\"}: ${reason.message}`;\n }\n return `${reason.$metadata.httpStatusCode}: OK`;\n }\n return String(reason?.message ?? JSON.stringify(reason) ?? \"Unknown\");\n}, \"createMessageFromResponse\");\n\n// src/utils/validate.ts\nvar validateWaiterOptions = /* @__PURE__ */ __name((options) => {\n if (options.maxWaitTime <= 0) {\n throw new Error(`WaiterConfiguration.maxWaitTime must be greater than 0`);\n } else if (options.minDelay <= 0) {\n throw new Error(`WaiterConfiguration.minDelay must be greater than 0`);\n } else if (options.maxDelay <= 0) {\n throw new Error(`WaiterConfiguration.maxDelay must be greater than 0`);\n } else if (options.maxWaitTime <= options.minDelay) {\n throw new Error(\n `WaiterConfiguration.maxWaitTime [${options.maxWaitTime}] must be greater than WaiterConfiguration.minDelay [${options.minDelay}] for this waiter`\n );\n } else if (options.maxDelay < options.minDelay) {\n throw new Error(\n `WaiterConfiguration.maxDelay [${options.maxDelay}] must be greater than WaiterConfiguration.minDelay [${options.minDelay}] for this waiter`\n );\n }\n}, \"validateWaiterOptions\");\n\n// src/createWaiter.ts\nvar abortTimeout = /* @__PURE__ */ __name(async (abortSignal) => {\n return new Promise((resolve) => {\n const onAbort = /* @__PURE__ */ __name(() => resolve({ state: \"ABORTED\" /* ABORTED */ }), \"onAbort\");\n if (typeof abortSignal.addEventListener === \"function\") {\n abortSignal.addEventListener(\"abort\", onAbort);\n } else {\n abortSignal.onabort = onAbort;\n }\n });\n}, \"abortTimeout\");\nvar createWaiter = /* @__PURE__ */ __name(async (options, input, acceptorChecks) => {\n const params = {\n ...waiterServiceDefaults,\n ...options\n };\n validateWaiterOptions(params);\n const exitConditions = [runPolling(params, input, acceptorChecks)];\n if (options.abortController) {\n exitConditions.push(abortTimeout(options.abortController.signal));\n }\n if (options.abortSignal) {\n exitConditions.push(abortTimeout(options.abortSignal));\n }\n return Promise.race(exitConditions);\n}, \"createWaiter\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n createWaiter,\n waiterServiceDefaults,\n WaiterState,\n checkExceptions\n});\n\n","'use strict';\n\nmodule.exports = ({onlyFirst = false} = {}) => {\n\tconst pattern = [\n\t\t'[\\\\u001B\\\\u009B][[\\\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]+)*|[a-zA-Z\\\\d]+(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]*)*)?\\\\u0007)',\n\t\t'(?:(?:\\\\d{1,4}(?:;\\\\d{0,4})*)?[\\\\dA-PR-TZcf-ntqry=><~]))'\n\t].join('|');\n\n\treturn new RegExp(pattern, onlyFirst ? undefined : 'g');\n};\n","'use strict';\n\nconst wrapAnsi16 = (fn, offset) => (...args) => {\n\tconst code = fn(...args);\n\treturn `\\u001B[${code + offset}m`;\n};\n\nconst wrapAnsi256 = (fn, offset) => (...args) => {\n\tconst code = fn(...args);\n\treturn `\\u001B[${38 + offset};5;${code}m`;\n};\n\nconst wrapAnsi16m = (fn, offset) => (...args) => {\n\tconst rgb = fn(...args);\n\treturn `\\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;\n};\n\nconst ansi2ansi = n => n;\nconst rgb2rgb = (r, g, b) => [r, g, b];\n\nconst setLazyProperty = (object, property, get) => {\n\tObject.defineProperty(object, property, {\n\t\tget: () => {\n\t\t\tconst value = get();\n\n\t\t\tObject.defineProperty(object, property, {\n\t\t\t\tvalue,\n\t\t\t\tenumerable: true,\n\t\t\t\tconfigurable: true\n\t\t\t});\n\n\t\t\treturn value;\n\t\t},\n\t\tenumerable: true,\n\t\tconfigurable: true\n\t});\n};\n\n/** @type {typeof import('color-convert')} */\nlet colorConvert;\nconst makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => {\n\tif (colorConvert === undefined) {\n\t\tcolorConvert = require('color-convert');\n\t}\n\n\tconst offset = isBackground ? 10 : 0;\n\tconst styles = {};\n\n\tfor (const [sourceSpace, suite] of Object.entries(colorConvert)) {\n\t\tconst name = sourceSpace === 'ansi16' ? 'ansi' : sourceSpace;\n\t\tif (sourceSpace === targetSpace) {\n\t\t\tstyles[name] = wrap(identity, offset);\n\t\t} else if (typeof suite === 'object') {\n\t\t\tstyles[name] = wrap(suite[targetSpace], offset);\n\t\t}\n\t}\n\n\treturn styles;\n};\n\nfunction assembleStyles() {\n\tconst codes = new Map();\n\tconst styles = {\n\t\tmodifier: {\n\t\t\treset: [0, 0],\n\t\t\t// 21 isn't widely supported and 22 does the same thing\n\t\t\tbold: [1, 22],\n\t\t\tdim: [2, 22],\n\t\t\titalic: [3, 23],\n\t\t\tunderline: [4, 24],\n\t\t\tinverse: [7, 27],\n\t\t\thidden: [8, 28],\n\t\t\tstrikethrough: [9, 29]\n\t\t},\n\t\tcolor: {\n\t\t\tblack: [30, 39],\n\t\t\tred: [31, 39],\n\t\t\tgreen: [32, 39],\n\t\t\tyellow: [33, 39],\n\t\t\tblue: [34, 39],\n\t\t\tmagenta: [35, 39],\n\t\t\tcyan: [36, 39],\n\t\t\twhite: [37, 39],\n\n\t\t\t// Bright color\n\t\t\tblackBright: [90, 39],\n\t\t\tredBright: [91, 39],\n\t\t\tgreenBright: [92, 39],\n\t\t\tyellowBright: [93, 39],\n\t\t\tblueBright: [94, 39],\n\t\t\tmagentaBright: [95, 39],\n\t\t\tcyanBright: [96, 39],\n\t\t\twhiteBright: [97, 39]\n\t\t},\n\t\tbgColor: {\n\t\t\tbgBlack: [40, 49],\n\t\t\tbgRed: [41, 49],\n\t\t\tbgGreen: [42, 49],\n\t\t\tbgYellow: [43, 49],\n\t\t\tbgBlue: [44, 49],\n\t\t\tbgMagenta: [45, 49],\n\t\t\tbgCyan: [46, 49],\n\t\t\tbgWhite: [47, 49],\n\n\t\t\t// Bright color\n\t\t\tbgBlackBright: [100, 49],\n\t\t\tbgRedBright: [101, 49],\n\t\t\tbgGreenBright: [102, 49],\n\t\t\tbgYellowBright: [103, 49],\n\t\t\tbgBlueBright: [104, 49],\n\t\t\tbgMagentaBright: [105, 49],\n\t\t\tbgCyanBright: [106, 49],\n\t\t\tbgWhiteBright: [107, 49]\n\t\t}\n\t};\n\n\t// Alias bright black as gray (and grey)\n\tstyles.color.gray = styles.color.blackBright;\n\tstyles.bgColor.bgGray = styles.bgColor.bgBlackBright;\n\tstyles.color.grey = styles.color.blackBright;\n\tstyles.bgColor.bgGrey = styles.bgColor.bgBlackBright;\n\n\tfor (const [groupName, group] of Object.entries(styles)) {\n\t\tfor (const [styleName, style] of Object.entries(group)) {\n\t\t\tstyles[styleName] = {\n\t\t\t\topen: `\\u001B[${style[0]}m`,\n\t\t\t\tclose: `\\u001B[${style[1]}m`\n\t\t\t};\n\n\t\t\tgroup[styleName] = styles[styleName];\n\n\t\t\tcodes.set(style[0], style[1]);\n\t\t}\n\n\t\tObject.defineProperty(styles, groupName, {\n\t\t\tvalue: group,\n\t\t\tenumerable: false\n\t\t});\n\t}\n\n\tObject.defineProperty(styles, 'codes', {\n\t\tvalue: codes,\n\t\tenumerable: false\n\t});\n\n\tstyles.color.close = '\\u001B[39m';\n\tstyles.bgColor.close = '\\u001B[49m';\n\n\tsetLazyProperty(styles.color, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, false));\n\tsetLazyProperty(styles.color, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, false));\n\tsetLazyProperty(styles.color, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, false));\n\tsetLazyProperty(styles.bgColor, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, true));\n\tsetLazyProperty(styles.bgColor, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, true));\n\tsetLazyProperty(styles.bgColor, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, true));\n\n\treturn styles;\n}\n\n// Make the export immutable\nObject.defineProperty(module, 'exports', {\n\tenumerable: true,\n\tget: assembleStyles\n});\n","'use strict';\nconst regex = '[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]';\n\nconst astralRegex = options => options && options.exact ? new RegExp(`^${regex}$`) : new RegExp(regex, 'g');\n\nmodule.exports = astralRegex;\n","var register = require(\"./lib/register\");\nvar addHook = require(\"./lib/add\");\nvar removeHook = require(\"./lib/remove\");\n\n// bind with array of arguments: https://stackoverflow.com/a/21792913\nvar bind = Function.bind;\nvar bindable = bind.bind(bind);\n\nfunction bindApi(hook, state, name) {\n var removeHookRef = bindable(removeHook, null).apply(\n null,\n name ? [state, name] : [state]\n );\n hook.api = { remove: removeHookRef };\n hook.remove = removeHookRef;\n [\"before\", \"error\", \"after\", \"wrap\"].forEach(function (kind) {\n var args = name ? [state, kind, name] : [state, kind];\n hook[kind] = hook.api[kind] = bindable(addHook, null).apply(null, args);\n });\n}\n\nfunction HookSingular() {\n var singularHookName = \"h\";\n var singularHookState = {\n registry: {},\n };\n var singularHook = register.bind(null, singularHookState, singularHookName);\n bindApi(singularHook, singularHookState, singularHookName);\n return singularHook;\n}\n\nfunction HookCollection() {\n var state = {\n registry: {},\n };\n\n var hook = register.bind(null, state);\n bindApi(hook, state);\n\n return hook;\n}\n\nvar collectionHookDeprecationMessageDisplayed = false;\nfunction Hook() {\n if (!collectionHookDeprecationMessageDisplayed) {\n console.warn(\n '[before-after-hook]: \"Hook()\" repurposing warning, use \"Hook.Collection()\". Read more: https://git.io/upgrade-before-after-hook-to-1.4'\n );\n collectionHookDeprecationMessageDisplayed = true;\n }\n return HookCollection();\n}\n\nHook.Singular = HookSingular.bind();\nHook.Collection = HookCollection.bind();\n\nmodule.exports = Hook;\n// expose constructors as a named property for TypeScript\nmodule.exports.Hook = Hook;\nmodule.exports.Singular = Hook.Singular;\nmodule.exports.Collection = Hook.Collection;\n","module.exports = addHook;\n\nfunction addHook(state, kind, name, hook) {\n var orig = hook;\n if (!state.registry[name]) {\n state.registry[name] = [];\n }\n\n if (kind === \"before\") {\n hook = function (method, options) {\n return Promise.resolve()\n .then(orig.bind(null, options))\n .then(method.bind(null, options));\n };\n }\n\n if (kind === \"after\") {\n hook = function (method, options) {\n var result;\n return Promise.resolve()\n .then(method.bind(null, options))\n .then(function (result_) {\n result = result_;\n return orig(result, options);\n })\n .then(function () {\n return result;\n });\n };\n }\n\n if (kind === \"error\") {\n hook = function (method, options) {\n return Promise.resolve()\n .then(method.bind(null, options))\n .catch(function (error) {\n return orig(error, options);\n });\n };\n }\n\n state.registry[name].push({\n hook: hook,\n orig: orig,\n });\n}\n","module.exports = register;\n\nfunction register(state, name, method, options) {\n if (typeof method !== \"function\") {\n throw new Error(\"method for before hook must be a function\");\n }\n\n if (!options) {\n options = {};\n }\n\n if (Array.isArray(name)) {\n return name.reverse().reduce(function (callback, name) {\n return register.bind(null, state, name, callback, options);\n }, method)();\n }\n\n return Promise.resolve().then(function () {\n if (!state.registry[name]) {\n return method(options);\n }\n\n return state.registry[name].reduce(function (method, registered) {\n return registered.hook.bind(null, method, options);\n }, method)();\n });\n}\n","module.exports = removeHook;\n\nfunction removeHook(state, name, method) {\n if (!state.registry[name]) {\n return;\n }\n\n var index = state.registry[name]\n .map(function (registered) {\n return registered.orig;\n })\n .indexOf(method);\n\n if (index === -1) {\n return;\n }\n\n state.registry[name].splice(index, 1);\n}\n","'use strict';\nconst ansiStyles = require('ansi-styles');\nconst {stdout: stdoutColor, stderr: stderrColor} = require('supports-color');\nconst {\n\tstringReplaceAll,\n\tstringEncaseCRLFWithFirstIndex\n} = require('./util');\n\nconst {isArray} = Array;\n\n// `supportsColor.level` → `ansiStyles.color[name]` mapping\nconst levelMapping = [\n\t'ansi',\n\t'ansi',\n\t'ansi256',\n\t'ansi16m'\n];\n\nconst styles = Object.create(null);\n\nconst applyOptions = (object, options = {}) => {\n\tif (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {\n\t\tthrow new Error('The `level` option should be an integer from 0 to 3');\n\t}\n\n\t// Detect level if not set manually\n\tconst colorLevel = stdoutColor ? stdoutColor.level : 0;\n\tobject.level = options.level === undefined ? colorLevel : options.level;\n};\n\nclass ChalkClass {\n\tconstructor(options) {\n\t\t// eslint-disable-next-line no-constructor-return\n\t\treturn chalkFactory(options);\n\t}\n}\n\nconst chalkFactory = options => {\n\tconst chalk = {};\n\tapplyOptions(chalk, options);\n\n\tchalk.template = (...arguments_) => chalkTag(chalk.template, ...arguments_);\n\n\tObject.setPrototypeOf(chalk, Chalk.prototype);\n\tObject.setPrototypeOf(chalk.template, chalk);\n\n\tchalk.template.constructor = () => {\n\t\tthrow new Error('`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.');\n\t};\n\n\tchalk.template.Instance = ChalkClass;\n\n\treturn chalk.template;\n};\n\nfunction Chalk(options) {\n\treturn chalkFactory(options);\n}\n\nfor (const [styleName, style] of Object.entries(ansiStyles)) {\n\tstyles[styleName] = {\n\t\tget() {\n\t\t\tconst builder = createBuilder(this, createStyler(style.open, style.close, this._styler), this._isEmpty);\n\t\t\tObject.defineProperty(this, styleName, {value: builder});\n\t\t\treturn builder;\n\t\t}\n\t};\n}\n\nstyles.visible = {\n\tget() {\n\t\tconst builder = createBuilder(this, this._styler, true);\n\t\tObject.defineProperty(this, 'visible', {value: builder});\n\t\treturn builder;\n\t}\n};\n\nconst usedModels = ['rgb', 'hex', 'keyword', 'hsl', 'hsv', 'hwb', 'ansi', 'ansi256'];\n\nfor (const model of usedModels) {\n\tstyles[model] = {\n\t\tget() {\n\t\t\tconst {level} = this;\n\t\t\treturn function (...arguments_) {\n\t\t\t\tconst styler = createStyler(ansiStyles.color[levelMapping[level]][model](...arguments_), ansiStyles.color.close, this._styler);\n\t\t\t\treturn createBuilder(this, styler, this._isEmpty);\n\t\t\t};\n\t\t}\n\t};\n}\n\nfor (const model of usedModels) {\n\tconst bgModel = 'bg' + model[0].toUpperCase() + model.slice(1);\n\tstyles[bgModel] = {\n\t\tget() {\n\t\t\tconst {level} = this;\n\t\t\treturn function (...arguments_) {\n\t\t\t\tconst styler = createStyler(ansiStyles.bgColor[levelMapping[level]][model](...arguments_), ansiStyles.bgColor.close, this._styler);\n\t\t\t\treturn createBuilder(this, styler, this._isEmpty);\n\t\t\t};\n\t\t}\n\t};\n}\n\nconst proto = Object.defineProperties(() => {}, {\n\t...styles,\n\tlevel: {\n\t\tenumerable: true,\n\t\tget() {\n\t\t\treturn this._generator.level;\n\t\t},\n\t\tset(level) {\n\t\t\tthis._generator.level = level;\n\t\t}\n\t}\n});\n\nconst createStyler = (open, close, parent) => {\n\tlet openAll;\n\tlet closeAll;\n\tif (parent === undefined) {\n\t\topenAll = open;\n\t\tcloseAll = close;\n\t} else {\n\t\topenAll = parent.openAll + open;\n\t\tcloseAll = close + parent.closeAll;\n\t}\n\n\treturn {\n\t\topen,\n\t\tclose,\n\t\topenAll,\n\t\tcloseAll,\n\t\tparent\n\t};\n};\n\nconst createBuilder = (self, _styler, _isEmpty) => {\n\tconst builder = (...arguments_) => {\n\t\tif (isArray(arguments_[0]) && isArray(arguments_[0].raw)) {\n\t\t\t// Called as a template literal, for example: chalk.red`2 + 3 = {bold ${2+3}}`\n\t\t\treturn applyStyle(builder, chalkTag(builder, ...arguments_));\n\t\t}\n\n\t\t// Single argument is hot path, implicit coercion is faster than anything\n\t\t// eslint-disable-next-line no-implicit-coercion\n\t\treturn applyStyle(builder, (arguments_.length === 1) ? ('' + arguments_[0]) : arguments_.join(' '));\n\t};\n\n\t// We alter the prototype because we must return a function, but there is\n\t// no way to create a function with a different prototype\n\tObject.setPrototypeOf(builder, proto);\n\n\tbuilder._generator = self;\n\tbuilder._styler = _styler;\n\tbuilder._isEmpty = _isEmpty;\n\n\treturn builder;\n};\n\nconst applyStyle = (self, string) => {\n\tif (self.level <= 0 || !string) {\n\t\treturn self._isEmpty ? '' : string;\n\t}\n\n\tlet styler = self._styler;\n\n\tif (styler === undefined) {\n\t\treturn string;\n\t}\n\n\tconst {openAll, closeAll} = styler;\n\tif (string.indexOf('\\u001B') !== -1) {\n\t\twhile (styler !== undefined) {\n\t\t\t// Replace any instances already present with a re-opening code\n\t\t\t// otherwise only the part of the string until said closing code\n\t\t\t// will be colored, and the rest will simply be 'plain'.\n\t\t\tstring = stringReplaceAll(string, styler.close, styler.open);\n\n\t\t\tstyler = styler.parent;\n\t\t}\n\t}\n\n\t// We can move both next actions out of loop, because remaining actions in loop won't have\n\t// any/visible effect on parts we add here. Close the styling before a linebreak and reopen\n\t// after next line to fix a bleed issue on macOS: https://github.com/chalk/chalk/pull/92\n\tconst lfIndex = string.indexOf('\\n');\n\tif (lfIndex !== -1) {\n\t\tstring = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);\n\t}\n\n\treturn openAll + string + closeAll;\n};\n\nlet template;\nconst chalkTag = (chalk, ...strings) => {\n\tconst [firstString] = strings;\n\n\tif (!isArray(firstString) || !isArray(firstString.raw)) {\n\t\t// If chalk() was called by itself or with a string,\n\t\t// return the string itself as a string.\n\t\treturn strings.join(' ');\n\t}\n\n\tconst arguments_ = strings.slice(1);\n\tconst parts = [firstString.raw[0]];\n\n\tfor (let i = 1; i < firstString.length; i++) {\n\t\tparts.push(\n\t\t\tString(arguments_[i - 1]).replace(/[{}\\\\]/g, '\\\\$&'),\n\t\t\tString(firstString.raw[i])\n\t\t);\n\t}\n\n\tif (template === undefined) {\n\t\ttemplate = require('./templates');\n\t}\n\n\treturn template(chalk, parts.join(''));\n};\n\nObject.defineProperties(Chalk.prototype, styles);\n\nconst chalk = Chalk(); // eslint-disable-line new-cap\nchalk.supportsColor = stdoutColor;\nchalk.stderr = Chalk({level: stderrColor ? stderrColor.level : 0}); // eslint-disable-line new-cap\nchalk.stderr.supportsColor = stderrColor;\n\nmodule.exports = chalk;\n","'use strict';\nconst TEMPLATE_REGEX = /(?:\\\\(u(?:[a-f\\d]{4}|\\{[a-f\\d]{1,6}\\})|x[a-f\\d]{2}|.))|(?:\\{(~)?(\\w+(?:\\([^)]*\\))?(?:\\.\\w+(?:\\([^)]*\\))?)*)(?:[ \\t]|(?=\\r?\\n)))|(\\})|((?:.|[\\r\\n\\f])+?)/gi;\nconst STYLE_REGEX = /(?:^|\\.)(\\w+)(?:\\(([^)]*)\\))?/g;\nconst STRING_REGEX = /^(['\"])((?:\\\\.|(?!\\1)[^\\\\])*)\\1$/;\nconst ESCAPE_REGEX = /\\\\(u(?:[a-f\\d]{4}|{[a-f\\d]{1,6}})|x[a-f\\d]{2}|.)|([^\\\\])/gi;\n\nconst ESCAPES = new Map([\n\t['n', '\\n'],\n\t['r', '\\r'],\n\t['t', '\\t'],\n\t['b', '\\b'],\n\t['f', '\\f'],\n\t['v', '\\v'],\n\t['0', '\\0'],\n\t['\\\\', '\\\\'],\n\t['e', '\\u001B'],\n\t['a', '\\u0007']\n]);\n\nfunction unescape(c) {\n\tconst u = c[0] === 'u';\n\tconst bracket = c[1] === '{';\n\n\tif ((u && !bracket && c.length === 5) || (c[0] === 'x' && c.length === 3)) {\n\t\treturn String.fromCharCode(parseInt(c.slice(1), 16));\n\t}\n\n\tif (u && bracket) {\n\t\treturn String.fromCodePoint(parseInt(c.slice(2, -1), 16));\n\t}\n\n\treturn ESCAPES.get(c) || c;\n}\n\nfunction parseArguments(name, arguments_) {\n\tconst results = [];\n\tconst chunks = arguments_.trim().split(/\\s*,\\s*/g);\n\tlet matches;\n\n\tfor (const chunk of chunks) {\n\t\tconst number = Number(chunk);\n\t\tif (!Number.isNaN(number)) {\n\t\t\tresults.push(number);\n\t\t} else if ((matches = chunk.match(STRING_REGEX))) {\n\t\t\tresults.push(matches[2].replace(ESCAPE_REGEX, (m, escape, character) => escape ? unescape(escape) : character));\n\t\t} else {\n\t\t\tthrow new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`);\n\t\t}\n\t}\n\n\treturn results;\n}\n\nfunction parseStyle(style) {\n\tSTYLE_REGEX.lastIndex = 0;\n\n\tconst results = [];\n\tlet matches;\n\n\twhile ((matches = STYLE_REGEX.exec(style)) !== null) {\n\t\tconst name = matches[1];\n\n\t\tif (matches[2]) {\n\t\t\tconst args = parseArguments(name, matches[2]);\n\t\t\tresults.push([name].concat(args));\n\t\t} else {\n\t\t\tresults.push([name]);\n\t\t}\n\t}\n\n\treturn results;\n}\n\nfunction buildStyle(chalk, styles) {\n\tconst enabled = {};\n\n\tfor (const layer of styles) {\n\t\tfor (const style of layer.styles) {\n\t\t\tenabled[style[0]] = layer.inverse ? null : style.slice(1);\n\t\t}\n\t}\n\n\tlet current = chalk;\n\tfor (const [styleName, styles] of Object.entries(enabled)) {\n\t\tif (!Array.isArray(styles)) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (!(styleName in current)) {\n\t\t\tthrow new Error(`Unknown Chalk style: ${styleName}`);\n\t\t}\n\n\t\tcurrent = styles.length > 0 ? current[styleName](...styles) : current[styleName];\n\t}\n\n\treturn current;\n}\n\nmodule.exports = (chalk, temporary) => {\n\tconst styles = [];\n\tconst chunks = [];\n\tlet chunk = [];\n\n\t// eslint-disable-next-line max-params\n\ttemporary.replace(TEMPLATE_REGEX, (m, escapeCharacter, inverse, style, close, character) => {\n\t\tif (escapeCharacter) {\n\t\t\tchunk.push(unescape(escapeCharacter));\n\t\t} else if (style) {\n\t\t\tconst string = chunk.join('');\n\t\t\tchunk = [];\n\t\t\tchunks.push(styles.length === 0 ? string : buildStyle(chalk, styles)(string));\n\t\t\tstyles.push({inverse, styles: parseStyle(style)});\n\t\t} else if (close) {\n\t\t\tif (styles.length === 0) {\n\t\t\t\tthrow new Error('Found extraneous } in Chalk template literal');\n\t\t\t}\n\n\t\t\tchunks.push(buildStyle(chalk, styles)(chunk.join('')));\n\t\t\tchunk = [];\n\t\t\tstyles.pop();\n\t\t} else {\n\t\t\tchunk.push(character);\n\t\t}\n\t});\n\n\tchunks.push(chunk.join(''));\n\n\tif (styles.length > 0) {\n\t\tconst errMessage = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? '' : 's'} (\\`}\\`)`;\n\t\tthrow new Error(errMessage);\n\t}\n\n\treturn chunks.join('');\n};\n","'use strict';\n\nconst stringReplaceAll = (string, substring, replacer) => {\n\tlet index = string.indexOf(substring);\n\tif (index === -1) {\n\t\treturn string;\n\t}\n\n\tconst substringLength = substring.length;\n\tlet endIndex = 0;\n\tlet returnValue = '';\n\tdo {\n\t\treturnValue += string.substr(endIndex, index - endIndex) + substring + replacer;\n\t\tendIndex = index + substringLength;\n\t\tindex = string.indexOf(substring, endIndex);\n\t} while (index !== -1);\n\n\treturnValue += string.substr(endIndex);\n\treturn returnValue;\n};\n\nconst stringEncaseCRLFWithFirstIndex = (string, prefix, postfix, index) => {\n\tlet endIndex = 0;\n\tlet returnValue = '';\n\tdo {\n\t\tconst gotCR = string[index - 1] === '\\r';\n\t\treturnValue += string.substr(endIndex, (gotCR ? index - 1 : index) - endIndex) + prefix + (gotCR ? '\\r\\n' : '\\n') + postfix;\n\t\tendIndex = index + 1;\n\t\tindex = string.indexOf('\\n', endIndex);\n\t} while (index !== -1);\n\n\treturnValue += string.substr(endIndex);\n\treturn returnValue;\n};\n\nmodule.exports = {\n\tstringReplaceAll,\n\tstringEncaseCRLFWithFirstIndex\n};\n","/* MIT license */\n/* eslint-disable no-mixed-operators */\nconst cssKeywords = require('color-name');\n\n// NOTE: conversions should only return primitive values (i.e. arrays, or\n// values that give correct `typeof` results).\n// do not use box values types (i.e. Number(), String(), etc.)\n\nconst reverseKeywords = {};\nfor (const key of Object.keys(cssKeywords)) {\n\treverseKeywords[cssKeywords[key]] = key;\n}\n\nconst convert = {\n\trgb: {channels: 3, labels: 'rgb'},\n\thsl: {channels: 3, labels: 'hsl'},\n\thsv: {channels: 3, labels: 'hsv'},\n\thwb: {channels: 3, labels: 'hwb'},\n\tcmyk: {channels: 4, labels: 'cmyk'},\n\txyz: {channels: 3, labels: 'xyz'},\n\tlab: {channels: 3, labels: 'lab'},\n\tlch: {channels: 3, labels: 'lch'},\n\thex: {channels: 1, labels: ['hex']},\n\tkeyword: {channels: 1, labels: ['keyword']},\n\tansi16: {channels: 1, labels: ['ansi16']},\n\tansi256: {channels: 1, labels: ['ansi256']},\n\thcg: {channels: 3, labels: ['h', 'c', 'g']},\n\tapple: {channels: 3, labels: ['r16', 'g16', 'b16']},\n\tgray: {channels: 1, labels: ['gray']}\n};\n\nmodule.exports = convert;\n\n// Hide .channels and .labels properties\nfor (const model of Object.keys(convert)) {\n\tif (!('channels' in convert[model])) {\n\t\tthrow new Error('missing channels property: ' + model);\n\t}\n\n\tif (!('labels' in convert[model])) {\n\t\tthrow new Error('missing channel labels property: ' + model);\n\t}\n\n\tif (convert[model].labels.length !== convert[model].channels) {\n\t\tthrow new Error('channel and label counts mismatch: ' + model);\n\t}\n\n\tconst {channels, labels} = convert[model];\n\tdelete convert[model].channels;\n\tdelete convert[model].labels;\n\tObject.defineProperty(convert[model], 'channels', {value: channels});\n\tObject.defineProperty(convert[model], 'labels', {value: labels});\n}\n\nconvert.rgb.hsl = function (rgb) {\n\tconst r = rgb[0] / 255;\n\tconst g = rgb[1] / 255;\n\tconst b = rgb[2] / 255;\n\tconst min = Math.min(r, g, b);\n\tconst max = Math.max(r, g, b);\n\tconst delta = max - min;\n\tlet h;\n\tlet s;\n\n\tif (max === min) {\n\t\th = 0;\n\t} else if (r === max) {\n\t\th = (g - b) / delta;\n\t} else if (g === max) {\n\t\th = 2 + (b - r) / delta;\n\t} else if (b === max) {\n\t\th = 4 + (r - g) / delta;\n\t}\n\n\th = Math.min(h * 60, 360);\n\n\tif (h < 0) {\n\t\th += 360;\n\t}\n\n\tconst l = (min + max) / 2;\n\n\tif (max === min) {\n\t\ts = 0;\n\t} else if (l <= 0.5) {\n\t\ts = delta / (max + min);\n\t} else {\n\t\ts = delta / (2 - max - min);\n\t}\n\n\treturn [h, s * 100, l * 100];\n};\n\nconvert.rgb.hsv = function (rgb) {\n\tlet rdif;\n\tlet gdif;\n\tlet bdif;\n\tlet h;\n\tlet s;\n\n\tconst r = rgb[0] / 255;\n\tconst g = rgb[1] / 255;\n\tconst b = rgb[2] / 255;\n\tconst v = Math.max(r, g, b);\n\tconst diff = v - Math.min(r, g, b);\n\tconst diffc = function (c) {\n\t\treturn (v - c) / 6 / diff + 1 / 2;\n\t};\n\n\tif (diff === 0) {\n\t\th = 0;\n\t\ts = 0;\n\t} else {\n\t\ts = diff / v;\n\t\trdif = diffc(r);\n\t\tgdif = diffc(g);\n\t\tbdif = diffc(b);\n\n\t\tif (r === v) {\n\t\t\th = bdif - gdif;\n\t\t} else if (g === v) {\n\t\t\th = (1 / 3) + rdif - bdif;\n\t\t} else if (b === v) {\n\t\t\th = (2 / 3) + gdif - rdif;\n\t\t}\n\n\t\tif (h < 0) {\n\t\t\th += 1;\n\t\t} else if (h > 1) {\n\t\t\th -= 1;\n\t\t}\n\t}\n\n\treturn [\n\t\th * 360,\n\t\ts * 100,\n\t\tv * 100\n\t];\n};\n\nconvert.rgb.hwb = function (rgb) {\n\tconst r = rgb[0];\n\tconst g = rgb[1];\n\tlet b = rgb[2];\n\tconst h = convert.rgb.hsl(rgb)[0];\n\tconst w = 1 / 255 * Math.min(r, Math.min(g, b));\n\n\tb = 1 - 1 / 255 * Math.max(r, Math.max(g, b));\n\n\treturn [h, w * 100, b * 100];\n};\n\nconvert.rgb.cmyk = function (rgb) {\n\tconst r = rgb[0] / 255;\n\tconst g = rgb[1] / 255;\n\tconst b = rgb[2] / 255;\n\n\tconst k = Math.min(1 - r, 1 - g, 1 - b);\n\tconst c = (1 - r - k) / (1 - k) || 0;\n\tconst m = (1 - g - k) / (1 - k) || 0;\n\tconst y = (1 - b - k) / (1 - k) || 0;\n\n\treturn [c * 100, m * 100, y * 100, k * 100];\n};\n\nfunction comparativeDistance(x, y) {\n\t/*\n\t\tSee https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance\n\t*/\n\treturn (\n\t\t((x[0] - y[0]) ** 2) +\n\t\t((x[1] - y[1]) ** 2) +\n\t\t((x[2] - y[2]) ** 2)\n\t);\n}\n\nconvert.rgb.keyword = function (rgb) {\n\tconst reversed = reverseKeywords[rgb];\n\tif (reversed) {\n\t\treturn reversed;\n\t}\n\n\tlet currentClosestDistance = Infinity;\n\tlet currentClosestKeyword;\n\n\tfor (const keyword of Object.keys(cssKeywords)) {\n\t\tconst value = cssKeywords[keyword];\n\n\t\t// Compute comparative distance\n\t\tconst distance = comparativeDistance(rgb, value);\n\n\t\t// Check if its less, if so set as closest\n\t\tif (distance < currentClosestDistance) {\n\t\t\tcurrentClosestDistance = distance;\n\t\t\tcurrentClosestKeyword = keyword;\n\t\t}\n\t}\n\n\treturn currentClosestKeyword;\n};\n\nconvert.keyword.rgb = function (keyword) {\n\treturn cssKeywords[keyword];\n};\n\nconvert.rgb.xyz = function (rgb) {\n\tlet r = rgb[0] / 255;\n\tlet g = rgb[1] / 255;\n\tlet b = rgb[2] / 255;\n\n\t// Assume sRGB\n\tr = r > 0.04045 ? (((r + 0.055) / 1.055) ** 2.4) : (r / 12.92);\n\tg = g > 0.04045 ? (((g + 0.055) / 1.055) ** 2.4) : (g / 12.92);\n\tb = b > 0.04045 ? (((b + 0.055) / 1.055) ** 2.4) : (b / 12.92);\n\n\tconst x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805);\n\tconst y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722);\n\tconst z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505);\n\n\treturn [x * 100, y * 100, z * 100];\n};\n\nconvert.rgb.lab = function (rgb) {\n\tconst xyz = convert.rgb.xyz(rgb);\n\tlet x = xyz[0];\n\tlet y = xyz[1];\n\tlet z = xyz[2];\n\n\tx /= 95.047;\n\ty /= 100;\n\tz /= 108.883;\n\n\tx = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116);\n\ty = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116);\n\tz = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116);\n\n\tconst l = (116 * y) - 16;\n\tconst a = 500 * (x - y);\n\tconst b = 200 * (y - z);\n\n\treturn [l, a, b];\n};\n\nconvert.hsl.rgb = function (hsl) {\n\tconst h = hsl[0] / 360;\n\tconst s = hsl[1] / 100;\n\tconst l = hsl[2] / 100;\n\tlet t2;\n\tlet t3;\n\tlet val;\n\n\tif (s === 0) {\n\t\tval = l * 255;\n\t\treturn [val, val, val];\n\t}\n\n\tif (l < 0.5) {\n\t\tt2 = l * (1 + s);\n\t} else {\n\t\tt2 = l + s - l * s;\n\t}\n\n\tconst t1 = 2 * l - t2;\n\n\tconst rgb = [0, 0, 0];\n\tfor (let i = 0; i < 3; i++) {\n\t\tt3 = h + 1 / 3 * -(i - 1);\n\t\tif (t3 < 0) {\n\t\t\tt3++;\n\t\t}\n\n\t\tif (t3 > 1) {\n\t\t\tt3--;\n\t\t}\n\n\t\tif (6 * t3 < 1) {\n\t\t\tval = t1 + (t2 - t1) * 6 * t3;\n\t\t} else if (2 * t3 < 1) {\n\t\t\tval = t2;\n\t\t} else if (3 * t3 < 2) {\n\t\t\tval = t1 + (t2 - t1) * (2 / 3 - t3) * 6;\n\t\t} else {\n\t\t\tval = t1;\n\t\t}\n\n\t\trgb[i] = val * 255;\n\t}\n\n\treturn rgb;\n};\n\nconvert.hsl.hsv = function (hsl) {\n\tconst h = hsl[0];\n\tlet s = hsl[1] / 100;\n\tlet l = hsl[2] / 100;\n\tlet smin = s;\n\tconst lmin = Math.max(l, 0.01);\n\n\tl *= 2;\n\ts *= (l <= 1) ? l : 2 - l;\n\tsmin *= lmin <= 1 ? lmin : 2 - lmin;\n\tconst v = (l + s) / 2;\n\tconst sv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s);\n\n\treturn [h, sv * 100, v * 100];\n};\n\nconvert.hsv.rgb = function (hsv) {\n\tconst h = hsv[0] / 60;\n\tconst s = hsv[1] / 100;\n\tlet v = hsv[2] / 100;\n\tconst hi = Math.floor(h) % 6;\n\n\tconst f = h - Math.floor(h);\n\tconst p = 255 * v * (1 - s);\n\tconst q = 255 * v * (1 - (s * f));\n\tconst t = 255 * v * (1 - (s * (1 - f)));\n\tv *= 255;\n\n\tswitch (hi) {\n\t\tcase 0:\n\t\t\treturn [v, t, p];\n\t\tcase 1:\n\t\t\treturn [q, v, p];\n\t\tcase 2:\n\t\t\treturn [p, v, t];\n\t\tcase 3:\n\t\t\treturn [p, q, v];\n\t\tcase 4:\n\t\t\treturn [t, p, v];\n\t\tcase 5:\n\t\t\treturn [v, p, q];\n\t}\n};\n\nconvert.hsv.hsl = function (hsv) {\n\tconst h = hsv[0];\n\tconst s = hsv[1] / 100;\n\tconst v = hsv[2] / 100;\n\tconst vmin = Math.max(v, 0.01);\n\tlet sl;\n\tlet l;\n\n\tl = (2 - s) * v;\n\tconst lmin = (2 - s) * vmin;\n\tsl = s * vmin;\n\tsl /= (lmin <= 1) ? lmin : 2 - lmin;\n\tsl = sl || 0;\n\tl /= 2;\n\n\treturn [h, sl * 100, l * 100];\n};\n\n// http://dev.w3.org/csswg/css-color/#hwb-to-rgb\nconvert.hwb.rgb = function (hwb) {\n\tconst h = hwb[0] / 360;\n\tlet wh = hwb[1] / 100;\n\tlet bl = hwb[2] / 100;\n\tconst ratio = wh + bl;\n\tlet f;\n\n\t// Wh + bl cant be > 1\n\tif (ratio > 1) {\n\t\twh /= ratio;\n\t\tbl /= ratio;\n\t}\n\n\tconst i = Math.floor(6 * h);\n\tconst v = 1 - bl;\n\tf = 6 * h - i;\n\n\tif ((i & 0x01) !== 0) {\n\t\tf = 1 - f;\n\t}\n\n\tconst n = wh + f * (v - wh); // Linear interpolation\n\n\tlet r;\n\tlet g;\n\tlet b;\n\t/* eslint-disable max-statements-per-line,no-multi-spaces */\n\tswitch (i) {\n\t\tdefault:\n\t\tcase 6:\n\t\tcase 0: r = v; g = n; b = wh; break;\n\t\tcase 1: r = n; g = v; b = wh; break;\n\t\tcase 2: r = wh; g = v; b = n; break;\n\t\tcase 3: r = wh; g = n; b = v; break;\n\t\tcase 4: r = n; g = wh; b = v; break;\n\t\tcase 5: r = v; g = wh; b = n; break;\n\t}\n\t/* eslint-enable max-statements-per-line,no-multi-spaces */\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.cmyk.rgb = function (cmyk) {\n\tconst c = cmyk[0] / 100;\n\tconst m = cmyk[1] / 100;\n\tconst y = cmyk[2] / 100;\n\tconst k = cmyk[3] / 100;\n\n\tconst r = 1 - Math.min(1, c * (1 - k) + k);\n\tconst g = 1 - Math.min(1, m * (1 - k) + k);\n\tconst b = 1 - Math.min(1, y * (1 - k) + k);\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.xyz.rgb = function (xyz) {\n\tconst x = xyz[0] / 100;\n\tconst y = xyz[1] / 100;\n\tconst z = xyz[2] / 100;\n\tlet r;\n\tlet g;\n\tlet b;\n\n\tr = (x * 3.2406) + (y * -1.5372) + (z * -0.4986);\n\tg = (x * -0.9689) + (y * 1.8758) + (z * 0.0415);\n\tb = (x * 0.0557) + (y * -0.2040) + (z * 1.0570);\n\n\t// Assume sRGB\n\tr = r > 0.0031308\n\t\t? ((1.055 * (r ** (1.0 / 2.4))) - 0.055)\n\t\t: r * 12.92;\n\n\tg = g > 0.0031308\n\t\t? ((1.055 * (g ** (1.0 / 2.4))) - 0.055)\n\t\t: g * 12.92;\n\n\tb = b > 0.0031308\n\t\t? ((1.055 * (b ** (1.0 / 2.4))) - 0.055)\n\t\t: b * 12.92;\n\n\tr = Math.min(Math.max(0, r), 1);\n\tg = Math.min(Math.max(0, g), 1);\n\tb = Math.min(Math.max(0, b), 1);\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.xyz.lab = function (xyz) {\n\tlet x = xyz[0];\n\tlet y = xyz[1];\n\tlet z = xyz[2];\n\n\tx /= 95.047;\n\ty /= 100;\n\tz /= 108.883;\n\n\tx = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116);\n\ty = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116);\n\tz = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116);\n\n\tconst l = (116 * y) - 16;\n\tconst a = 500 * (x - y);\n\tconst b = 200 * (y - z);\n\n\treturn [l, a, b];\n};\n\nconvert.lab.xyz = function (lab) {\n\tconst l = lab[0];\n\tconst a = lab[1];\n\tconst b = lab[2];\n\tlet x;\n\tlet y;\n\tlet z;\n\n\ty = (l + 16) / 116;\n\tx = a / 500 + y;\n\tz = y - b / 200;\n\n\tconst y2 = y ** 3;\n\tconst x2 = x ** 3;\n\tconst z2 = z ** 3;\n\ty = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787;\n\tx = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787;\n\tz = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787;\n\n\tx *= 95.047;\n\ty *= 100;\n\tz *= 108.883;\n\n\treturn [x, y, z];\n};\n\nconvert.lab.lch = function (lab) {\n\tconst l = lab[0];\n\tconst a = lab[1];\n\tconst b = lab[2];\n\tlet h;\n\n\tconst hr = Math.atan2(b, a);\n\th = hr * 360 / 2 / Math.PI;\n\n\tif (h < 0) {\n\t\th += 360;\n\t}\n\n\tconst c = Math.sqrt(a * a + b * b);\n\n\treturn [l, c, h];\n};\n\nconvert.lch.lab = function (lch) {\n\tconst l = lch[0];\n\tconst c = lch[1];\n\tconst h = lch[2];\n\n\tconst hr = h / 360 * 2 * Math.PI;\n\tconst a = c * Math.cos(hr);\n\tconst b = c * Math.sin(hr);\n\n\treturn [l, a, b];\n};\n\nconvert.rgb.ansi16 = function (args, saturation = null) {\n\tconst [r, g, b] = args;\n\tlet value = saturation === null ? convert.rgb.hsv(args)[2] : saturation; // Hsv -> ansi16 optimization\n\n\tvalue = Math.round(value / 50);\n\n\tif (value === 0) {\n\t\treturn 30;\n\t}\n\n\tlet ansi = 30\n\t\t+ ((Math.round(b / 255) << 2)\n\t\t| (Math.round(g / 255) << 1)\n\t\t| Math.round(r / 255));\n\n\tif (value === 2) {\n\t\tansi += 60;\n\t}\n\n\treturn ansi;\n};\n\nconvert.hsv.ansi16 = function (args) {\n\t// Optimization here; we already know the value and don't need to get\n\t// it converted for us.\n\treturn convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);\n};\n\nconvert.rgb.ansi256 = function (args) {\n\tconst r = args[0];\n\tconst g = args[1];\n\tconst b = args[2];\n\n\t// We use the extended greyscale palette here, with the exception of\n\t// black and white. normal palette only has 4 greyscale shades.\n\tif (r === g && g === b) {\n\t\tif (r < 8) {\n\t\t\treturn 16;\n\t\t}\n\n\t\tif (r > 248) {\n\t\t\treturn 231;\n\t\t}\n\n\t\treturn Math.round(((r - 8) / 247) * 24) + 232;\n\t}\n\n\tconst ansi = 16\n\t\t+ (36 * Math.round(r / 255 * 5))\n\t\t+ (6 * Math.round(g / 255 * 5))\n\t\t+ Math.round(b / 255 * 5);\n\n\treturn ansi;\n};\n\nconvert.ansi16.rgb = function (args) {\n\tlet color = args % 10;\n\n\t// Handle greyscale\n\tif (color === 0 || color === 7) {\n\t\tif (args > 50) {\n\t\t\tcolor += 3.5;\n\t\t}\n\n\t\tcolor = color / 10.5 * 255;\n\n\t\treturn [color, color, color];\n\t}\n\n\tconst mult = (~~(args > 50) + 1) * 0.5;\n\tconst r = ((color & 1) * mult) * 255;\n\tconst g = (((color >> 1) & 1) * mult) * 255;\n\tconst b = (((color >> 2) & 1) * mult) * 255;\n\n\treturn [r, g, b];\n};\n\nconvert.ansi256.rgb = function (args) {\n\t// Handle greyscale\n\tif (args >= 232) {\n\t\tconst c = (args - 232) * 10 + 8;\n\t\treturn [c, c, c];\n\t}\n\n\targs -= 16;\n\n\tlet rem;\n\tconst r = Math.floor(args / 36) / 5 * 255;\n\tconst g = Math.floor((rem = args % 36) / 6) / 5 * 255;\n\tconst b = (rem % 6) / 5 * 255;\n\n\treturn [r, g, b];\n};\n\nconvert.rgb.hex = function (args) {\n\tconst integer = ((Math.round(args[0]) & 0xFF) << 16)\n\t\t+ ((Math.round(args[1]) & 0xFF) << 8)\n\t\t+ (Math.round(args[2]) & 0xFF);\n\n\tconst string = integer.toString(16).toUpperCase();\n\treturn '000000'.substring(string.length) + string;\n};\n\nconvert.hex.rgb = function (args) {\n\tconst match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);\n\tif (!match) {\n\t\treturn [0, 0, 0];\n\t}\n\n\tlet colorString = match[0];\n\n\tif (match[0].length === 3) {\n\t\tcolorString = colorString.split('').map(char => {\n\t\t\treturn char + char;\n\t\t}).join('');\n\t}\n\n\tconst integer = parseInt(colorString, 16);\n\tconst r = (integer >> 16) & 0xFF;\n\tconst g = (integer >> 8) & 0xFF;\n\tconst b = integer & 0xFF;\n\n\treturn [r, g, b];\n};\n\nconvert.rgb.hcg = function (rgb) {\n\tconst r = rgb[0] / 255;\n\tconst g = rgb[1] / 255;\n\tconst b = rgb[2] / 255;\n\tconst max = Math.max(Math.max(r, g), b);\n\tconst min = Math.min(Math.min(r, g), b);\n\tconst chroma = (max - min);\n\tlet grayscale;\n\tlet hue;\n\n\tif (chroma < 1) {\n\t\tgrayscale = min / (1 - chroma);\n\t} else {\n\t\tgrayscale = 0;\n\t}\n\n\tif (chroma <= 0) {\n\t\thue = 0;\n\t} else\n\tif (max === r) {\n\t\thue = ((g - b) / chroma) % 6;\n\t} else\n\tif (max === g) {\n\t\thue = 2 + (b - r) / chroma;\n\t} else {\n\t\thue = 4 + (r - g) / chroma;\n\t}\n\n\thue /= 6;\n\thue %= 1;\n\n\treturn [hue * 360, chroma * 100, grayscale * 100];\n};\n\nconvert.hsl.hcg = function (hsl) {\n\tconst s = hsl[1] / 100;\n\tconst l = hsl[2] / 100;\n\n\tconst c = l < 0.5 ? (2.0 * s * l) : (2.0 * s * (1.0 - l));\n\n\tlet f = 0;\n\tif (c < 1.0) {\n\t\tf = (l - 0.5 * c) / (1.0 - c);\n\t}\n\n\treturn [hsl[0], c * 100, f * 100];\n};\n\nconvert.hsv.hcg = function (hsv) {\n\tconst s = hsv[1] / 100;\n\tconst v = hsv[2] / 100;\n\n\tconst c = s * v;\n\tlet f = 0;\n\n\tif (c < 1.0) {\n\t\tf = (v - c) / (1 - c);\n\t}\n\n\treturn [hsv[0], c * 100, f * 100];\n};\n\nconvert.hcg.rgb = function (hcg) {\n\tconst h = hcg[0] / 360;\n\tconst c = hcg[1] / 100;\n\tconst g = hcg[2] / 100;\n\n\tif (c === 0.0) {\n\t\treturn [g * 255, g * 255, g * 255];\n\t}\n\n\tconst pure = [0, 0, 0];\n\tconst hi = (h % 1) * 6;\n\tconst v = hi % 1;\n\tconst w = 1 - v;\n\tlet mg = 0;\n\n\t/* eslint-disable max-statements-per-line */\n\tswitch (Math.floor(hi)) {\n\t\tcase 0:\n\t\t\tpure[0] = 1; pure[1] = v; pure[2] = 0; break;\n\t\tcase 1:\n\t\t\tpure[0] = w; pure[1] = 1; pure[2] = 0; break;\n\t\tcase 2:\n\t\t\tpure[0] = 0; pure[1] = 1; pure[2] = v; break;\n\t\tcase 3:\n\t\t\tpure[0] = 0; pure[1] = w; pure[2] = 1; break;\n\t\tcase 4:\n\t\t\tpure[0] = v; pure[1] = 0; pure[2] = 1; break;\n\t\tdefault:\n\t\t\tpure[0] = 1; pure[1] = 0; pure[2] = w;\n\t}\n\t/* eslint-enable max-statements-per-line */\n\n\tmg = (1.0 - c) * g;\n\n\treturn [\n\t\t(c * pure[0] + mg) * 255,\n\t\t(c * pure[1] + mg) * 255,\n\t\t(c * pure[2] + mg) * 255\n\t];\n};\n\nconvert.hcg.hsv = function (hcg) {\n\tconst c = hcg[1] / 100;\n\tconst g = hcg[2] / 100;\n\n\tconst v = c + g * (1.0 - c);\n\tlet f = 0;\n\n\tif (v > 0.0) {\n\t\tf = c / v;\n\t}\n\n\treturn [hcg[0], f * 100, v * 100];\n};\n\nconvert.hcg.hsl = function (hcg) {\n\tconst c = hcg[1] / 100;\n\tconst g = hcg[2] / 100;\n\n\tconst l = g * (1.0 - c) + 0.5 * c;\n\tlet s = 0;\n\n\tif (l > 0.0 && l < 0.5) {\n\t\ts = c / (2 * l);\n\t} else\n\tif (l >= 0.5 && l < 1.0) {\n\t\ts = c / (2 * (1 - l));\n\t}\n\n\treturn [hcg[0], s * 100, l * 100];\n};\n\nconvert.hcg.hwb = function (hcg) {\n\tconst c = hcg[1] / 100;\n\tconst g = hcg[2] / 100;\n\tconst v = c + g * (1.0 - c);\n\treturn [hcg[0], (v - c) * 100, (1 - v) * 100];\n};\n\nconvert.hwb.hcg = function (hwb) {\n\tconst w = hwb[1] / 100;\n\tconst b = hwb[2] / 100;\n\tconst v = 1 - b;\n\tconst c = v - w;\n\tlet g = 0;\n\n\tif (c < 1) {\n\t\tg = (v - c) / (1 - c);\n\t}\n\n\treturn [hwb[0], c * 100, g * 100];\n};\n\nconvert.apple.rgb = function (apple) {\n\treturn [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255];\n};\n\nconvert.rgb.apple = function (rgb) {\n\treturn [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535];\n};\n\nconvert.gray.rgb = function (args) {\n\treturn [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];\n};\n\nconvert.gray.hsl = function (args) {\n\treturn [0, 0, args[0]];\n};\n\nconvert.gray.hsv = convert.gray.hsl;\n\nconvert.gray.hwb = function (gray) {\n\treturn [0, 100, gray[0]];\n};\n\nconvert.gray.cmyk = function (gray) {\n\treturn [0, 0, 0, gray[0]];\n};\n\nconvert.gray.lab = function (gray) {\n\treturn [gray[0], 0, 0];\n};\n\nconvert.gray.hex = function (gray) {\n\tconst val = Math.round(gray[0] / 100 * 255) & 0xFF;\n\tconst integer = (val << 16) + (val << 8) + val;\n\n\tconst string = integer.toString(16).toUpperCase();\n\treturn '000000'.substring(string.length) + string;\n};\n\nconvert.rgb.gray = function (rgb) {\n\tconst val = (rgb[0] + rgb[1] + rgb[2]) / 3;\n\treturn [val / 255 * 100];\n};\n","const conversions = require('./conversions');\nconst route = require('./route');\n\nconst convert = {};\n\nconst models = Object.keys(conversions);\n\nfunction wrapRaw(fn) {\n\tconst wrappedFn = function (...args) {\n\t\tconst arg0 = args[0];\n\t\tif (arg0 === undefined || arg0 === null) {\n\t\t\treturn arg0;\n\t\t}\n\n\t\tif (arg0.length > 1) {\n\t\t\targs = arg0;\n\t\t}\n\n\t\treturn fn(args);\n\t};\n\n\t// Preserve .conversion property if there is one\n\tif ('conversion' in fn) {\n\t\twrappedFn.conversion = fn.conversion;\n\t}\n\n\treturn wrappedFn;\n}\n\nfunction wrapRounded(fn) {\n\tconst wrappedFn = function (...args) {\n\t\tconst arg0 = args[0];\n\n\t\tif (arg0 === undefined || arg0 === null) {\n\t\t\treturn arg0;\n\t\t}\n\n\t\tif (arg0.length > 1) {\n\t\t\targs = arg0;\n\t\t}\n\n\t\tconst result = fn(args);\n\n\t\t// We're assuming the result is an array here.\n\t\t// see notice in conversions.js; don't use box types\n\t\t// in conversion functions.\n\t\tif (typeof result === 'object') {\n\t\t\tfor (let len = result.length, i = 0; i < len; i++) {\n\t\t\t\tresult[i] = Math.round(result[i]);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t};\n\n\t// Preserve .conversion property if there is one\n\tif ('conversion' in fn) {\n\t\twrappedFn.conversion = fn.conversion;\n\t}\n\n\treturn wrappedFn;\n}\n\nmodels.forEach(fromModel => {\n\tconvert[fromModel] = {};\n\n\tObject.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels});\n\tObject.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels});\n\n\tconst routes = route(fromModel);\n\tconst routeModels = Object.keys(routes);\n\n\trouteModels.forEach(toModel => {\n\t\tconst fn = routes[toModel];\n\n\t\tconvert[fromModel][toModel] = wrapRounded(fn);\n\t\tconvert[fromModel][toModel].raw = wrapRaw(fn);\n\t});\n});\n\nmodule.exports = convert;\n","const conversions = require('./conversions');\n\n/*\n\tThis function routes a model to all other models.\n\n\tall functions that are routed have a property `.conversion` attached\n\tto the returned synthetic function. This property is an array\n\tof strings, each with the steps in between the 'from' and 'to'\n\tcolor models (inclusive).\n\n\tconversions that are not possible simply are not included.\n*/\n\nfunction buildGraph() {\n\tconst graph = {};\n\t// https://jsperf.com/object-keys-vs-for-in-with-closure/3\n\tconst models = Object.keys(conversions);\n\n\tfor (let len = models.length, i = 0; i < len; i++) {\n\t\tgraph[models[i]] = {\n\t\t\t// http://jsperf.com/1-vs-infinity\n\t\t\t// micro-opt, but this is simple.\n\t\t\tdistance: -1,\n\t\t\tparent: null\n\t\t};\n\t}\n\n\treturn graph;\n}\n\n// https://en.wikipedia.org/wiki/Breadth-first_search\nfunction deriveBFS(fromModel) {\n\tconst graph = buildGraph();\n\tconst queue = [fromModel]; // Unshift -> queue -> pop\n\n\tgraph[fromModel].distance = 0;\n\n\twhile (queue.length) {\n\t\tconst current = queue.pop();\n\t\tconst adjacents = Object.keys(conversions[current]);\n\n\t\tfor (let len = adjacents.length, i = 0; i < len; i++) {\n\t\t\tconst adjacent = adjacents[i];\n\t\t\tconst node = graph[adjacent];\n\n\t\t\tif (node.distance === -1) {\n\t\t\t\tnode.distance = graph[current].distance + 1;\n\t\t\t\tnode.parent = current;\n\t\t\t\tqueue.unshift(adjacent);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn graph;\n}\n\nfunction link(from, to) {\n\treturn function (args) {\n\t\treturn to(from(args));\n\t};\n}\n\nfunction wrapConversion(toModel, graph) {\n\tconst path = [graph[toModel].parent, toModel];\n\tlet fn = conversions[graph[toModel].parent][toModel];\n\n\tlet cur = graph[toModel].parent;\n\twhile (graph[cur].parent) {\n\t\tpath.unshift(graph[cur].parent);\n\t\tfn = link(conversions[graph[cur].parent][cur], fn);\n\t\tcur = graph[cur].parent;\n\t}\n\n\tfn.conversion = path;\n\treturn fn;\n}\n\nmodule.exports = function (fromModel) {\n\tconst graph = deriveBFS(fromModel);\n\tconst conversion = {};\n\n\tconst models = Object.keys(graph);\n\tfor (let len = models.length, i = 0; i < len; i++) {\n\t\tconst toModel = models[i];\n\t\tconst node = graph[toModel];\n\n\t\tif (node.parent === null) {\n\t\t\t// No possible conversion, or this node is the source model.\n\t\t\tcontinue;\n\t\t}\n\n\t\tconversion[toModel] = wrapConversion(toModel, graph);\n\t}\n\n\treturn conversion;\n};\n\n","'use strict'\r\n\r\nmodule.exports = {\r\n\t\"aliceblue\": [240, 248, 255],\r\n\t\"antiquewhite\": [250, 235, 215],\r\n\t\"aqua\": [0, 255, 255],\r\n\t\"aquamarine\": [127, 255, 212],\r\n\t\"azure\": [240, 255, 255],\r\n\t\"beige\": [245, 245, 220],\r\n\t\"bisque\": [255, 228, 196],\r\n\t\"black\": [0, 0, 0],\r\n\t\"blanchedalmond\": [255, 235, 205],\r\n\t\"blue\": [0, 0, 255],\r\n\t\"blueviolet\": [138, 43, 226],\r\n\t\"brown\": [165, 42, 42],\r\n\t\"burlywood\": [222, 184, 135],\r\n\t\"cadetblue\": [95, 158, 160],\r\n\t\"chartreuse\": [127, 255, 0],\r\n\t\"chocolate\": [210, 105, 30],\r\n\t\"coral\": [255, 127, 80],\r\n\t\"cornflowerblue\": [100, 149, 237],\r\n\t\"cornsilk\": [255, 248, 220],\r\n\t\"crimson\": [220, 20, 60],\r\n\t\"cyan\": [0, 255, 255],\r\n\t\"darkblue\": [0, 0, 139],\r\n\t\"darkcyan\": [0, 139, 139],\r\n\t\"darkgoldenrod\": [184, 134, 11],\r\n\t\"darkgray\": [169, 169, 169],\r\n\t\"darkgreen\": [0, 100, 0],\r\n\t\"darkgrey\": [169, 169, 169],\r\n\t\"darkkhaki\": [189, 183, 107],\r\n\t\"darkmagenta\": [139, 0, 139],\r\n\t\"darkolivegreen\": [85, 107, 47],\r\n\t\"darkorange\": [255, 140, 0],\r\n\t\"darkorchid\": [153, 50, 204],\r\n\t\"darkred\": [139, 0, 0],\r\n\t\"darksalmon\": [233, 150, 122],\r\n\t\"darkseagreen\": [143, 188, 143],\r\n\t\"darkslateblue\": [72, 61, 139],\r\n\t\"darkslategray\": [47, 79, 79],\r\n\t\"darkslategrey\": [47, 79, 79],\r\n\t\"darkturquoise\": [0, 206, 209],\r\n\t\"darkviolet\": [148, 0, 211],\r\n\t\"deeppink\": [255, 20, 147],\r\n\t\"deepskyblue\": [0, 191, 255],\r\n\t\"dimgray\": [105, 105, 105],\r\n\t\"dimgrey\": [105, 105, 105],\r\n\t\"dodgerblue\": [30, 144, 255],\r\n\t\"firebrick\": [178, 34, 34],\r\n\t\"floralwhite\": [255, 250, 240],\r\n\t\"forestgreen\": [34, 139, 34],\r\n\t\"fuchsia\": [255, 0, 255],\r\n\t\"gainsboro\": [220, 220, 220],\r\n\t\"ghostwhite\": [248, 248, 255],\r\n\t\"gold\": [255, 215, 0],\r\n\t\"goldenrod\": [218, 165, 32],\r\n\t\"gray\": [128, 128, 128],\r\n\t\"green\": [0, 128, 0],\r\n\t\"greenyellow\": [173, 255, 47],\r\n\t\"grey\": [128, 128, 128],\r\n\t\"honeydew\": [240, 255, 240],\r\n\t\"hotpink\": [255, 105, 180],\r\n\t\"indianred\": [205, 92, 92],\r\n\t\"indigo\": [75, 0, 130],\r\n\t\"ivory\": [255, 255, 240],\r\n\t\"khaki\": [240, 230, 140],\r\n\t\"lavender\": [230, 230, 250],\r\n\t\"lavenderblush\": [255, 240, 245],\r\n\t\"lawngreen\": [124, 252, 0],\r\n\t\"lemonchiffon\": [255, 250, 205],\r\n\t\"lightblue\": [173, 216, 230],\r\n\t\"lightcoral\": [240, 128, 128],\r\n\t\"lightcyan\": [224, 255, 255],\r\n\t\"lightgoldenrodyellow\": [250, 250, 210],\r\n\t\"lightgray\": [211, 211, 211],\r\n\t\"lightgreen\": [144, 238, 144],\r\n\t\"lightgrey\": [211, 211, 211],\r\n\t\"lightpink\": [255, 182, 193],\r\n\t\"lightsalmon\": [255, 160, 122],\r\n\t\"lightseagreen\": [32, 178, 170],\r\n\t\"lightskyblue\": [135, 206, 250],\r\n\t\"lightslategray\": [119, 136, 153],\r\n\t\"lightslategrey\": [119, 136, 153],\r\n\t\"lightsteelblue\": [176, 196, 222],\r\n\t\"lightyellow\": [255, 255, 224],\r\n\t\"lime\": [0, 255, 0],\r\n\t\"limegreen\": [50, 205, 50],\r\n\t\"linen\": [250, 240, 230],\r\n\t\"magenta\": [255, 0, 255],\r\n\t\"maroon\": [128, 0, 0],\r\n\t\"mediumaquamarine\": [102, 205, 170],\r\n\t\"mediumblue\": [0, 0, 205],\r\n\t\"mediumorchid\": [186, 85, 211],\r\n\t\"mediumpurple\": [147, 112, 219],\r\n\t\"mediumseagreen\": [60, 179, 113],\r\n\t\"mediumslateblue\": [123, 104, 238],\r\n\t\"mediumspringgreen\": [0, 250, 154],\r\n\t\"mediumturquoise\": [72, 209, 204],\r\n\t\"mediumvioletred\": [199, 21, 133],\r\n\t\"midnightblue\": [25, 25, 112],\r\n\t\"mintcream\": [245, 255, 250],\r\n\t\"mistyrose\": [255, 228, 225],\r\n\t\"moccasin\": [255, 228, 181],\r\n\t\"navajowhite\": [255, 222, 173],\r\n\t\"navy\": [0, 0, 128],\r\n\t\"oldlace\": [253, 245, 230],\r\n\t\"olive\": [128, 128, 0],\r\n\t\"olivedrab\": [107, 142, 35],\r\n\t\"orange\": [255, 165, 0],\r\n\t\"orangered\": [255, 69, 0],\r\n\t\"orchid\": [218, 112, 214],\r\n\t\"palegoldenrod\": [238, 232, 170],\r\n\t\"palegreen\": [152, 251, 152],\r\n\t\"paleturquoise\": [175, 238, 238],\r\n\t\"palevioletred\": [219, 112, 147],\r\n\t\"papayawhip\": [255, 239, 213],\r\n\t\"peachpuff\": [255, 218, 185],\r\n\t\"peru\": [205, 133, 63],\r\n\t\"pink\": [255, 192, 203],\r\n\t\"plum\": [221, 160, 221],\r\n\t\"powderblue\": [176, 224, 230],\r\n\t\"purple\": [128, 0, 128],\r\n\t\"rebeccapurple\": [102, 51, 153],\r\n\t\"red\": [255, 0, 0],\r\n\t\"rosybrown\": [188, 143, 143],\r\n\t\"royalblue\": [65, 105, 225],\r\n\t\"saddlebrown\": [139, 69, 19],\r\n\t\"salmon\": [250, 128, 114],\r\n\t\"sandybrown\": [244, 164, 96],\r\n\t\"seagreen\": [46, 139, 87],\r\n\t\"seashell\": [255, 245, 238],\r\n\t\"sienna\": [160, 82, 45],\r\n\t\"silver\": [192, 192, 192],\r\n\t\"skyblue\": [135, 206, 235],\r\n\t\"slateblue\": [106, 90, 205],\r\n\t\"slategray\": [112, 128, 144],\r\n\t\"slategrey\": [112, 128, 144],\r\n\t\"snow\": [255, 250, 250],\r\n\t\"springgreen\": [0, 255, 127],\r\n\t\"steelblue\": [70, 130, 180],\r\n\t\"tan\": [210, 180, 140],\r\n\t\"teal\": [0, 128, 128],\r\n\t\"thistle\": [216, 191, 216],\r\n\t\"tomato\": [255, 99, 71],\r\n\t\"turquoise\": [64, 224, 208],\r\n\t\"violet\": [238, 130, 238],\r\n\t\"wheat\": [245, 222, 179],\r\n\t\"white\": [255, 255, 255],\r\n\t\"whitesmoke\": [245, 245, 245],\r\n\t\"yellow\": [255, 255, 0],\r\n\t\"yellowgreen\": [154, 205, 50]\r\n};\r\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nclass Deprecation extends Error {\n constructor(message) {\n super(message); // Maintains proper stack trace (only available on V8)\n\n /* istanbul ignore next */\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n\n this.name = 'Deprecation';\n }\n\n}\n\nexports.Deprecation = Deprecation;\n","\"use strict\";\n\nmodule.exports = function () {\n // https://mths.be/emoji\n return /\\uD83C\\uDFF4\\uDB40\\uDC67\\uDB40\\uDC62(?:\\uDB40\\uDC65\\uDB40\\uDC6E\\uDB40\\uDC67|\\uDB40\\uDC73\\uDB40\\uDC63\\uDB40\\uDC74|\\uDB40\\uDC77\\uDB40\\uDC6C\\uDB40\\uDC73)\\uDB40\\uDC7F|\\uD83D\\uDC68(?:\\uD83C\\uDFFC\\u200D(?:\\uD83E\\uDD1D\\u200D\\uD83D\\uDC68\\uD83C\\uDFFB|\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C\\uDFFF\\u200D(?:\\uD83E\\uDD1D\\u200D\\uD83D\\uDC68(?:\\uD83C[\\uDFFB-\\uDFFE])|\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C\\uDFFE\\u200D(?:\\uD83E\\uDD1D\\u200D\\uD83D\\uDC68(?:\\uD83C[\\uDFFB-\\uDFFD])|\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C\\uDFFD\\u200D(?:\\uD83E\\uDD1D\\u200D\\uD83D\\uDC68(?:\\uD83C[\\uDFFB\\uDFFC])|\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\u200D(?:\\u2764\\uFE0F\\u200D(?:\\uD83D\\uDC8B\\u200D)?\\uD83D\\uDC68|(?:\\uD83D[\\uDC68\\uDC69])\\u200D(?:\\uD83D\\uDC66\\u200D\\uD83D\\uDC66|\\uD83D\\uDC67\\u200D(?:\\uD83D[\\uDC66\\uDC67]))|\\uD83D\\uDC66\\u200D\\uD83D\\uDC66|\\uD83D\\uDC67\\u200D(?:\\uD83D[\\uDC66\\uDC67])|(?:\\uD83D[\\uDC68\\uDC69])\\u200D(?:\\uD83D[\\uDC66\\uDC67])|[\\u2695\\u2696\\u2708]\\uFE0F|\\uD83D[\\uDC66\\uDC67]|\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|(?:\\uD83C\\uDFFB\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFF\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFE\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFD\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFC\\u200D[\\u2695\\u2696\\u2708])\\uFE0F|\\uD83C\\uDFFB\\u200D(?:\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C[\\uDFFB-\\uDFFF])|(?:\\uD83E\\uDDD1\\uD83C\\uDFFB\\u200D\\uD83E\\uDD1D\\u200D\\uD83E\\uDDD1|\\uD83D\\uDC69\\uD83C\\uDFFC\\u200D\\uD83E\\uDD1D\\u200D\\uD83D\\uDC69)\\uD83C\\uDFFB|\\uD83E\\uDDD1(?:\\uD83C\\uDFFF\\u200D\\uD83E\\uDD1D\\u200D\\uD83E\\uDDD1(?:\\uD83C[\\uDFFB-\\uDFFF])|\\u200D\\uD83E\\uDD1D\\u200D\\uD83E\\uDDD1)|(?:\\uD83E\\uDDD1\\uD83C\\uDFFE\\u200D\\uD83E\\uDD1D\\u200D\\uD83E\\uDDD1|\\uD83D\\uDC69\\uD83C\\uDFFF\\u200D\\uD83E\\uDD1D\\u200D(?:\\uD83D[\\uDC68\\uDC69]))(?:\\uD83C[\\uDFFB-\\uDFFE])|(?:\\uD83E\\uDDD1\\uD83C\\uDFFC\\u200D\\uD83E\\uDD1D\\u200D\\uD83E\\uDDD1|\\uD83D\\uDC69\\uD83C\\uDFFD\\u200D\\uD83E\\uDD1D\\u200D\\uD83D\\uDC69)(?:\\uD83C[\\uDFFB\\uDFFC])|\\uD83D\\uDC69(?:\\uD83C\\uDFFE\\u200D(?:\\uD83E\\uDD1D\\u200D\\uD83D\\uDC68(?:\\uD83C[\\uDFFB-\\uDFFD\\uDFFF])|\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C\\uDFFC\\u200D(?:\\uD83E\\uDD1D\\u200D\\uD83D\\uDC68(?:\\uD83C[\\uDFFB\\uDFFD-\\uDFFF])|\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C\\uDFFB\\u200D(?:\\uD83E\\uDD1D\\u200D\\uD83D\\uDC68(?:\\uD83C[\\uDFFC-\\uDFFF])|\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C\\uDFFD\\u200D(?:\\uD83E\\uDD1D\\u200D\\uD83D\\uDC68(?:\\uD83C[\\uDFFB\\uDFFC\\uDFFE\\uDFFF])|\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\u200D(?:\\u2764\\uFE0F\\u200D(?:\\uD83D\\uDC8B\\u200D(?:\\uD83D[\\uDC68\\uDC69])|\\uD83D[\\uDC68\\uDC69])|\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C\\uDFFF\\u200D(?:\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD]))|\\uD83D\\uDC69\\u200D\\uD83D\\uDC69\\u200D(?:\\uD83D\\uDC66\\u200D\\uD83D\\uDC66|\\uD83D\\uDC67\\u200D(?:\\uD83D[\\uDC66\\uDC67]))|(?:\\uD83E\\uDDD1\\uD83C\\uDFFD\\u200D\\uD83E\\uDD1D\\u200D\\uD83E\\uDDD1|\\uD83D\\uDC69\\uD83C\\uDFFE\\u200D\\uD83E\\uDD1D\\u200D\\uD83D\\uDC69)(?:\\uD83C[\\uDFFB-\\uDFFD])|\\uD83D\\uDC69\\u200D\\uD83D\\uDC66\\u200D\\uD83D\\uDC66|\\uD83D\\uDC69\\u200D\\uD83D\\uDC69\\u200D(?:\\uD83D[\\uDC66\\uDC67])|(?:\\uD83D\\uDC41\\uFE0F\\u200D\\uD83D\\uDDE8|\\uD83D\\uDC69(?:\\uD83C\\uDFFF\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFE\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFC\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFB\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFD\\u200D[\\u2695\\u2696\\u2708]|\\u200D[\\u2695\\u2696\\u2708])|(?:(?:\\u26F9|\\uD83C[\\uDFCB\\uDFCC]|\\uD83D\\uDD75)\\uFE0F|\\uD83D\\uDC6F|\\uD83E[\\uDD3C\\uDDDE\\uDDDF])\\u200D[\\u2640\\u2642]|(?:\\u26F9|\\uD83C[\\uDFCB\\uDFCC]|\\uD83D\\uDD75)(?:\\uD83C[\\uDFFB-\\uDFFF])\\u200D[\\u2640\\u2642]|(?:\\uD83C[\\uDFC3\\uDFC4\\uDFCA]|\\uD83D[\\uDC6E\\uDC71\\uDC73\\uDC77\\uDC81\\uDC82\\uDC86\\uDC87\\uDE45-\\uDE47\\uDE4B\\uDE4D\\uDE4E\\uDEA3\\uDEB4-\\uDEB6]|\\uD83E[\\uDD26\\uDD37-\\uDD39\\uDD3D\\uDD3E\\uDDB8\\uDDB9\\uDDCD-\\uDDCF\\uDDD6-\\uDDDD])(?:(?:\\uD83C[\\uDFFB-\\uDFFF])\\u200D[\\u2640\\u2642]|\\u200D[\\u2640\\u2642])|\\uD83C\\uDFF4\\u200D\\u2620)\\uFE0F|\\uD83D\\uDC69\\u200D\\uD83D\\uDC67\\u200D(?:\\uD83D[\\uDC66\\uDC67])|\\uD83C\\uDFF3\\uFE0F\\u200D\\uD83C\\uDF08|\\uD83D\\uDC15\\u200D\\uD83E\\uDDBA|\\uD83D\\uDC69\\u200D\\uD83D\\uDC66|\\uD83D\\uDC69\\u200D\\uD83D\\uDC67|\\uD83C\\uDDFD\\uD83C\\uDDF0|\\uD83C\\uDDF4\\uD83C\\uDDF2|\\uD83C\\uDDF6\\uD83C\\uDDE6|[#\\*0-9]\\uFE0F\\u20E3|\\uD83C\\uDDE7(?:\\uD83C[\\uDDE6\\uDDE7\\uDDE9-\\uDDEF\\uDDF1-\\uDDF4\\uDDF6-\\uDDF9\\uDDFB\\uDDFC\\uDDFE\\uDDFF])|\\uD83C\\uDDF9(?:\\uD83C[\\uDDE6\\uDDE8\\uDDE9\\uDDEB-\\uDDED\\uDDEF-\\uDDF4\\uDDF7\\uDDF9\\uDDFB\\uDDFC\\uDDFF])|\\uD83C\\uDDEA(?:\\uD83C[\\uDDE6\\uDDE8\\uDDEA\\uDDEC\\uDDED\\uDDF7-\\uDDFA])|\\uD83E\\uDDD1(?:\\uD83C[\\uDFFB-\\uDFFF])|\\uD83C\\uDDF7(?:\\uD83C[\\uDDEA\\uDDF4\\uDDF8\\uDDFA\\uDDFC])|\\uD83D\\uDC69(?:\\uD83C[\\uDFFB-\\uDFFF])|\\uD83C\\uDDF2(?:\\uD83C[\\uDDE6\\uDDE8-\\uDDED\\uDDF0-\\uDDFF])|\\uD83C\\uDDE6(?:\\uD83C[\\uDDE8-\\uDDEC\\uDDEE\\uDDF1\\uDDF2\\uDDF4\\uDDF6-\\uDDFA\\uDDFC\\uDDFD\\uDDFF])|\\uD83C\\uDDF0(?:\\uD83C[\\uDDEA\\uDDEC-\\uDDEE\\uDDF2\\uDDF3\\uDDF5\\uDDF7\\uDDFC\\uDDFE\\uDDFF])|\\uD83C\\uDDED(?:\\uD83C[\\uDDF0\\uDDF2\\uDDF3\\uDDF7\\uDDF9\\uDDFA])|\\uD83C\\uDDE9(?:\\uD83C[\\uDDEA\\uDDEC\\uDDEF\\uDDF0\\uDDF2\\uDDF4\\uDDFF])|\\uD83C\\uDDFE(?:\\uD83C[\\uDDEA\\uDDF9])|\\uD83C\\uDDEC(?:\\uD83C[\\uDDE6\\uDDE7\\uDDE9-\\uDDEE\\uDDF1-\\uDDF3\\uDDF5-\\uDDFA\\uDDFC\\uDDFE])|\\uD83C\\uDDF8(?:\\uD83C[\\uDDE6-\\uDDEA\\uDDEC-\\uDDF4\\uDDF7-\\uDDF9\\uDDFB\\uDDFD-\\uDDFF])|\\uD83C\\uDDEB(?:\\uD83C[\\uDDEE-\\uDDF0\\uDDF2\\uDDF4\\uDDF7])|\\uD83C\\uDDF5(?:\\uD83C[\\uDDE6\\uDDEA-\\uDDED\\uDDF0-\\uDDF3\\uDDF7-\\uDDF9\\uDDFC\\uDDFE])|\\uD83C\\uDDFB(?:\\uD83C[\\uDDE6\\uDDE8\\uDDEA\\uDDEC\\uDDEE\\uDDF3\\uDDFA])|\\uD83C\\uDDF3(?:\\uD83C[\\uDDE6\\uDDE8\\uDDEA-\\uDDEC\\uDDEE\\uDDF1\\uDDF4\\uDDF5\\uDDF7\\uDDFA\\uDDFF])|\\uD83C\\uDDE8(?:\\uD83C[\\uDDE6\\uDDE8\\uDDE9\\uDDEB-\\uDDEE\\uDDF0-\\uDDF5\\uDDF7\\uDDFA-\\uDDFF])|\\uD83C\\uDDF1(?:\\uD83C[\\uDDE6-\\uDDE8\\uDDEE\\uDDF0\\uDDF7-\\uDDFB\\uDDFE])|\\uD83C\\uDDFF(?:\\uD83C[\\uDDE6\\uDDF2\\uDDFC])|\\uD83C\\uDDFC(?:\\uD83C[\\uDDEB\\uDDF8])|\\uD83C\\uDDFA(?:\\uD83C[\\uDDE6\\uDDEC\\uDDF2\\uDDF3\\uDDF8\\uDDFE\\uDDFF])|\\uD83C\\uDDEE(?:\\uD83C[\\uDDE8-\\uDDEA\\uDDF1-\\uDDF4\\uDDF6-\\uDDF9])|\\uD83C\\uDDEF(?:\\uD83C[\\uDDEA\\uDDF2\\uDDF4\\uDDF5])|(?:\\uD83C[\\uDFC3\\uDFC4\\uDFCA]|\\uD83D[\\uDC6E\\uDC71\\uDC73\\uDC77\\uDC81\\uDC82\\uDC86\\uDC87\\uDE45-\\uDE47\\uDE4B\\uDE4D\\uDE4E\\uDEA3\\uDEB4-\\uDEB6]|\\uD83E[\\uDD26\\uDD37-\\uDD39\\uDD3D\\uDD3E\\uDDB8\\uDDB9\\uDDCD-\\uDDCF\\uDDD6-\\uDDDD])(?:\\uD83C[\\uDFFB-\\uDFFF])|(?:\\u26F9|\\uD83C[\\uDFCB\\uDFCC]|\\uD83D\\uDD75)(?:\\uD83C[\\uDFFB-\\uDFFF])|(?:[\\u261D\\u270A-\\u270D]|\\uD83C[\\uDF85\\uDFC2\\uDFC7]|\\uD83D[\\uDC42\\uDC43\\uDC46-\\uDC50\\uDC66\\uDC67\\uDC6B-\\uDC6D\\uDC70\\uDC72\\uDC74-\\uDC76\\uDC78\\uDC7C\\uDC83\\uDC85\\uDCAA\\uDD74\\uDD7A\\uDD90\\uDD95\\uDD96\\uDE4C\\uDE4F\\uDEC0\\uDECC]|\\uD83E[\\uDD0F\\uDD18-\\uDD1C\\uDD1E\\uDD1F\\uDD30-\\uDD36\\uDDB5\\uDDB6\\uDDBB\\uDDD2-\\uDDD5])(?:\\uD83C[\\uDFFB-\\uDFFF])|(?:[\\u231A\\u231B\\u23E9-\\u23EC\\u23F0\\u23F3\\u25FD\\u25FE\\u2614\\u2615\\u2648-\\u2653\\u267F\\u2693\\u26A1\\u26AA\\u26AB\\u26BD\\u26BE\\u26C4\\u26C5\\u26CE\\u26D4\\u26EA\\u26F2\\u26F3\\u26F5\\u26FA\\u26FD\\u2705\\u270A\\u270B\\u2728\\u274C\\u274E\\u2753-\\u2755\\u2757\\u2795-\\u2797\\u27B0\\u27BF\\u2B1B\\u2B1C\\u2B50\\u2B55]|\\uD83C[\\uDC04\\uDCCF\\uDD8E\\uDD91-\\uDD9A\\uDDE6-\\uDDFF\\uDE01\\uDE1A\\uDE2F\\uDE32-\\uDE36\\uDE38-\\uDE3A\\uDE50\\uDE51\\uDF00-\\uDF20\\uDF2D-\\uDF35\\uDF37-\\uDF7C\\uDF7E-\\uDF93\\uDFA0-\\uDFCA\\uDFCF-\\uDFD3\\uDFE0-\\uDFF0\\uDFF4\\uDFF8-\\uDFFF]|\\uD83D[\\uDC00-\\uDC3E\\uDC40\\uDC42-\\uDCFC\\uDCFF-\\uDD3D\\uDD4B-\\uDD4E\\uDD50-\\uDD67\\uDD7A\\uDD95\\uDD96\\uDDA4\\uDDFB-\\uDE4F\\uDE80-\\uDEC5\\uDECC\\uDED0-\\uDED2\\uDED5\\uDEEB\\uDEEC\\uDEF4-\\uDEFA\\uDFE0-\\uDFEB]|\\uD83E[\\uDD0D-\\uDD3A\\uDD3C-\\uDD45\\uDD47-\\uDD71\\uDD73-\\uDD76\\uDD7A-\\uDDA2\\uDDA5-\\uDDAA\\uDDAE-\\uDDCA\\uDDCD-\\uDDFF\\uDE70-\\uDE73\\uDE78-\\uDE7A\\uDE80-\\uDE82\\uDE90-\\uDE95])|(?:[#\\*0-9\\xA9\\xAE\\u203C\\u2049\\u2122\\u2139\\u2194-\\u2199\\u21A9\\u21AA\\u231A\\u231B\\u2328\\u23CF\\u23E9-\\u23F3\\u23F8-\\u23FA\\u24C2\\u25AA\\u25AB\\u25B6\\u25C0\\u25FB-\\u25FE\\u2600-\\u2604\\u260E\\u2611\\u2614\\u2615\\u2618\\u261D\\u2620\\u2622\\u2623\\u2626\\u262A\\u262E\\u262F\\u2638-\\u263A\\u2640\\u2642\\u2648-\\u2653\\u265F\\u2660\\u2663\\u2665\\u2666\\u2668\\u267B\\u267E\\u267F\\u2692-\\u2697\\u2699\\u269B\\u269C\\u26A0\\u26A1\\u26AA\\u26AB\\u26B0\\u26B1\\u26BD\\u26BE\\u26C4\\u26C5\\u26C8\\u26CE\\u26CF\\u26D1\\u26D3\\u26D4\\u26E9\\u26EA\\u26F0-\\u26F5\\u26F7-\\u26FA\\u26FD\\u2702\\u2705\\u2708-\\u270D\\u270F\\u2712\\u2714\\u2716\\u271D\\u2721\\u2728\\u2733\\u2734\\u2744\\u2747\\u274C\\u274E\\u2753-\\u2755\\u2757\\u2763\\u2764\\u2795-\\u2797\\u27A1\\u27B0\\u27BF\\u2934\\u2935\\u2B05-\\u2B07\\u2B1B\\u2B1C\\u2B50\\u2B55\\u3030\\u303D\\u3297\\u3299]|\\uD83C[\\uDC04\\uDCCF\\uDD70\\uDD71\\uDD7E\\uDD7F\\uDD8E\\uDD91-\\uDD9A\\uDDE6-\\uDDFF\\uDE01\\uDE02\\uDE1A\\uDE2F\\uDE32-\\uDE3A\\uDE50\\uDE51\\uDF00-\\uDF21\\uDF24-\\uDF93\\uDF96\\uDF97\\uDF99-\\uDF9B\\uDF9E-\\uDFF0\\uDFF3-\\uDFF5\\uDFF7-\\uDFFF]|\\uD83D[\\uDC00-\\uDCFD\\uDCFF-\\uDD3D\\uDD49-\\uDD4E\\uDD50-\\uDD67\\uDD6F\\uDD70\\uDD73-\\uDD7A\\uDD87\\uDD8A-\\uDD8D\\uDD90\\uDD95\\uDD96\\uDDA4\\uDDA5\\uDDA8\\uDDB1\\uDDB2\\uDDBC\\uDDC2-\\uDDC4\\uDDD1-\\uDDD3\\uDDDC-\\uDDDE\\uDDE1\\uDDE3\\uDDE8\\uDDEF\\uDDF3\\uDDFA-\\uDE4F\\uDE80-\\uDEC5\\uDECB-\\uDED2\\uDED5\\uDEE0-\\uDEE5\\uDEE9\\uDEEB\\uDEEC\\uDEF0\\uDEF3-\\uDEFA\\uDFE0-\\uDFEB]|\\uD83E[\\uDD0D-\\uDD3A\\uDD3C-\\uDD45\\uDD47-\\uDD71\\uDD73-\\uDD76\\uDD7A-\\uDDA2\\uDDA5-\\uDDAA\\uDDAE-\\uDDCA\\uDDCD-\\uDDFF\\uDE70-\\uDE73\\uDE78-\\uDE7A\\uDE80-\\uDE82\\uDE90-\\uDE95])\\uFE0F|(?:[\\u261D\\u26F9\\u270A-\\u270D]|\\uD83C[\\uDF85\\uDFC2-\\uDFC4\\uDFC7\\uDFCA-\\uDFCC]|\\uD83D[\\uDC42\\uDC43\\uDC46-\\uDC50\\uDC66-\\uDC78\\uDC7C\\uDC81-\\uDC83\\uDC85-\\uDC87\\uDC8F\\uDC91\\uDCAA\\uDD74\\uDD75\\uDD7A\\uDD90\\uDD95\\uDD96\\uDE45-\\uDE47\\uDE4B-\\uDE4F\\uDEA3\\uDEB4-\\uDEB6\\uDEC0\\uDECC]|\\uD83E[\\uDD0F\\uDD18-\\uDD1F\\uDD26\\uDD30-\\uDD39\\uDD3C-\\uDD3E\\uDDB5\\uDDB6\\uDDB8\\uDDB9\\uDDBB\\uDDCD-\\uDDCF\\uDDD1-\\uDDDD])/g;\n};\n","'use strict';\n\n// do not edit .js files directly - edit src/index.jst\n\n\n\nmodule.exports = function equal(a, b) {\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n\n for (i = length; i-- !== 0;) {\n var key = keys[i];\n\n if (!equal(a[key], b[key])) return false;\n }\n\n return true;\n }\n\n // true if both NaN, false otherwise\n return a!==a && b!==b;\n};\n","'use strict';\n\nconst validator = require('./validator');\nconst XMLParser = require('./xmlparser/XMLParser');\nconst XMLBuilder = require('./xmlbuilder/json2xml');\n\nmodule.exports = {\n XMLParser: XMLParser,\n XMLValidator: validator,\n XMLBuilder: XMLBuilder\n}","'use strict';\n\nconst nameStartChar = ':A-Za-z_\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD';\nconst nameChar = nameStartChar + '\\\\-.\\\\d\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040';\nconst nameRegexp = '[' + nameStartChar + '][' + nameChar + ']*'\nconst regexName = new RegExp('^' + nameRegexp + '$');\n\nconst getAllMatches = function(string, regex) {\n const matches = [];\n let match = regex.exec(string);\n while (match) {\n const allmatches = [];\n allmatches.startIndex = regex.lastIndex - match[0].length;\n const len = match.length;\n for (let index = 0; index < len; index++) {\n allmatches.push(match[index]);\n }\n matches.push(allmatches);\n match = regex.exec(string);\n }\n return matches;\n};\n\nconst isName = function(string) {\n const match = regexName.exec(string);\n return !(match === null || typeof match === 'undefined');\n};\n\nexports.isExist = function(v) {\n return typeof v !== 'undefined';\n};\n\nexports.isEmptyObject = function(obj) {\n return Object.keys(obj).length === 0;\n};\n\n/**\n * Copy all the properties of a into b.\n * @param {*} target\n * @param {*} a\n */\nexports.merge = function(target, a, arrayMode) {\n if (a) {\n const keys = Object.keys(a); // will return an array of own properties\n const len = keys.length; //don't make it inline\n for (let i = 0; i < len; i++) {\n if (arrayMode === 'strict') {\n target[keys[i]] = [ a[keys[i]] ];\n } else {\n target[keys[i]] = a[keys[i]];\n }\n }\n }\n};\n/* exports.merge =function (b,a){\n return Object.assign(b,a);\n} */\n\nexports.getValue = function(v) {\n if (exports.isExist(v)) {\n return v;\n } else {\n return '';\n }\n};\n\n// const fakeCall = function(a) {return a;};\n// const fakeCallNoReturn = function() {};\n\nexports.isName = isName;\nexports.getAllMatches = getAllMatches;\nexports.nameRegexp = nameRegexp;\n","'use strict';\n\nconst util = require('./util');\n\nconst defaultOptions = {\n allowBooleanAttributes: false, //A tag can have attributes without any value\n unpairedTags: []\n};\n\n//const tagsPattern = new RegExp(\"<\\\\/?([\\\\w:\\\\-_\\.]+)\\\\s*\\/?>\",\"g\");\nexports.validate = function (xmlData, options) {\n options = Object.assign({}, defaultOptions, options);\n\n //xmlData = xmlData.replace(/(\\r\\n|\\n|\\r)/gm,\"\");//make it single line\n //xmlData = xmlData.replace(/(^\\s*<\\?xml.*?\\?>)/g,\"\");//Remove XML starting tag\n //xmlData = xmlData.replace(/()/g,\"\");//Remove DOCTYPE\n const tags = [];\n let tagFound = false;\n\n //indicates that the root tag has been closed (aka. depth 0 has been reached)\n let reachedRoot = false;\n\n if (xmlData[0] === '\\ufeff') {\n // check for byte order mark (BOM)\n xmlData = xmlData.substr(1);\n }\n \n for (let i = 0; i < xmlData.length; i++) {\n\n if (xmlData[i] === '<' && xmlData[i+1] === '?') {\n i+=2;\n i = readPI(xmlData,i);\n if (i.err) return i;\n }else if (xmlData[i] === '<') {\n //starting of tag\n //read until you reach to '>' avoiding any '>' in attribute value\n let tagStartPos = i;\n i++;\n \n if (xmlData[i] === '!') {\n i = readCommentAndCDATA(xmlData, i);\n continue;\n } else {\n let closingTag = false;\n if (xmlData[i] === '/') {\n //closing tag\n closingTag = true;\n i++;\n }\n //read tagname\n let tagName = '';\n for (; i < xmlData.length &&\n xmlData[i] !== '>' &&\n xmlData[i] !== ' ' &&\n xmlData[i] !== '\\t' &&\n xmlData[i] !== '\\n' &&\n xmlData[i] !== '\\r'; i++\n ) {\n tagName += xmlData[i];\n }\n tagName = tagName.trim();\n //console.log(tagName);\n\n if (tagName[tagName.length - 1] === '/') {\n //self closing tag without attributes\n tagName = tagName.substring(0, tagName.length - 1);\n //continue;\n i--;\n }\n if (!validateTagName(tagName)) {\n let msg;\n if (tagName.trim().length === 0) {\n msg = \"Invalid space after '<'.\";\n } else {\n msg = \"Tag '\"+tagName+\"' is an invalid name.\";\n }\n return getErrorObject('InvalidTag', msg, getLineNumberForPosition(xmlData, i));\n }\n\n const result = readAttributeStr(xmlData, i);\n if (result === false) {\n return getErrorObject('InvalidAttr', \"Attributes for '\"+tagName+\"' have open quote.\", getLineNumberForPosition(xmlData, i));\n }\n let attrStr = result.value;\n i = result.index;\n\n if (attrStr[attrStr.length - 1] === '/') {\n //self closing tag\n const attrStrStart = i - attrStr.length;\n attrStr = attrStr.substring(0, attrStr.length - 1);\n const isValid = validateAttributeString(attrStr, options);\n if (isValid === true) {\n tagFound = true;\n //continue; //text may presents after self closing tag\n } else {\n //the result from the nested function returns the position of the error within the attribute\n //in order to get the 'true' error line, we need to calculate the position where the attribute begins (i - attrStr.length) and then add the position within the attribute\n //this gives us the absolute index in the entire xml, which we can use to find the line at last\n return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, attrStrStart + isValid.err.line));\n }\n } else if (closingTag) {\n if (!result.tagClosed) {\n return getErrorObject('InvalidTag', \"Closing tag '\"+tagName+\"' doesn't have proper closing.\", getLineNumberForPosition(xmlData, i));\n } else if (attrStr.trim().length > 0) {\n return getErrorObject('InvalidTag', \"Closing tag '\"+tagName+\"' can't have attributes or invalid starting.\", getLineNumberForPosition(xmlData, tagStartPos));\n } else if (tags.length === 0) {\n return getErrorObject('InvalidTag', \"Closing tag '\"+tagName+\"' has not been opened.\", getLineNumberForPosition(xmlData, tagStartPos));\n } else {\n const otg = tags.pop();\n if (tagName !== otg.tagName) {\n let openPos = getLineNumberForPosition(xmlData, otg.tagStartPos);\n return getErrorObject('InvalidTag',\n \"Expected closing tag '\"+otg.tagName+\"' (opened in line \"+openPos.line+\", col \"+openPos.col+\") instead of closing tag '\"+tagName+\"'.\",\n getLineNumberForPosition(xmlData, tagStartPos));\n }\n\n //when there are no more tags, we reached the root level.\n if (tags.length == 0) {\n reachedRoot = true;\n }\n }\n } else {\n const isValid = validateAttributeString(attrStr, options);\n if (isValid !== true) {\n //the result from the nested function returns the position of the error within the attribute\n //in order to get the 'true' error line, we need to calculate the position where the attribute begins (i - attrStr.length) and then add the position within the attribute\n //this gives us the absolute index in the entire xml, which we can use to find the line at last\n return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, i - attrStr.length + isValid.err.line));\n }\n\n //if the root level has been reached before ...\n if (reachedRoot === true) {\n return getErrorObject('InvalidXml', 'Multiple possible root nodes found.', getLineNumberForPosition(xmlData, i));\n } else if(options.unpairedTags.indexOf(tagName) !== -1){\n //don't push into stack\n } else {\n tags.push({tagName, tagStartPos});\n }\n tagFound = true;\n }\n\n //skip tag text value\n //It may include comments and CDATA value\n for (i++; i < xmlData.length; i++) {\n if (xmlData[i] === '<') {\n if (xmlData[i + 1] === '!') {\n //comment or CADATA\n i++;\n i = readCommentAndCDATA(xmlData, i);\n continue;\n } else if (xmlData[i+1] === '?') {\n i = readPI(xmlData, ++i);\n if (i.err) return i;\n } else{\n break;\n }\n } else if (xmlData[i] === '&') {\n const afterAmp = validateAmpersand(xmlData, i);\n if (afterAmp == -1)\n return getErrorObject('InvalidChar', \"char '&' is not expected.\", getLineNumberForPosition(xmlData, i));\n i = afterAmp;\n }else{\n if (reachedRoot === true && !isWhiteSpace(xmlData[i])) {\n return getErrorObject('InvalidXml', \"Extra text at the end\", getLineNumberForPosition(xmlData, i));\n }\n }\n } //end of reading tag text value\n if (xmlData[i] === '<') {\n i--;\n }\n }\n } else {\n if ( isWhiteSpace(xmlData[i])) {\n continue;\n }\n return getErrorObject('InvalidChar', \"char '\"+xmlData[i]+\"' is not expected.\", getLineNumberForPosition(xmlData, i));\n }\n }\n\n if (!tagFound) {\n return getErrorObject('InvalidXml', 'Start tag expected.', 1);\n }else if (tags.length == 1) {\n return getErrorObject('InvalidTag', \"Unclosed tag '\"+tags[0].tagName+\"'.\", getLineNumberForPosition(xmlData, tags[0].tagStartPos));\n }else if (tags.length > 0) {\n return getErrorObject('InvalidXml', \"Invalid '\"+\n JSON.stringify(tags.map(t => t.tagName), null, 4).replace(/\\r?\\n/g, '')+\n \"' found.\", {line: 1, col: 1});\n }\n\n return true;\n};\n\nfunction isWhiteSpace(char){\n return char === ' ' || char === '\\t' || char === '\\n' || char === '\\r';\n}\n/**\n * Read Processing insstructions and skip\n * @param {*} xmlData\n * @param {*} i\n */\nfunction readPI(xmlData, i) {\n const start = i;\n for (; i < xmlData.length; i++) {\n if (xmlData[i] == '?' || xmlData[i] == ' ') {\n //tagname\n const tagname = xmlData.substr(start, i - start);\n if (i > 5 && tagname === 'xml') {\n return getErrorObject('InvalidXml', 'XML declaration allowed only at the start of the document.', getLineNumberForPosition(xmlData, i));\n } else if (xmlData[i] == '?' && xmlData[i + 1] == '>') {\n //check if valid attribut string\n i++;\n break;\n } else {\n continue;\n }\n }\n }\n return i;\n}\n\nfunction readCommentAndCDATA(xmlData, i) {\n if (xmlData.length > i + 5 && xmlData[i + 1] === '-' && xmlData[i + 2] === '-') {\n //comment\n for (i += 3; i < xmlData.length; i++) {\n if (xmlData[i] === '-' && xmlData[i + 1] === '-' && xmlData[i + 2] === '>') {\n i += 2;\n break;\n }\n }\n } else if (\n xmlData.length > i + 8 &&\n xmlData[i + 1] === 'D' &&\n xmlData[i + 2] === 'O' &&\n xmlData[i + 3] === 'C' &&\n xmlData[i + 4] === 'T' &&\n xmlData[i + 5] === 'Y' &&\n xmlData[i + 6] === 'P' &&\n xmlData[i + 7] === 'E'\n ) {\n let angleBracketsCount = 1;\n for (i += 8; i < xmlData.length; i++) {\n if (xmlData[i] === '<') {\n angleBracketsCount++;\n } else if (xmlData[i] === '>') {\n angleBracketsCount--;\n if (angleBracketsCount === 0) {\n break;\n }\n }\n }\n } else if (\n xmlData.length > i + 9 &&\n xmlData[i + 1] === '[' &&\n xmlData[i + 2] === 'C' &&\n xmlData[i + 3] === 'D' &&\n xmlData[i + 4] === 'A' &&\n xmlData[i + 5] === 'T' &&\n xmlData[i + 6] === 'A' &&\n xmlData[i + 7] === '['\n ) {\n for (i += 8; i < xmlData.length; i++) {\n if (xmlData[i] === ']' && xmlData[i + 1] === ']' && xmlData[i + 2] === '>') {\n i += 2;\n break;\n }\n }\n }\n\n return i;\n}\n\nconst doubleQuote = '\"';\nconst singleQuote = \"'\";\n\n/**\n * Keep reading xmlData until '<' is found outside the attribute value.\n * @param {string} xmlData\n * @param {number} i\n */\nfunction readAttributeStr(xmlData, i) {\n let attrStr = '';\n let startChar = '';\n let tagClosed = false;\n for (; i < xmlData.length; i++) {\n if (xmlData[i] === doubleQuote || xmlData[i] === singleQuote) {\n if (startChar === '') {\n startChar = xmlData[i];\n } else if (startChar !== xmlData[i]) {\n //if vaue is enclosed with double quote then single quotes are allowed inside the value and vice versa\n } else {\n startChar = '';\n }\n } else if (xmlData[i] === '>') {\n if (startChar === '') {\n tagClosed = true;\n break;\n }\n }\n attrStr += xmlData[i];\n }\n if (startChar !== '') {\n return false;\n }\n\n return {\n value: attrStr,\n index: i,\n tagClosed: tagClosed\n };\n}\n\n/**\n * Select all the attributes whether valid or invalid.\n */\nconst validAttrStrRegxp = new RegExp('(\\\\s*)([^\\\\s=]+)(\\\\s*=)?(\\\\s*([\\'\"])(([\\\\s\\\\S])*?)\\\\5)?', 'g');\n\n//attr, =\"sd\", a=\"amit's\", a=\"sd\"b=\"saf\", ab cd=\"\"\n\nfunction validateAttributeString(attrStr, options) {\n //console.log(\"start:\"+attrStr+\":end\");\n\n //if(attrStr.trim().length === 0) return true; //empty string\n\n const matches = util.getAllMatches(attrStr, validAttrStrRegxp);\n const attrNames = {};\n\n for (let i = 0; i < matches.length; i++) {\n if (matches[i][1].length === 0) {\n //nospace before attribute name: a=\"sd\"b=\"saf\"\n return getErrorObject('InvalidAttr', \"Attribute '\"+matches[i][2]+\"' has no space in starting.\", getPositionFromMatch(matches[i]))\n } else if (matches[i][3] !== undefined && matches[i][4] === undefined) {\n return getErrorObject('InvalidAttr', \"Attribute '\"+matches[i][2]+\"' is without value.\", getPositionFromMatch(matches[i]));\n } else if (matches[i][3] === undefined && !options.allowBooleanAttributes) {\n //independent attribute: ab\n return getErrorObject('InvalidAttr', \"boolean attribute '\"+matches[i][2]+\"' is not allowed.\", getPositionFromMatch(matches[i]));\n }\n /* else if(matches[i][6] === undefined){//attribute without value: ab=\n return { err: { code:\"InvalidAttr\",msg:\"attribute \" + matches[i][2] + \" has no value assigned.\"}};\n } */\n const attrName = matches[i][2];\n if (!validateAttrName(attrName)) {\n return getErrorObject('InvalidAttr', \"Attribute '\"+attrName+\"' is an invalid name.\", getPositionFromMatch(matches[i]));\n }\n if (!attrNames.hasOwnProperty(attrName)) {\n //check for duplicate attribute.\n attrNames[attrName] = 1;\n } else {\n return getErrorObject('InvalidAttr', \"Attribute '\"+attrName+\"' is repeated.\", getPositionFromMatch(matches[i]));\n }\n }\n\n return true;\n}\n\nfunction validateNumberAmpersand(xmlData, i) {\n let re = /\\d/;\n if (xmlData[i] === 'x') {\n i++;\n re = /[\\da-fA-F]/;\n }\n for (; i < xmlData.length; i++) {\n if (xmlData[i] === ';')\n return i;\n if (!xmlData[i].match(re))\n break;\n }\n return -1;\n}\n\nfunction validateAmpersand(xmlData, i) {\n // https://www.w3.org/TR/xml/#dt-charref\n i++;\n if (xmlData[i] === ';')\n return -1;\n if (xmlData[i] === '#') {\n i++;\n return validateNumberAmpersand(xmlData, i);\n }\n let count = 0;\n for (; i < xmlData.length; i++, count++) {\n if (xmlData[i].match(/\\w/) && count < 20)\n continue;\n if (xmlData[i] === ';')\n break;\n return -1;\n }\n return i;\n}\n\nfunction getErrorObject(code, message, lineNumber) {\n return {\n err: {\n code: code,\n msg: message,\n line: lineNumber.line || lineNumber,\n col: lineNumber.col,\n },\n };\n}\n\nfunction validateAttrName(attrName) {\n return util.isName(attrName);\n}\n\n// const startsWithXML = /^xml/i;\n\nfunction validateTagName(tagname) {\n return util.isName(tagname) /* && !tagname.match(startsWithXML) */;\n}\n\n//this function returns the line number for the character at the given index\nfunction getLineNumberForPosition(xmlData, index) {\n const lines = xmlData.substring(0, index).split(/\\r?\\n/);\n return {\n line: lines.length,\n\n // column number is last line's length + 1, because column numbering starts at 1:\n col: lines[lines.length - 1].length + 1\n };\n}\n\n//this function returns the position of the first character of match within attrStr\nfunction getPositionFromMatch(match) {\n return match.startIndex + match[1].length;\n}\n","'use strict';\n//parse Empty Node as self closing node\nconst buildFromOrderedJs = require('./orderedJs2Xml');\n\nconst defaultOptions = {\n attributeNamePrefix: '@_',\n attributesGroupName: false,\n textNodeName: '#text',\n ignoreAttributes: true,\n cdataPropName: false,\n format: false,\n indentBy: ' ',\n suppressEmptyNode: false,\n suppressUnpairedNode: true,\n suppressBooleanAttributes: true,\n tagValueProcessor: function(key, a) {\n return a;\n },\n attributeValueProcessor: function(attrName, a) {\n return a;\n },\n preserveOrder: false,\n commentPropName: false,\n unpairedTags: [],\n entities: [\n { regex: new RegExp(\"&\", \"g\"), val: \"&\" },//it must be on top\n { regex: new RegExp(\">\", \"g\"), val: \">\" },\n { regex: new RegExp(\"<\", \"g\"), val: \"<\" },\n { regex: new RegExp(\"\\'\", \"g\"), val: \"'\" },\n { regex: new RegExp(\"\\\"\", \"g\"), val: \""\" }\n ],\n processEntities: true,\n stopNodes: [],\n // transformTagName: false,\n // transformAttributeName: false,\n oneListGroup: false\n};\n\nfunction Builder(options) {\n this.options = Object.assign({}, defaultOptions, options);\n if (this.options.ignoreAttributes || this.options.attributesGroupName) {\n this.isAttribute = function(/*a*/) {\n return false;\n };\n } else {\n this.attrPrefixLen = this.options.attributeNamePrefix.length;\n this.isAttribute = isAttribute;\n }\n\n this.processTextOrObjNode = processTextOrObjNode\n\n if (this.options.format) {\n this.indentate = indentate;\n this.tagEndChar = '>\\n';\n this.newLine = '\\n';\n } else {\n this.indentate = function() {\n return '';\n };\n this.tagEndChar = '>';\n this.newLine = '';\n }\n}\n\nBuilder.prototype.build = function(jObj) {\n if(this.options.preserveOrder){\n return buildFromOrderedJs(jObj, this.options);\n }else {\n if(Array.isArray(jObj) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1){\n jObj = {\n [this.options.arrayNodeName] : jObj\n }\n }\n return this.j2x(jObj, 0).val;\n }\n};\n\nBuilder.prototype.j2x = function(jObj, level) {\n let attrStr = '';\n let val = '';\n for (let key in jObj) {\n if(!Object.prototype.hasOwnProperty.call(jObj, key)) continue;\n if (typeof jObj[key] === 'undefined') {\n // supress undefined node only if it is not an attribute\n if (this.isAttribute(key)) {\n val += '';\n }\n } else if (jObj[key] === null) {\n // null attribute should be ignored by the attribute list, but should not cause the tag closing\n if (this.isAttribute(key)) {\n val += '';\n } else if (key[0] === '?') {\n val += this.indentate(level) + '<' + key + '?' + this.tagEndChar;\n } else {\n val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;\n }\n // val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;\n } else if (jObj[key] instanceof Date) {\n val += this.buildTextValNode(jObj[key], key, '', level);\n } else if (typeof jObj[key] !== 'object') {\n //premitive type\n const attr = this.isAttribute(key);\n if (attr) {\n attrStr += this.buildAttrPairStr(attr, '' + jObj[key]);\n }else {\n //tag value\n if (key === this.options.textNodeName) {\n let newval = this.options.tagValueProcessor(key, '' + jObj[key]);\n val += this.replaceEntitiesValue(newval);\n } else {\n val += this.buildTextValNode(jObj[key], key, '', level);\n }\n }\n } else if (Array.isArray(jObj[key])) {\n //repeated nodes\n const arrLen = jObj[key].length;\n let listTagVal = \"\";\n let listTagAttr = \"\";\n for (let j = 0; j < arrLen; j++) {\n const item = jObj[key][j];\n if (typeof item === 'undefined') {\n // supress undefined node\n } else if (item === null) {\n if(key[0] === \"?\") val += this.indentate(level) + '<' + key + '?' + this.tagEndChar;\n else val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;\n // val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;\n } else if (typeof item === 'object') {\n if(this.options.oneListGroup){\n const result = this.j2x(item, level + 1);\n listTagVal += result.val;\n if (this.options.attributesGroupName && item.hasOwnProperty(this.options.attributesGroupName)) {\n listTagAttr += result.attrStr\n }\n }else{\n listTagVal += this.processTextOrObjNode(item, key, level)\n }\n } else {\n if (this.options.oneListGroup) {\n let textValue = this.options.tagValueProcessor(key, item);\n textValue = this.replaceEntitiesValue(textValue);\n listTagVal += textValue;\n } else {\n listTagVal += this.buildTextValNode(item, key, '', level);\n }\n }\n }\n if(this.options.oneListGroup){\n listTagVal = this.buildObjectNode(listTagVal, key, listTagAttr, level);\n }\n val += listTagVal;\n } else {\n //nested node\n if (this.options.attributesGroupName && key === this.options.attributesGroupName) {\n const Ks = Object.keys(jObj[key]);\n const L = Ks.length;\n for (let j = 0; j < L; j++) {\n attrStr += this.buildAttrPairStr(Ks[j], '' + jObj[key][Ks[j]]);\n }\n } else {\n val += this.processTextOrObjNode(jObj[key], key, level)\n }\n }\n }\n return {attrStr: attrStr, val: val};\n};\n\nBuilder.prototype.buildAttrPairStr = function(attrName, val){\n val = this.options.attributeValueProcessor(attrName, '' + val);\n val = this.replaceEntitiesValue(val);\n if (this.options.suppressBooleanAttributes && val === \"true\") {\n return ' ' + attrName;\n } else return ' ' + attrName + '=\"' + val + '\"';\n}\n\nfunction processTextOrObjNode (object, key, level) {\n const result = this.j2x(object, level + 1);\n if (object[this.options.textNodeName] !== undefined && Object.keys(object).length === 1) {\n return this.buildTextValNode(object[this.options.textNodeName], key, result.attrStr, level);\n } else {\n return this.buildObjectNode(result.val, key, result.attrStr, level);\n }\n}\n\nBuilder.prototype.buildObjectNode = function(val, key, attrStr, level) {\n if(val === \"\"){\n if(key[0] === \"?\") return this.indentate(level) + '<' + key + attrStr+ '?' + this.tagEndChar;\n else {\n return this.indentate(level) + '<' + key + attrStr + this.closeTag(key) + this.tagEndChar;\n }\n }else{\n\n let tagEndExp = '' + key + this.tagEndChar;\n let piClosingChar = \"\";\n \n if(key[0] === \"?\") {\n piClosingChar = \"?\";\n tagEndExp = \"\";\n }\n \n // attrStr is an empty string in case the attribute came as undefined or null\n if ((attrStr || attrStr === '') && val.indexOf('<') === -1) {\n return ( this.indentate(level) + '<' + key + attrStr + piClosingChar + '>' + val + tagEndExp );\n } else if (this.options.commentPropName !== false && key === this.options.commentPropName && piClosingChar.length === 0) {\n return this.indentate(level) + `` + this.newLine;\n }else {\n return (\n this.indentate(level) + '<' + key + attrStr + piClosingChar + this.tagEndChar +\n val +\n this.indentate(level) + tagEndExp );\n }\n }\n}\n\nBuilder.prototype.closeTag = function(key){\n let closeTag = \"\";\n if(this.options.unpairedTags.indexOf(key) !== -1){ //unpaired\n if(!this.options.suppressUnpairedNode) closeTag = \"/\"\n }else if(this.options.suppressEmptyNode){ //empty\n closeTag = \"/\";\n }else{\n closeTag = `>${key}`\n }\n return closeTag;\n}\n\nfunction buildEmptyObjNode(val, key, attrStr, level) {\n if (val !== '') {\n return this.buildObjectNode(val, key, attrStr, level);\n } else {\n if(key[0] === \"?\") return this.indentate(level) + '<' + key + attrStr+ '?' + this.tagEndChar;\n else {\n return this.indentate(level) + '<' + key + attrStr + '/' + this.tagEndChar;\n // return this.buildTagStr(level,key, attrStr);\n }\n }\n}\n\nBuilder.prototype.buildTextValNode = function(val, key, attrStr, level) {\n if (this.options.cdataPropName !== false && key === this.options.cdataPropName) {\n return this.indentate(level) + `` + this.newLine;\n }else if (this.options.commentPropName !== false && key === this.options.commentPropName) {\n return this.indentate(level) + `` + this.newLine;\n }else if(key[0] === \"?\") {//PI tag\n return this.indentate(level) + '<' + key + attrStr+ '?' + this.tagEndChar; \n }else{\n let textValue = this.options.tagValueProcessor(key, val);\n textValue = this.replaceEntitiesValue(textValue);\n \n if( textValue === ''){\n return this.indentate(level) + '<' + key + attrStr + this.closeTag(key) + this.tagEndChar;\n }else{\n return this.indentate(level) + '<' + key + attrStr + '>' +\n textValue +\n '' + key + this.tagEndChar;\n }\n }\n}\n\nBuilder.prototype.replaceEntitiesValue = function(textValue){\n if(textValue && textValue.length > 0 && this.options.processEntities){\n for (let i=0; iA message with details about the error that occurred.
\n * @public\n */\n Message;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"CFNRegistryException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _CFNRegistryException.prototype);\n this.Message = opts.Message;\n }\n};\nvar TypeNotFoundException = class _TypeNotFoundException extends CloudFormationServiceException {\n static {\n __name(this, \"TypeNotFoundException\");\n }\n name = \"TypeNotFoundException\";\n $fault = \"client\";\n /**\n *A message with details about the error that occurred.
\n * @public\n */\n Message;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"TypeNotFoundException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _TypeNotFoundException.prototype);\n this.Message = opts.Message;\n }\n};\nvar AlreadyExistsException = class _AlreadyExistsException extends CloudFormationServiceException {\n static {\n __name(this, \"AlreadyExistsException\");\n }\n name = \"AlreadyExistsException\";\n $fault = \"client\";\n Message;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"AlreadyExistsException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _AlreadyExistsException.prototype);\n this.Message = opts.Message;\n }\n};\nvar AttributeChangeType = {\n Add: \"Add\",\n Modify: \"Modify\",\n Remove: \"Remove\"\n};\nvar TypeConfigurationNotFoundException = class _TypeConfigurationNotFoundException extends CloudFormationServiceException {\n static {\n __name(this, \"TypeConfigurationNotFoundException\");\n }\n name = \"TypeConfigurationNotFoundException\";\n $fault = \"client\";\n /**\n *A message with details about the error that occurred.
\n * @public\n */\n Message;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"TypeConfigurationNotFoundException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _TypeConfigurationNotFoundException.prototype);\n this.Message = opts.Message;\n }\n};\nvar CallAs = {\n DELEGATED_ADMIN: \"DELEGATED_ADMIN\",\n SELF: \"SELF\"\n};\nvar TokenAlreadyExistsException = class _TokenAlreadyExistsException extends CloudFormationServiceException {\n static {\n __name(this, \"TokenAlreadyExistsException\");\n }\n name = \"TokenAlreadyExistsException\";\n $fault = \"client\";\n Message;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"TokenAlreadyExistsException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _TokenAlreadyExistsException.prototype);\n this.Message = opts.Message;\n }\n};\nvar Capability = {\n CAPABILITY_AUTO_EXPAND: \"CAPABILITY_AUTO_EXPAND\",\n CAPABILITY_IAM: \"CAPABILITY_IAM\",\n CAPABILITY_NAMED_IAM: \"CAPABILITY_NAMED_IAM\"\n};\nvar Category = {\n ACTIVATED: \"ACTIVATED\",\n AWS_TYPES: \"AWS_TYPES\",\n REGISTERED: \"REGISTERED\",\n THIRD_PARTY: \"THIRD_PARTY\"\n};\nvar ChangeAction = {\n Add: \"Add\",\n Dynamic: \"Dynamic\",\n Import: \"Import\",\n Modify: \"Modify\",\n Remove: \"Remove\"\n};\nvar ChangeSource = {\n Automatic: \"Automatic\",\n DirectModification: \"DirectModification\",\n ParameterReference: \"ParameterReference\",\n ResourceAttribute: \"ResourceAttribute\",\n ResourceReference: \"ResourceReference\"\n};\nvar EvaluationType = {\n Dynamic: \"Dynamic\",\n Static: \"Static\"\n};\nvar ResourceAttribute = {\n CreationPolicy: \"CreationPolicy\",\n DeletionPolicy: \"DeletionPolicy\",\n Metadata: \"Metadata\",\n Properties: \"Properties\",\n Tags: \"Tags\",\n UpdatePolicy: \"UpdatePolicy\",\n UpdateReplacePolicy: \"UpdateReplacePolicy\"\n};\nvar RequiresRecreation = {\n Always: \"Always\",\n Conditionally: \"Conditionally\",\n Never: \"Never\"\n};\nvar PolicyAction = {\n Delete: \"Delete\",\n ReplaceAndDelete: \"ReplaceAndDelete\",\n ReplaceAndRetain: \"ReplaceAndRetain\",\n ReplaceAndSnapshot: \"ReplaceAndSnapshot\",\n Retain: \"Retain\",\n Snapshot: \"Snapshot\"\n};\nvar Replacement = {\n Conditional: \"Conditional\",\n False: \"False\",\n True: \"True\"\n};\nvar ChangeType = {\n Resource: \"Resource\"\n};\nvar HookFailureMode = {\n FAIL: \"FAIL\",\n WARN: \"WARN\"\n};\nvar HookInvocationPoint = {\n PRE_PROVISION: \"PRE_PROVISION\"\n};\nvar HookTargetType = {\n RESOURCE: \"RESOURCE\"\n};\nvar ChangeSetHooksStatus = {\n PLANNED: \"PLANNED\",\n PLANNING: \"PLANNING\",\n UNAVAILABLE: \"UNAVAILABLE\"\n};\nvar ChangeSetNotFoundException = class _ChangeSetNotFoundException extends CloudFormationServiceException {\n static {\n __name(this, \"ChangeSetNotFoundException\");\n }\n name = \"ChangeSetNotFoundException\";\n $fault = \"client\";\n Message;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"ChangeSetNotFoundException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _ChangeSetNotFoundException.prototype);\n this.Message = opts.Message;\n }\n};\nvar ChangeSetStatus = {\n CREATE_COMPLETE: \"CREATE_COMPLETE\",\n CREATE_IN_PROGRESS: \"CREATE_IN_PROGRESS\",\n CREATE_PENDING: \"CREATE_PENDING\",\n DELETE_COMPLETE: \"DELETE_COMPLETE\",\n DELETE_FAILED: \"DELETE_FAILED\",\n DELETE_IN_PROGRESS: \"DELETE_IN_PROGRESS\",\n DELETE_PENDING: \"DELETE_PENDING\",\n FAILED: \"FAILED\"\n};\nvar ExecutionStatus = {\n AVAILABLE: \"AVAILABLE\",\n EXECUTE_COMPLETE: \"EXECUTE_COMPLETE\",\n EXECUTE_FAILED: \"EXECUTE_FAILED\",\n EXECUTE_IN_PROGRESS: \"EXECUTE_IN_PROGRESS\",\n OBSOLETE: \"OBSOLETE\",\n UNAVAILABLE: \"UNAVAILABLE\"\n};\nvar ChangeSetType = {\n CREATE: \"CREATE\",\n IMPORT: \"IMPORT\",\n UPDATE: \"UPDATE\"\n};\nvar OnStackFailure = {\n DELETE: \"DELETE\",\n DO_NOTHING: \"DO_NOTHING\",\n ROLLBACK: \"ROLLBACK\"\n};\nvar InsufficientCapabilitiesException = class _InsufficientCapabilitiesException extends CloudFormationServiceException {\n static {\n __name(this, \"InsufficientCapabilitiesException\");\n }\n name = \"InsufficientCapabilitiesException\";\n $fault = \"client\";\n Message;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"InsufficientCapabilitiesException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _InsufficientCapabilitiesException.prototype);\n this.Message = opts.Message;\n }\n};\nvar LimitExceededException = class _LimitExceededException extends CloudFormationServiceException {\n static {\n __name(this, \"LimitExceededException\");\n }\n name = \"LimitExceededException\";\n $fault = \"client\";\n Message;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"LimitExceededException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _LimitExceededException.prototype);\n this.Message = opts.Message;\n }\n};\nvar ConcurrentResourcesLimitExceededException = class _ConcurrentResourcesLimitExceededException extends CloudFormationServiceException {\n static {\n __name(this, \"ConcurrentResourcesLimitExceededException\");\n }\n name = \"ConcurrentResourcesLimitExceededException\";\n $fault = \"client\";\n Message;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"ConcurrentResourcesLimitExceededException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _ConcurrentResourcesLimitExceededException.prototype);\n this.Message = opts.Message;\n }\n};\nvar GeneratedTemplateDeletionPolicy = {\n DELETE: \"DELETE\",\n RETAIN: \"RETAIN\"\n};\nvar GeneratedTemplateUpdateReplacePolicy = {\n DELETE: \"DELETE\",\n RETAIN: \"RETAIN\"\n};\nvar OnFailure = {\n DELETE: \"DELETE\",\n DO_NOTHING: \"DO_NOTHING\",\n ROLLBACK: \"ROLLBACK\"\n};\nvar ConcurrencyMode = {\n SOFT_FAILURE_TOLERANCE: \"SOFT_FAILURE_TOLERANCE\",\n STRICT_FAILURE_TOLERANCE: \"STRICT_FAILURE_TOLERANCE\"\n};\nvar RegionConcurrencyType = {\n PARALLEL: \"PARALLEL\",\n SEQUENTIAL: \"SEQUENTIAL\"\n};\nvar OperationIdAlreadyExistsException = class _OperationIdAlreadyExistsException extends CloudFormationServiceException {\n static {\n __name(this, \"OperationIdAlreadyExistsException\");\n }\n name = \"OperationIdAlreadyExistsException\";\n $fault = \"client\";\n Message;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"OperationIdAlreadyExistsException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _OperationIdAlreadyExistsException.prototype);\n this.Message = opts.Message;\n }\n};\nvar OperationInProgressException = class _OperationInProgressException extends CloudFormationServiceException {\n static {\n __name(this, \"OperationInProgressException\");\n }\n name = \"OperationInProgressException\";\n $fault = \"client\";\n Message;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"OperationInProgressException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _OperationInProgressException.prototype);\n this.Message = opts.Message;\n }\n};\nvar StackSetNotFoundException = class _StackSetNotFoundException extends CloudFormationServiceException {\n static {\n __name(this, \"StackSetNotFoundException\");\n }\n name = \"StackSetNotFoundException\";\n $fault = \"client\";\n Message;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"StackSetNotFoundException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _StackSetNotFoundException.prototype);\n this.Message = opts.Message;\n }\n};\nvar StaleRequestException = class _StaleRequestException extends CloudFormationServiceException {\n static {\n __name(this, \"StaleRequestException\");\n }\n name = \"StaleRequestException\";\n $fault = \"client\";\n Message;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"StaleRequestException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _StaleRequestException.prototype);\n this.Message = opts.Message;\n }\n};\nvar CreatedButModifiedException = class _CreatedButModifiedException extends CloudFormationServiceException {\n static {\n __name(this, \"CreatedButModifiedException\");\n }\n name = \"CreatedButModifiedException\";\n $fault = \"client\";\n Message;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"CreatedButModifiedException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _CreatedButModifiedException.prototype);\n this.Message = opts.Message;\n }\n};\nvar PermissionModels = {\n SELF_MANAGED: \"SELF_MANAGED\",\n SERVICE_MANAGED: \"SERVICE_MANAGED\"\n};\nvar NameAlreadyExistsException = class _NameAlreadyExistsException extends CloudFormationServiceException {\n static {\n __name(this, \"NameAlreadyExistsException\");\n }\n name = \"NameAlreadyExistsException\";\n $fault = \"client\";\n Message;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"NameAlreadyExistsException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _NameAlreadyExistsException.prototype);\n this.Message = opts.Message;\n }\n};\nvar InvalidChangeSetStatusException = class _InvalidChangeSetStatusException extends CloudFormationServiceException {\n static {\n __name(this, \"InvalidChangeSetStatusException\");\n }\n name = \"InvalidChangeSetStatusException\";\n $fault = \"client\";\n Message;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"InvalidChangeSetStatusException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _InvalidChangeSetStatusException.prototype);\n this.Message = opts.Message;\n }\n};\nvar GeneratedTemplateNotFoundException = class _GeneratedTemplateNotFoundException extends CloudFormationServiceException {\n static {\n __name(this, \"GeneratedTemplateNotFoundException\");\n }\n name = \"GeneratedTemplateNotFoundException\";\n $fault = \"client\";\n Message;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"GeneratedTemplateNotFoundException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _GeneratedTemplateNotFoundException.prototype);\n this.Message = opts.Message;\n }\n};\nvar DeletionMode = {\n FORCE_DELETE_STACK: \"FORCE_DELETE_STACK\",\n STANDARD: \"STANDARD\"\n};\nvar StackSetNotEmptyException = class _StackSetNotEmptyException extends CloudFormationServiceException {\n static {\n __name(this, \"StackSetNotEmptyException\");\n }\n name = \"StackSetNotEmptyException\";\n $fault = \"client\";\n Message;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"StackSetNotEmptyException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _StackSetNotEmptyException.prototype);\n this.Message = opts.Message;\n }\n};\nvar RegistryType = {\n HOOK: \"HOOK\",\n MODULE: \"MODULE\",\n RESOURCE: \"RESOURCE\"\n};\nvar GeneratedTemplateResourceStatus = {\n COMPLETE: \"COMPLETE\",\n FAILED: \"FAILED\",\n IN_PROGRESS: \"IN_PROGRESS\",\n PENDING: \"PENDING\"\n};\nvar WarningType = {\n EXCLUDED_PROPERTIES: \"EXCLUDED_PROPERTIES\",\n MUTUALLY_EXCLUSIVE_PROPERTIES: \"MUTUALLY_EXCLUSIVE_PROPERTIES\",\n MUTUALLY_EXCLUSIVE_TYPES: \"MUTUALLY_EXCLUSIVE_TYPES\",\n UNSUPPORTED_PROPERTIES: \"UNSUPPORTED_PROPERTIES\"\n};\nvar GeneratedTemplateStatus = {\n COMPLETE: \"COMPLETE\",\n CREATE_IN_PROGRESS: \"CREATE_IN_PROGRESS\",\n CREATE_PENDING: \"CREATE_PENDING\",\n DELETE_IN_PROGRESS: \"DELETE_IN_PROGRESS\",\n DELETE_PENDING: \"DELETE_PENDING\",\n FAILED: \"FAILED\",\n UPDATE_IN_PROGRESS: \"UPDATE_IN_PROGRESS\",\n UPDATE_PENDING: \"UPDATE_PENDING\"\n};\nvar OrganizationStatus = {\n DISABLED: \"DISABLED\",\n DISABLED_PERMANENTLY: \"DISABLED_PERMANENTLY\",\n ENABLED: \"ENABLED\"\n};\nvar IdentityProvider = {\n AWS_Marketplace: \"AWS_Marketplace\",\n Bitbucket: \"Bitbucket\",\n GitHub: \"GitHub\"\n};\nvar PublisherStatus = {\n UNVERIFIED: \"UNVERIFIED\",\n VERIFIED: \"VERIFIED\"\n};\nvar ResourceScanStatus = {\n COMPLETE: \"COMPLETE\",\n EXPIRED: \"EXPIRED\",\n FAILED: \"FAILED\",\n IN_PROGRESS: \"IN_PROGRESS\"\n};\nvar ResourceScanNotFoundException = class _ResourceScanNotFoundException extends CloudFormationServiceException {\n static {\n __name(this, \"ResourceScanNotFoundException\");\n }\n name = \"ResourceScanNotFoundException\";\n $fault = \"client\";\n Message;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"ResourceScanNotFoundException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _ResourceScanNotFoundException.prototype);\n this.Message = opts.Message;\n }\n};\nvar StackDriftDetectionStatus = {\n DETECTION_COMPLETE: \"DETECTION_COMPLETE\",\n DETECTION_FAILED: \"DETECTION_FAILED\",\n DETECTION_IN_PROGRESS: \"DETECTION_IN_PROGRESS\"\n};\nvar StackDriftStatus = {\n DRIFTED: \"DRIFTED\",\n IN_SYNC: \"IN_SYNC\",\n NOT_CHECKED: \"NOT_CHECKED\",\n UNKNOWN: \"UNKNOWN\"\n};\nvar DetailedStatus = {\n CONFIGURATION_COMPLETE: \"CONFIGURATION_COMPLETE\",\n VALIDATION_FAILED: \"VALIDATION_FAILED\"\n};\nvar HookStatus = {\n HOOK_COMPLETE_FAILED: \"HOOK_COMPLETE_FAILED\",\n HOOK_COMPLETE_SUCCEEDED: \"HOOK_COMPLETE_SUCCEEDED\",\n HOOK_FAILED: \"HOOK_FAILED\",\n HOOK_IN_PROGRESS: \"HOOK_IN_PROGRESS\"\n};\nvar ResourceStatus = {\n CREATE_COMPLETE: \"CREATE_COMPLETE\",\n CREATE_FAILED: \"CREATE_FAILED\",\n CREATE_IN_PROGRESS: \"CREATE_IN_PROGRESS\",\n DELETE_COMPLETE: \"DELETE_COMPLETE\",\n DELETE_FAILED: \"DELETE_FAILED\",\n DELETE_IN_PROGRESS: \"DELETE_IN_PROGRESS\",\n DELETE_SKIPPED: \"DELETE_SKIPPED\",\n EXPORT_COMPLETE: \"EXPORT_COMPLETE\",\n EXPORT_FAILED: \"EXPORT_FAILED\",\n EXPORT_IN_PROGRESS: \"EXPORT_IN_PROGRESS\",\n EXPORT_ROLLBACK_COMPLETE: \"EXPORT_ROLLBACK_COMPLETE\",\n EXPORT_ROLLBACK_FAILED: \"EXPORT_ROLLBACK_FAILED\",\n EXPORT_ROLLBACK_IN_PROGRESS: \"EXPORT_ROLLBACK_IN_PROGRESS\",\n IMPORT_COMPLETE: \"IMPORT_COMPLETE\",\n IMPORT_FAILED: \"IMPORT_FAILED\",\n IMPORT_IN_PROGRESS: \"IMPORT_IN_PROGRESS\",\n IMPORT_ROLLBACK_COMPLETE: \"IMPORT_ROLLBACK_COMPLETE\",\n IMPORT_ROLLBACK_FAILED: \"IMPORT_ROLLBACK_FAILED\",\n IMPORT_ROLLBACK_IN_PROGRESS: \"IMPORT_ROLLBACK_IN_PROGRESS\",\n ROLLBACK_COMPLETE: \"ROLLBACK_COMPLETE\",\n ROLLBACK_FAILED: \"ROLLBACK_FAILED\",\n ROLLBACK_IN_PROGRESS: \"ROLLBACK_IN_PROGRESS\",\n UPDATE_COMPLETE: \"UPDATE_COMPLETE\",\n UPDATE_FAILED: \"UPDATE_FAILED\",\n UPDATE_IN_PROGRESS: \"UPDATE_IN_PROGRESS\",\n UPDATE_ROLLBACK_COMPLETE: \"UPDATE_ROLLBACK_COMPLETE\",\n UPDATE_ROLLBACK_FAILED: \"UPDATE_ROLLBACK_FAILED\",\n UPDATE_ROLLBACK_IN_PROGRESS: \"UPDATE_ROLLBACK_IN_PROGRESS\"\n};\nvar StackInstanceDetailedStatus = {\n CANCELLED: \"CANCELLED\",\n FAILED: \"FAILED\",\n FAILED_IMPORT: \"FAILED_IMPORT\",\n INOPERABLE: \"INOPERABLE\",\n PENDING: \"PENDING\",\n RUNNING: \"RUNNING\",\n SKIPPED_SUSPENDED_ACCOUNT: \"SKIPPED_SUSPENDED_ACCOUNT\",\n SUCCEEDED: \"SUCCEEDED\"\n};\nvar StackInstanceStatus = {\n CURRENT: \"CURRENT\",\n INOPERABLE: \"INOPERABLE\",\n OUTDATED: \"OUTDATED\"\n};\nvar StackInstanceNotFoundException = class _StackInstanceNotFoundException extends CloudFormationServiceException {\n static {\n __name(this, \"StackInstanceNotFoundException\");\n }\n name = \"StackInstanceNotFoundException\";\n $fault = \"client\";\n Message;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"StackInstanceNotFoundException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _StackInstanceNotFoundException.prototype);\n this.Message = opts.Message;\n }\n};\nvar StackRefactorExecutionStatus = {\n AVAILABLE: \"AVAILABLE\",\n EXECUTE_COMPLETE: \"EXECUTE_COMPLETE\",\n EXECUTE_FAILED: \"EXECUTE_FAILED\",\n EXECUTE_IN_PROGRESS: \"EXECUTE_IN_PROGRESS\",\n OBSOLETE: \"OBSOLETE\",\n ROLLBACK_COMPLETE: \"ROLLBACK_COMPLETE\",\n ROLLBACK_FAILED: \"ROLLBACK_FAILED\",\n ROLLBACK_IN_PROGRESS: \"ROLLBACK_IN_PROGRESS\",\n UNAVAILABLE: \"UNAVAILABLE\"\n};\nvar StackRefactorStatus = {\n CREATE_COMPLETE: \"CREATE_COMPLETE\",\n CREATE_FAILED: \"CREATE_FAILED\",\n CREATE_IN_PROGRESS: \"CREATE_IN_PROGRESS\",\n DELETE_COMPLETE: \"DELETE_COMPLETE\",\n DELETE_FAILED: \"DELETE_FAILED\",\n DELETE_IN_PROGRESS: \"DELETE_IN_PROGRESS\"\n};\nvar StackRefactorNotFoundException = class _StackRefactorNotFoundException extends CloudFormationServiceException {\n static {\n __name(this, \"StackRefactorNotFoundException\");\n }\n name = \"StackRefactorNotFoundException\";\n $fault = \"client\";\n Message;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"StackRefactorNotFoundException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _StackRefactorNotFoundException.prototype);\n this.Message = opts.Message;\n }\n};\nvar StackResourceDriftStatus = {\n DELETED: \"DELETED\",\n IN_SYNC: \"IN_SYNC\",\n MODIFIED: \"MODIFIED\",\n NOT_CHECKED: \"NOT_CHECKED\"\n};\nvar DifferenceType = {\n ADD: \"ADD\",\n NOT_EQUAL: \"NOT_EQUAL\",\n REMOVE: \"REMOVE\"\n};\nvar StackStatus = {\n CREATE_COMPLETE: \"CREATE_COMPLETE\",\n CREATE_FAILED: \"CREATE_FAILED\",\n CREATE_IN_PROGRESS: \"CREATE_IN_PROGRESS\",\n DELETE_COMPLETE: \"DELETE_COMPLETE\",\n DELETE_FAILED: \"DELETE_FAILED\",\n DELETE_IN_PROGRESS: \"DELETE_IN_PROGRESS\",\n IMPORT_COMPLETE: \"IMPORT_COMPLETE\",\n IMPORT_IN_PROGRESS: \"IMPORT_IN_PROGRESS\",\n IMPORT_ROLLBACK_COMPLETE: \"IMPORT_ROLLBACK_COMPLETE\",\n IMPORT_ROLLBACK_FAILED: \"IMPORT_ROLLBACK_FAILED\",\n IMPORT_ROLLBACK_IN_PROGRESS: \"IMPORT_ROLLBACK_IN_PROGRESS\",\n REVIEW_IN_PROGRESS: \"REVIEW_IN_PROGRESS\",\n ROLLBACK_COMPLETE: \"ROLLBACK_COMPLETE\",\n ROLLBACK_FAILED: \"ROLLBACK_FAILED\",\n ROLLBACK_IN_PROGRESS: \"ROLLBACK_IN_PROGRESS\",\n UPDATE_COMPLETE: \"UPDATE_COMPLETE\",\n UPDATE_COMPLETE_CLEANUP_IN_PROGRESS: \"UPDATE_COMPLETE_CLEANUP_IN_PROGRESS\",\n UPDATE_FAILED: \"UPDATE_FAILED\",\n UPDATE_IN_PROGRESS: \"UPDATE_IN_PROGRESS\",\n UPDATE_ROLLBACK_COMPLETE: \"UPDATE_ROLLBACK_COMPLETE\",\n UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS: \"UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS\",\n UPDATE_ROLLBACK_FAILED: \"UPDATE_ROLLBACK_FAILED\",\n UPDATE_ROLLBACK_IN_PROGRESS: \"UPDATE_ROLLBACK_IN_PROGRESS\"\n};\nvar StackSetDriftDetectionStatus = {\n COMPLETED: \"COMPLETED\",\n FAILED: \"FAILED\",\n IN_PROGRESS: \"IN_PROGRESS\",\n PARTIAL_SUCCESS: \"PARTIAL_SUCCESS\",\n STOPPED: \"STOPPED\"\n};\nvar StackSetDriftStatus = {\n DRIFTED: \"DRIFTED\",\n IN_SYNC: \"IN_SYNC\",\n NOT_CHECKED: \"NOT_CHECKED\"\n};\nvar StackSetStatus = {\n ACTIVE: \"ACTIVE\",\n DELETED: \"DELETED\"\n};\nvar StackSetOperationAction = {\n CREATE: \"CREATE\",\n DELETE: \"DELETE\",\n DETECT_DRIFT: \"DETECT_DRIFT\",\n UPDATE: \"UPDATE\"\n};\nvar StackSetOperationStatus = {\n FAILED: \"FAILED\",\n QUEUED: \"QUEUED\",\n RUNNING: \"RUNNING\",\n STOPPED: \"STOPPED\",\n STOPPING: \"STOPPING\",\n SUCCEEDED: \"SUCCEEDED\"\n};\nvar DeprecatedStatus = {\n DEPRECATED: \"DEPRECATED\",\n LIVE: \"LIVE\"\n};\nvar ProvisioningType = {\n FULLY_MUTABLE: \"FULLY_MUTABLE\",\n IMMUTABLE: \"IMMUTABLE\",\n NON_PROVISIONABLE: \"NON_PROVISIONABLE\"\n};\nvar TypeTestsStatus = {\n FAILED: \"FAILED\",\n IN_PROGRESS: \"IN_PROGRESS\",\n NOT_TESTED: \"NOT_TESTED\",\n PASSED: \"PASSED\"\n};\nvar Visibility = {\n PRIVATE: \"PRIVATE\",\n PUBLIC: \"PUBLIC\"\n};\nvar RegistrationStatus = {\n COMPLETE: \"COMPLETE\",\n FAILED: \"FAILED\",\n IN_PROGRESS: \"IN_PROGRESS\"\n};\nvar TemplateFormat = {\n JSON: \"JSON\",\n YAML: \"YAML\"\n};\nvar TemplateStage = {\n Original: \"Original\",\n Processed: \"Processed\"\n};\nvar StackNotFoundException = class _StackNotFoundException extends CloudFormationServiceException {\n static {\n __name(this, \"StackNotFoundException\");\n }\n name = \"StackNotFoundException\";\n $fault = \"client\";\n Message;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"StackNotFoundException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _StackNotFoundException.prototype);\n this.Message = opts.Message;\n }\n};\nvar HookResultNotFoundException = class _HookResultNotFoundException extends CloudFormationServiceException {\n static {\n __name(this, \"HookResultNotFoundException\");\n }\n name = \"HookResultNotFoundException\";\n $fault = \"client\";\n Message;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"HookResultNotFoundException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _HookResultNotFoundException.prototype);\n this.Message = opts.Message;\n }\n};\nvar ListHookResultsTargetType = {\n CHANGE_SET: \"CHANGE_SET\",\n CLOUD_CONTROL: \"CLOUD_CONTROL\",\n RESOURCE: \"RESOURCE\",\n STACK: \"STACK\"\n};\nvar ResourceScanInProgressException = class _ResourceScanInProgressException extends CloudFormationServiceException {\n static {\n __name(this, \"ResourceScanInProgressException\");\n }\n name = \"ResourceScanInProgressException\";\n $fault = \"client\";\n Message;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"ResourceScanInProgressException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _ResourceScanInProgressException.prototype);\n this.Message = opts.Message;\n }\n};\nvar ScanType = {\n FULL: \"FULL\",\n PARTIAL: \"PARTIAL\"\n};\nvar StackInstanceFilterName = {\n DETAILED_STATUS: \"DETAILED_STATUS\",\n DRIFT_STATUS: \"DRIFT_STATUS\",\n LAST_OPERATION_ID: \"LAST_OPERATION_ID\"\n};\nvar StackRefactorActionType = {\n CREATE: \"CREATE\",\n MOVE: \"MOVE\"\n};\nvar StackRefactorDetection = {\n AUTO: \"AUTO\",\n MANUAL: \"MANUAL\"\n};\nvar StackRefactorActionEntity = {\n RESOURCE: \"RESOURCE\",\n STACK: \"STACK\"\n};\nvar OperationResultFilterName = {\n OPERATION_RESULT_STATUS: \"OPERATION_RESULT_STATUS\"\n};\nvar StackSetOperationResultStatus = {\n CANCELLED: \"CANCELLED\",\n FAILED: \"FAILED\",\n PENDING: \"PENDING\",\n RUNNING: \"RUNNING\",\n SUCCEEDED: \"SUCCEEDED\"\n};\n\n// src/models/models_1.ts\nvar InvalidStateTransitionException = class _InvalidStateTransitionException extends CloudFormationServiceException {\n static {\n __name(this, \"InvalidStateTransitionException\");\n }\n name = \"InvalidStateTransitionException\";\n $fault = \"client\";\n Message;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"InvalidStateTransitionException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _InvalidStateTransitionException.prototype);\n this.Message = opts.Message;\n }\n};\nvar OperationStatusCheckFailedException = class _OperationStatusCheckFailedException extends CloudFormationServiceException {\n static {\n __name(this, \"OperationStatusCheckFailedException\");\n }\n name = \"OperationStatusCheckFailedException\";\n $fault = \"client\";\n Message;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"OperationStatusCheckFailedException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _OperationStatusCheckFailedException.prototype);\n this.Message = opts.Message;\n }\n};\nvar OperationStatus = {\n FAILED: \"FAILED\",\n IN_PROGRESS: \"IN_PROGRESS\",\n PENDING: \"PENDING\",\n SUCCESS: \"SUCCESS\"\n};\nvar HandlerErrorCode = {\n AccessDenied: \"AccessDenied\",\n AlreadyExists: \"AlreadyExists\",\n GeneralServiceException: \"GeneralServiceException\",\n HandlerInternalFailure: \"HandlerInternalFailure\",\n InternalFailure: \"InternalFailure\",\n InvalidCredentials: \"InvalidCredentials\",\n InvalidRequest: \"InvalidRequest\",\n InvalidTypeConfiguration: \"InvalidTypeConfiguration\",\n NetworkFailure: \"NetworkFailure\",\n NonCompliant: \"NonCompliant\",\n NotFound: \"NotFound\",\n NotUpdatable: \"NotUpdatable\",\n ResourceConflict: \"ResourceConflict\",\n ServiceInternalError: \"ServiceInternalError\",\n ServiceLimitExceeded: \"ServiceLimitExceeded\",\n ServiceTimeout: \"NotStabilized\",\n Throttling: \"Throttling\",\n Unknown: \"Unknown\",\n UnsupportedTarget: \"UnsupportedTarget\"\n};\nvar ResourceSignalStatus = {\n FAILURE: \"FAILURE\",\n SUCCESS: \"SUCCESS\"\n};\nvar ResourceScanLimitExceededException = class _ResourceScanLimitExceededException extends CloudFormationServiceException {\n static {\n __name(this, \"ResourceScanLimitExceededException\");\n }\n name = \"ResourceScanLimitExceededException\";\n $fault = \"client\";\n Message;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"ResourceScanLimitExceededException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _ResourceScanLimitExceededException.prototype);\n this.Message = opts.Message;\n }\n};\n\n// src/protocols/Aws_query.ts\nvar se_ActivateOrganizationsAccessCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_ActivateOrganizationsAccessInput(input, context),\n [_A]: _AOA,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_ActivateOrganizationsAccessCommand\");\nvar se_ActivateTypeCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_ActivateTypeInput(input, context),\n [_A]: _AT,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_ActivateTypeCommand\");\nvar se_BatchDescribeTypeConfigurationsCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_BatchDescribeTypeConfigurationsInput(input, context),\n [_A]: _BDTC,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_BatchDescribeTypeConfigurationsCommand\");\nvar se_CancelUpdateStackCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_CancelUpdateStackInput(input, context),\n [_A]: _CUS,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_CancelUpdateStackCommand\");\nvar se_ContinueUpdateRollbackCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_ContinueUpdateRollbackInput(input, context),\n [_A]: _CUR,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_ContinueUpdateRollbackCommand\");\nvar se_CreateChangeSetCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_CreateChangeSetInput(input, context),\n [_A]: _CCS,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_CreateChangeSetCommand\");\nvar se_CreateGeneratedTemplateCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_CreateGeneratedTemplateInput(input, context),\n [_A]: _CGT,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_CreateGeneratedTemplateCommand\");\nvar se_CreateStackCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_CreateStackInput(input, context),\n [_A]: _CS,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_CreateStackCommand\");\nvar se_CreateStackInstancesCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_CreateStackInstancesInput(input, context),\n [_A]: _CSI,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_CreateStackInstancesCommand\");\nvar se_CreateStackRefactorCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_CreateStackRefactorInput(input, context),\n [_A]: _CSR,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_CreateStackRefactorCommand\");\nvar se_CreateStackSetCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_CreateStackSetInput(input, context),\n [_A]: _CSS,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_CreateStackSetCommand\");\nvar se_DeactivateOrganizationsAccessCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_DeactivateOrganizationsAccessInput(input, context),\n [_A]: _DOA,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DeactivateOrganizationsAccessCommand\");\nvar se_DeactivateTypeCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_DeactivateTypeInput(input, context),\n [_A]: _DT,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DeactivateTypeCommand\");\nvar se_DeleteChangeSetCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_DeleteChangeSetInput(input, context),\n [_A]: _DCS,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DeleteChangeSetCommand\");\nvar se_DeleteGeneratedTemplateCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_DeleteGeneratedTemplateInput(input, context),\n [_A]: _DGT,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DeleteGeneratedTemplateCommand\");\nvar se_DeleteStackCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_DeleteStackInput(input, context),\n [_A]: _DS,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DeleteStackCommand\");\nvar se_DeleteStackInstancesCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_DeleteStackInstancesInput(input, context),\n [_A]: _DSI,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DeleteStackInstancesCommand\");\nvar se_DeleteStackSetCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_DeleteStackSetInput(input, context),\n [_A]: _DSS,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DeleteStackSetCommand\");\nvar se_DeregisterTypeCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_DeregisterTypeInput(input, context),\n [_A]: _DTe,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DeregisterTypeCommand\");\nvar se_DescribeAccountLimitsCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_DescribeAccountLimitsInput(input, context),\n [_A]: _DAL,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DescribeAccountLimitsCommand\");\nvar se_DescribeChangeSetCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_DescribeChangeSetInput(input, context),\n [_A]: _DCSe,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DescribeChangeSetCommand\");\nvar se_DescribeChangeSetHooksCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_DescribeChangeSetHooksInput(input, context),\n [_A]: _DCSH,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DescribeChangeSetHooksCommand\");\nvar se_DescribeGeneratedTemplateCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_DescribeGeneratedTemplateInput(input, context),\n [_A]: _DGTe,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DescribeGeneratedTemplateCommand\");\nvar se_DescribeOrganizationsAccessCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_DescribeOrganizationsAccessInput(input, context),\n [_A]: _DOAe,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DescribeOrganizationsAccessCommand\");\nvar se_DescribePublisherCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_DescribePublisherInput(input, context),\n [_A]: _DP,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DescribePublisherCommand\");\nvar se_DescribeResourceScanCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_DescribeResourceScanInput(input, context),\n [_A]: _DRS,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DescribeResourceScanCommand\");\nvar se_DescribeStackDriftDetectionStatusCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_DescribeStackDriftDetectionStatusInput(input, context),\n [_A]: _DSDDS,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DescribeStackDriftDetectionStatusCommand\");\nvar se_DescribeStackEventsCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_DescribeStackEventsInput(input, context),\n [_A]: _DSE,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DescribeStackEventsCommand\");\nvar se_DescribeStackInstanceCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_DescribeStackInstanceInput(input, context),\n [_A]: _DSIe,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DescribeStackInstanceCommand\");\nvar se_DescribeStackRefactorCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_DescribeStackRefactorInput(input, context),\n [_A]: _DSR,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DescribeStackRefactorCommand\");\nvar se_DescribeStackResourceCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_DescribeStackResourceInput(input, context),\n [_A]: _DSRe,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DescribeStackResourceCommand\");\nvar se_DescribeStackResourceDriftsCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_DescribeStackResourceDriftsInput(input, context),\n [_A]: _DSRD,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DescribeStackResourceDriftsCommand\");\nvar se_DescribeStackResourcesCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_DescribeStackResourcesInput(input, context),\n [_A]: _DSRes,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DescribeStackResourcesCommand\");\nvar se_DescribeStacksCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_DescribeStacksInput(input, context),\n [_A]: _DSe,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DescribeStacksCommand\");\nvar se_DescribeStackSetCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_DescribeStackSetInput(input, context),\n [_A]: _DSSe,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DescribeStackSetCommand\");\nvar se_DescribeStackSetOperationCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_DescribeStackSetOperationInput(input, context),\n [_A]: _DSSO,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DescribeStackSetOperationCommand\");\nvar se_DescribeTypeCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_DescribeTypeInput(input, context),\n [_A]: _DTes,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DescribeTypeCommand\");\nvar se_DescribeTypeRegistrationCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_DescribeTypeRegistrationInput(input, context),\n [_A]: _DTR,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DescribeTypeRegistrationCommand\");\nvar se_DetectStackDriftCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_DetectStackDriftInput(input, context),\n [_A]: _DSD,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DetectStackDriftCommand\");\nvar se_DetectStackResourceDriftCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_DetectStackResourceDriftInput(input, context),\n [_A]: _DSRDe,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DetectStackResourceDriftCommand\");\nvar se_DetectStackSetDriftCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_DetectStackSetDriftInput(input, context),\n [_A]: _DSSD,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DetectStackSetDriftCommand\");\nvar se_EstimateTemplateCostCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_EstimateTemplateCostInput(input, context),\n [_A]: _ETC,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_EstimateTemplateCostCommand\");\nvar se_ExecuteChangeSetCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_ExecuteChangeSetInput(input, context),\n [_A]: _ECS,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_ExecuteChangeSetCommand\");\nvar se_ExecuteStackRefactorCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_ExecuteStackRefactorInput(input, context),\n [_A]: _ESR,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_ExecuteStackRefactorCommand\");\nvar se_GetGeneratedTemplateCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_GetGeneratedTemplateInput(input, context),\n [_A]: _GGT,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_GetGeneratedTemplateCommand\");\nvar se_GetStackPolicyCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_GetStackPolicyInput(input, context),\n [_A]: _GSP,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_GetStackPolicyCommand\");\nvar se_GetTemplateCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_GetTemplateInput(input, context),\n [_A]: _GT,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_GetTemplateCommand\");\nvar se_GetTemplateSummaryCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_GetTemplateSummaryInput(input, context),\n [_A]: _GTS,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_GetTemplateSummaryCommand\");\nvar se_ImportStacksToStackSetCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_ImportStacksToStackSetInput(input, context),\n [_A]: _ISTSS,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_ImportStacksToStackSetCommand\");\nvar se_ListChangeSetsCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_ListChangeSetsInput(input, context),\n [_A]: _LCS,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_ListChangeSetsCommand\");\nvar se_ListExportsCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_ListExportsInput(input, context),\n [_A]: _LE,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_ListExportsCommand\");\nvar se_ListGeneratedTemplatesCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_ListGeneratedTemplatesInput(input, context),\n [_A]: _LGT,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_ListGeneratedTemplatesCommand\");\nvar se_ListHookResultsCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_ListHookResultsInput(input, context),\n [_A]: _LHR,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_ListHookResultsCommand\");\nvar se_ListImportsCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_ListImportsInput(input, context),\n [_A]: _LI,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_ListImportsCommand\");\nvar se_ListResourceScanRelatedResourcesCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_ListResourceScanRelatedResourcesInput(input, context),\n [_A]: _LRSRR,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_ListResourceScanRelatedResourcesCommand\");\nvar se_ListResourceScanResourcesCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_ListResourceScanResourcesInput(input, context),\n [_A]: _LRSR,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_ListResourceScanResourcesCommand\");\nvar se_ListResourceScansCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_ListResourceScansInput(input, context),\n [_A]: _LRS,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_ListResourceScansCommand\");\nvar se_ListStackInstanceResourceDriftsCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_ListStackInstanceResourceDriftsInput(input, context),\n [_A]: _LSIRD,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_ListStackInstanceResourceDriftsCommand\");\nvar se_ListStackInstancesCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_ListStackInstancesInput(input, context),\n [_A]: _LSI,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_ListStackInstancesCommand\");\nvar se_ListStackRefactorActionsCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_ListStackRefactorActionsInput(input, context),\n [_A]: _LSRA,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_ListStackRefactorActionsCommand\");\nvar se_ListStackRefactorsCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_ListStackRefactorsInput(input, context),\n [_A]: _LSR,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_ListStackRefactorsCommand\");\nvar se_ListStackResourcesCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_ListStackResourcesInput(input, context),\n [_A]: _LSRi,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_ListStackResourcesCommand\");\nvar se_ListStacksCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_ListStacksInput(input, context),\n [_A]: _LS,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_ListStacksCommand\");\nvar se_ListStackSetAutoDeploymentTargetsCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_ListStackSetAutoDeploymentTargetsInput(input, context),\n [_A]: _LSSADT,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_ListStackSetAutoDeploymentTargetsCommand\");\nvar se_ListStackSetOperationResultsCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_ListStackSetOperationResultsInput(input, context),\n [_A]: _LSSOR,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_ListStackSetOperationResultsCommand\");\nvar se_ListStackSetOperationsCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_ListStackSetOperationsInput(input, context),\n [_A]: _LSSO,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_ListStackSetOperationsCommand\");\nvar se_ListStackSetsCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_ListStackSetsInput(input, context),\n [_A]: _LSS,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_ListStackSetsCommand\");\nvar se_ListTypeRegistrationsCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_ListTypeRegistrationsInput(input, context),\n [_A]: _LTR,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_ListTypeRegistrationsCommand\");\nvar se_ListTypesCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_ListTypesInput(input, context),\n [_A]: _LT,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_ListTypesCommand\");\nvar se_ListTypeVersionsCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_ListTypeVersionsInput(input, context),\n [_A]: _LTV,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_ListTypeVersionsCommand\");\nvar se_PublishTypeCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_PublishTypeInput(input, context),\n [_A]: _PT,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_PublishTypeCommand\");\nvar se_RecordHandlerProgressCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_RecordHandlerProgressInput(input, context),\n [_A]: _RHP,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_RecordHandlerProgressCommand\");\nvar se_RegisterPublisherCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_RegisterPublisherInput(input, context),\n [_A]: _RP,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_RegisterPublisherCommand\");\nvar se_RegisterTypeCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_RegisterTypeInput(input, context),\n [_A]: _RT,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_RegisterTypeCommand\");\nvar se_RollbackStackCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_RollbackStackInput(input, context),\n [_A]: _RS,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_RollbackStackCommand\");\nvar se_SetStackPolicyCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_SetStackPolicyInput(input, context),\n [_A]: _SSP,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_SetStackPolicyCommand\");\nvar se_SetTypeConfigurationCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_SetTypeConfigurationInput(input, context),\n [_A]: _STC,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_SetTypeConfigurationCommand\");\nvar se_SetTypeDefaultVersionCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_SetTypeDefaultVersionInput(input, context),\n [_A]: _STDV,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_SetTypeDefaultVersionCommand\");\nvar se_SignalResourceCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_SignalResourceInput(input, context),\n [_A]: _SR,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_SignalResourceCommand\");\nvar se_StartResourceScanCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_StartResourceScanInput(input, context),\n [_A]: _SRS,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_StartResourceScanCommand\");\nvar se_StopStackSetOperationCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_StopStackSetOperationInput(input, context),\n [_A]: _SSSO,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_StopStackSetOperationCommand\");\nvar se_TestTypeCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_TestTypeInput(input, context),\n [_A]: _TT,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_TestTypeCommand\");\nvar se_UpdateGeneratedTemplateCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_UpdateGeneratedTemplateInput(input, context),\n [_A]: _UGT,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_UpdateGeneratedTemplateCommand\");\nvar se_UpdateStackCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_UpdateStackInput(input, context),\n [_A]: _US,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_UpdateStackCommand\");\nvar se_UpdateStackInstancesCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_UpdateStackInstancesInput(input, context),\n [_A]: _USI,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_UpdateStackInstancesCommand\");\nvar se_UpdateStackSetCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_UpdateStackSetInput(input, context),\n [_A]: _USS,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_UpdateStackSetCommand\");\nvar se_UpdateTerminationProtectionCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_UpdateTerminationProtectionInput(input, context),\n [_A]: _UTP,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_UpdateTerminationProtectionCommand\");\nvar se_ValidateTemplateCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_ValidateTemplateInput(input, context),\n [_A]: _VT,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_ValidateTemplateCommand\");\nvar de_ActivateOrganizationsAccessCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_ActivateOrganizationsAccessOutput(data.ActivateOrganizationsAccessResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_ActivateOrganizationsAccessCommand\");\nvar de_ActivateTypeCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_ActivateTypeOutput(data.ActivateTypeResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_ActivateTypeCommand\");\nvar de_BatchDescribeTypeConfigurationsCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_BatchDescribeTypeConfigurationsOutput(data.BatchDescribeTypeConfigurationsResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_BatchDescribeTypeConfigurationsCommand\");\nvar de_CancelUpdateStackCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n await (0, import_smithy_client.collectBody)(output.body, context);\n const response = {\n $metadata: deserializeMetadata(output)\n };\n return response;\n}, \"de_CancelUpdateStackCommand\");\nvar de_ContinueUpdateRollbackCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_ContinueUpdateRollbackOutput(data.ContinueUpdateRollbackResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_ContinueUpdateRollbackCommand\");\nvar de_CreateChangeSetCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_CreateChangeSetOutput(data.CreateChangeSetResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_CreateChangeSetCommand\");\nvar de_CreateGeneratedTemplateCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_CreateGeneratedTemplateOutput(data.CreateGeneratedTemplateResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_CreateGeneratedTemplateCommand\");\nvar de_CreateStackCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_CreateStackOutput(data.CreateStackResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_CreateStackCommand\");\nvar de_CreateStackInstancesCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_CreateStackInstancesOutput(data.CreateStackInstancesResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_CreateStackInstancesCommand\");\nvar de_CreateStackRefactorCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_CreateStackRefactorOutput(data.CreateStackRefactorResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_CreateStackRefactorCommand\");\nvar de_CreateStackSetCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_CreateStackSetOutput(data.CreateStackSetResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_CreateStackSetCommand\");\nvar de_DeactivateOrganizationsAccessCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_DeactivateOrganizationsAccessOutput(data.DeactivateOrganizationsAccessResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_DeactivateOrganizationsAccessCommand\");\nvar de_DeactivateTypeCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_DeactivateTypeOutput(data.DeactivateTypeResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_DeactivateTypeCommand\");\nvar de_DeleteChangeSetCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_DeleteChangeSetOutput(data.DeleteChangeSetResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_DeleteChangeSetCommand\");\nvar de_DeleteGeneratedTemplateCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n await (0, import_smithy_client.collectBody)(output.body, context);\n const response = {\n $metadata: deserializeMetadata(output)\n };\n return response;\n}, \"de_DeleteGeneratedTemplateCommand\");\nvar de_DeleteStackCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n await (0, import_smithy_client.collectBody)(output.body, context);\n const response = {\n $metadata: deserializeMetadata(output)\n };\n return response;\n}, \"de_DeleteStackCommand\");\nvar de_DeleteStackInstancesCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_DeleteStackInstancesOutput(data.DeleteStackInstancesResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_DeleteStackInstancesCommand\");\nvar de_DeleteStackSetCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_DeleteStackSetOutput(data.DeleteStackSetResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_DeleteStackSetCommand\");\nvar de_DeregisterTypeCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_DeregisterTypeOutput(data.DeregisterTypeResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_DeregisterTypeCommand\");\nvar de_DescribeAccountLimitsCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_DescribeAccountLimitsOutput(data.DescribeAccountLimitsResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_DescribeAccountLimitsCommand\");\nvar de_DescribeChangeSetCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_DescribeChangeSetOutput(data.DescribeChangeSetResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_DescribeChangeSetCommand\");\nvar de_DescribeChangeSetHooksCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_DescribeChangeSetHooksOutput(data.DescribeChangeSetHooksResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_DescribeChangeSetHooksCommand\");\nvar de_DescribeGeneratedTemplateCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_DescribeGeneratedTemplateOutput(data.DescribeGeneratedTemplateResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_DescribeGeneratedTemplateCommand\");\nvar de_DescribeOrganizationsAccessCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_DescribeOrganizationsAccessOutput(data.DescribeOrganizationsAccessResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_DescribeOrganizationsAccessCommand\");\nvar de_DescribePublisherCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_DescribePublisherOutput(data.DescribePublisherResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_DescribePublisherCommand\");\nvar de_DescribeResourceScanCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_DescribeResourceScanOutput(data.DescribeResourceScanResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_DescribeResourceScanCommand\");\nvar de_DescribeStackDriftDetectionStatusCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_DescribeStackDriftDetectionStatusOutput(data.DescribeStackDriftDetectionStatusResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_DescribeStackDriftDetectionStatusCommand\");\nvar de_DescribeStackEventsCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_DescribeStackEventsOutput(data.DescribeStackEventsResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_DescribeStackEventsCommand\");\nvar de_DescribeStackInstanceCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_DescribeStackInstanceOutput(data.DescribeStackInstanceResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_DescribeStackInstanceCommand\");\nvar de_DescribeStackRefactorCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_DescribeStackRefactorOutput(data.DescribeStackRefactorResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_DescribeStackRefactorCommand\");\nvar de_DescribeStackResourceCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_DescribeStackResourceOutput(data.DescribeStackResourceResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_DescribeStackResourceCommand\");\nvar de_DescribeStackResourceDriftsCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_DescribeStackResourceDriftsOutput(data.DescribeStackResourceDriftsResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_DescribeStackResourceDriftsCommand\");\nvar de_DescribeStackResourcesCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_DescribeStackResourcesOutput(data.DescribeStackResourcesResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_DescribeStackResourcesCommand\");\nvar de_DescribeStacksCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_DescribeStacksOutput(data.DescribeStacksResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_DescribeStacksCommand\");\nvar de_DescribeStackSetCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_DescribeStackSetOutput(data.DescribeStackSetResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_DescribeStackSetCommand\");\nvar de_DescribeStackSetOperationCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_DescribeStackSetOperationOutput(data.DescribeStackSetOperationResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_DescribeStackSetOperationCommand\");\nvar de_DescribeTypeCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_DescribeTypeOutput(data.DescribeTypeResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_DescribeTypeCommand\");\nvar de_DescribeTypeRegistrationCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_DescribeTypeRegistrationOutput(data.DescribeTypeRegistrationResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_DescribeTypeRegistrationCommand\");\nvar de_DetectStackDriftCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_DetectStackDriftOutput(data.DetectStackDriftResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_DetectStackDriftCommand\");\nvar de_DetectStackResourceDriftCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_DetectStackResourceDriftOutput(data.DetectStackResourceDriftResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_DetectStackResourceDriftCommand\");\nvar de_DetectStackSetDriftCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_DetectStackSetDriftOutput(data.DetectStackSetDriftResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_DetectStackSetDriftCommand\");\nvar de_EstimateTemplateCostCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_EstimateTemplateCostOutput(data.EstimateTemplateCostResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_EstimateTemplateCostCommand\");\nvar de_ExecuteChangeSetCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_ExecuteChangeSetOutput(data.ExecuteChangeSetResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_ExecuteChangeSetCommand\");\nvar de_ExecuteStackRefactorCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n await (0, import_smithy_client.collectBody)(output.body, context);\n const response = {\n $metadata: deserializeMetadata(output)\n };\n return response;\n}, \"de_ExecuteStackRefactorCommand\");\nvar de_GetGeneratedTemplateCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_GetGeneratedTemplateOutput(data.GetGeneratedTemplateResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_GetGeneratedTemplateCommand\");\nvar de_GetStackPolicyCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_GetStackPolicyOutput(data.GetStackPolicyResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_GetStackPolicyCommand\");\nvar de_GetTemplateCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_GetTemplateOutput(data.GetTemplateResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_GetTemplateCommand\");\nvar de_GetTemplateSummaryCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_GetTemplateSummaryOutput(data.GetTemplateSummaryResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_GetTemplateSummaryCommand\");\nvar de_ImportStacksToStackSetCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_ImportStacksToStackSetOutput(data.ImportStacksToStackSetResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_ImportStacksToStackSetCommand\");\nvar de_ListChangeSetsCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_ListChangeSetsOutput(data.ListChangeSetsResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_ListChangeSetsCommand\");\nvar de_ListExportsCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_ListExportsOutput(data.ListExportsResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_ListExportsCommand\");\nvar de_ListGeneratedTemplatesCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_ListGeneratedTemplatesOutput(data.ListGeneratedTemplatesResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_ListGeneratedTemplatesCommand\");\nvar de_ListHookResultsCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_ListHookResultsOutput(data.ListHookResultsResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_ListHookResultsCommand\");\nvar de_ListImportsCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_ListImportsOutput(data.ListImportsResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_ListImportsCommand\");\nvar de_ListResourceScanRelatedResourcesCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_ListResourceScanRelatedResourcesOutput(data.ListResourceScanRelatedResourcesResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_ListResourceScanRelatedResourcesCommand\");\nvar de_ListResourceScanResourcesCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_ListResourceScanResourcesOutput(data.ListResourceScanResourcesResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_ListResourceScanResourcesCommand\");\nvar de_ListResourceScansCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_ListResourceScansOutput(data.ListResourceScansResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_ListResourceScansCommand\");\nvar de_ListStackInstanceResourceDriftsCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_ListStackInstanceResourceDriftsOutput(data.ListStackInstanceResourceDriftsResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_ListStackInstanceResourceDriftsCommand\");\nvar de_ListStackInstancesCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_ListStackInstancesOutput(data.ListStackInstancesResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_ListStackInstancesCommand\");\nvar de_ListStackRefactorActionsCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_ListStackRefactorActionsOutput(data.ListStackRefactorActionsResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_ListStackRefactorActionsCommand\");\nvar de_ListStackRefactorsCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_ListStackRefactorsOutput(data.ListStackRefactorsResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_ListStackRefactorsCommand\");\nvar de_ListStackResourcesCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_ListStackResourcesOutput(data.ListStackResourcesResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_ListStackResourcesCommand\");\nvar de_ListStacksCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_ListStacksOutput(data.ListStacksResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_ListStacksCommand\");\nvar de_ListStackSetAutoDeploymentTargetsCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_ListStackSetAutoDeploymentTargetsOutput(data.ListStackSetAutoDeploymentTargetsResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_ListStackSetAutoDeploymentTargetsCommand\");\nvar de_ListStackSetOperationResultsCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_ListStackSetOperationResultsOutput(data.ListStackSetOperationResultsResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_ListStackSetOperationResultsCommand\");\nvar de_ListStackSetOperationsCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_ListStackSetOperationsOutput(data.ListStackSetOperationsResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_ListStackSetOperationsCommand\");\nvar de_ListStackSetsCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_ListStackSetsOutput(data.ListStackSetsResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_ListStackSetsCommand\");\nvar de_ListTypeRegistrationsCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_ListTypeRegistrationsOutput(data.ListTypeRegistrationsResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_ListTypeRegistrationsCommand\");\nvar de_ListTypesCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_ListTypesOutput(data.ListTypesResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_ListTypesCommand\");\nvar de_ListTypeVersionsCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_ListTypeVersionsOutput(data.ListTypeVersionsResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_ListTypeVersionsCommand\");\nvar de_PublishTypeCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_PublishTypeOutput(data.PublishTypeResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_PublishTypeCommand\");\nvar de_RecordHandlerProgressCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_RecordHandlerProgressOutput(data.RecordHandlerProgressResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_RecordHandlerProgressCommand\");\nvar de_RegisterPublisherCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_RegisterPublisherOutput(data.RegisterPublisherResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_RegisterPublisherCommand\");\nvar de_RegisterTypeCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_RegisterTypeOutput(data.RegisterTypeResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_RegisterTypeCommand\");\nvar de_RollbackStackCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_RollbackStackOutput(data.RollbackStackResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_RollbackStackCommand\");\nvar de_SetStackPolicyCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n await (0, import_smithy_client.collectBody)(output.body, context);\n const response = {\n $metadata: deserializeMetadata(output)\n };\n return response;\n}, \"de_SetStackPolicyCommand\");\nvar de_SetTypeConfigurationCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_SetTypeConfigurationOutput(data.SetTypeConfigurationResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_SetTypeConfigurationCommand\");\nvar de_SetTypeDefaultVersionCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_SetTypeDefaultVersionOutput(data.SetTypeDefaultVersionResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_SetTypeDefaultVersionCommand\");\nvar de_SignalResourceCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n await (0, import_smithy_client.collectBody)(output.body, context);\n const response = {\n $metadata: deserializeMetadata(output)\n };\n return response;\n}, \"de_SignalResourceCommand\");\nvar de_StartResourceScanCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_StartResourceScanOutput(data.StartResourceScanResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_StartResourceScanCommand\");\nvar de_StopStackSetOperationCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_StopStackSetOperationOutput(data.StopStackSetOperationResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_StopStackSetOperationCommand\");\nvar de_TestTypeCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_TestTypeOutput(data.TestTypeResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_TestTypeCommand\");\nvar de_UpdateGeneratedTemplateCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_UpdateGeneratedTemplateOutput(data.UpdateGeneratedTemplateResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_UpdateGeneratedTemplateCommand\");\nvar de_UpdateStackCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_UpdateStackOutput(data.UpdateStackResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_UpdateStackCommand\");\nvar de_UpdateStackInstancesCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_UpdateStackInstancesOutput(data.UpdateStackInstancesResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_UpdateStackInstancesCommand\");\nvar de_UpdateStackSetCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_UpdateStackSetOutput(data.UpdateStackSetResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_UpdateStackSetCommand\");\nvar de_UpdateTerminationProtectionCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_UpdateTerminationProtectionOutput(data.UpdateTerminationProtectionResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_UpdateTerminationProtectionCommand\");\nvar de_ValidateTemplateCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_ValidateTemplateOutput(data.ValidateTemplateResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_ValidateTemplateCommand\");\nvar de_CommandError = /* @__PURE__ */ __name(async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await (0, import_core2.parseXmlErrorBody)(output.body, context)\n };\n const errorCode = loadQueryErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"InvalidOperationException\":\n case \"com.amazonaws.cloudformation#InvalidOperationException\":\n throw await de_InvalidOperationExceptionRes(parsedOutput, context);\n case \"OperationNotFoundException\":\n case \"com.amazonaws.cloudformation#OperationNotFoundException\":\n throw await de_OperationNotFoundExceptionRes(parsedOutput, context);\n case \"CFNRegistryException\":\n case \"com.amazonaws.cloudformation#CFNRegistryException\":\n throw await de_CFNRegistryExceptionRes(parsedOutput, context);\n case \"TypeNotFoundException\":\n case \"com.amazonaws.cloudformation#TypeNotFoundException\":\n throw await de_TypeNotFoundExceptionRes(parsedOutput, context);\n case \"TypeConfigurationNotFoundException\":\n case \"com.amazonaws.cloudformation#TypeConfigurationNotFoundException\":\n throw await de_TypeConfigurationNotFoundExceptionRes(parsedOutput, context);\n case \"TokenAlreadyExistsException\":\n case \"com.amazonaws.cloudformation#TokenAlreadyExistsException\":\n throw await de_TokenAlreadyExistsExceptionRes(parsedOutput, context);\n case \"AlreadyExistsException\":\n case \"com.amazonaws.cloudformation#AlreadyExistsException\":\n throw await de_AlreadyExistsExceptionRes(parsedOutput, context);\n case \"InsufficientCapabilitiesException\":\n case \"com.amazonaws.cloudformation#InsufficientCapabilitiesException\":\n throw await de_InsufficientCapabilitiesExceptionRes(parsedOutput, context);\n case \"LimitExceededException\":\n case \"com.amazonaws.cloudformation#LimitExceededException\":\n throw await de_LimitExceededExceptionRes(parsedOutput, context);\n case \"ConcurrentResourcesLimitExceeded\":\n case \"com.amazonaws.cloudformation#ConcurrentResourcesLimitExceededException\":\n throw await de_ConcurrentResourcesLimitExceededExceptionRes(parsedOutput, context);\n case \"OperationIdAlreadyExistsException\":\n case \"com.amazonaws.cloudformation#OperationIdAlreadyExistsException\":\n throw await de_OperationIdAlreadyExistsExceptionRes(parsedOutput, context);\n case \"OperationInProgressException\":\n case \"com.amazonaws.cloudformation#OperationInProgressException\":\n throw await de_OperationInProgressExceptionRes(parsedOutput, context);\n case \"StackSetNotFoundException\":\n case \"com.amazonaws.cloudformation#StackSetNotFoundException\":\n throw await de_StackSetNotFoundExceptionRes(parsedOutput, context);\n case \"StaleRequestException\":\n case \"com.amazonaws.cloudformation#StaleRequestException\":\n throw await de_StaleRequestExceptionRes(parsedOutput, context);\n case \"CreatedButModifiedException\":\n case \"com.amazonaws.cloudformation#CreatedButModifiedException\":\n throw await de_CreatedButModifiedExceptionRes(parsedOutput, context);\n case \"NameAlreadyExistsException\":\n case \"com.amazonaws.cloudformation#NameAlreadyExistsException\":\n throw await de_NameAlreadyExistsExceptionRes(parsedOutput, context);\n case \"InvalidChangeSetStatus\":\n case \"com.amazonaws.cloudformation#InvalidChangeSetStatusException\":\n throw await de_InvalidChangeSetStatusExceptionRes(parsedOutput, context);\n case \"GeneratedTemplateNotFound\":\n case \"com.amazonaws.cloudformation#GeneratedTemplateNotFoundException\":\n throw await de_GeneratedTemplateNotFoundExceptionRes(parsedOutput, context);\n case \"StackSetNotEmptyException\":\n case \"com.amazonaws.cloudformation#StackSetNotEmptyException\":\n throw await de_StackSetNotEmptyExceptionRes(parsedOutput, context);\n case \"ChangeSetNotFound\":\n case \"com.amazonaws.cloudformation#ChangeSetNotFoundException\":\n throw await de_ChangeSetNotFoundExceptionRes(parsedOutput, context);\n case \"ResourceScanNotFound\":\n case \"com.amazonaws.cloudformation#ResourceScanNotFoundException\":\n throw await de_ResourceScanNotFoundExceptionRes(parsedOutput, context);\n case \"StackInstanceNotFoundException\":\n case \"com.amazonaws.cloudformation#StackInstanceNotFoundException\":\n throw await de_StackInstanceNotFoundExceptionRes(parsedOutput, context);\n case \"StackRefactorNotFoundException\":\n case \"com.amazonaws.cloudformation#StackRefactorNotFoundException\":\n throw await de_StackRefactorNotFoundExceptionRes(parsedOutput, context);\n case \"StackNotFoundException\":\n case \"com.amazonaws.cloudformation#StackNotFoundException\":\n throw await de_StackNotFoundExceptionRes(parsedOutput, context);\n case \"HookResultNotFound\":\n case \"com.amazonaws.cloudformation#HookResultNotFoundException\":\n throw await de_HookResultNotFoundExceptionRes(parsedOutput, context);\n case \"ResourceScanInProgress\":\n case \"com.amazonaws.cloudformation#ResourceScanInProgressException\":\n throw await de_ResourceScanInProgressExceptionRes(parsedOutput, context);\n case \"ConditionalCheckFailed\":\n case \"com.amazonaws.cloudformation#OperationStatusCheckFailedException\":\n throw await de_OperationStatusCheckFailedExceptionRes(parsedOutput, context);\n case \"InvalidStateTransition\":\n case \"com.amazonaws.cloudformation#InvalidStateTransitionException\":\n throw await de_InvalidStateTransitionExceptionRes(parsedOutput, context);\n case \"ResourceScanLimitExceeded\":\n case \"com.amazonaws.cloudformation#ResourceScanLimitExceededException\":\n throw await de_ResourceScanLimitExceededExceptionRes(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n return throwDefaultError({\n output,\n parsedBody: parsedBody.Error,\n errorCode\n });\n }\n}, \"de_CommandError\");\nvar de_AlreadyExistsExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_AlreadyExistsException(body.Error, context);\n const exception = new AlreadyExistsException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_AlreadyExistsExceptionRes\");\nvar de_CFNRegistryExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_CFNRegistryException(body.Error, context);\n const exception = new CFNRegistryException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_CFNRegistryExceptionRes\");\nvar de_ChangeSetNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_ChangeSetNotFoundException(body.Error, context);\n const exception = new ChangeSetNotFoundException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_ChangeSetNotFoundExceptionRes\");\nvar de_ConcurrentResourcesLimitExceededExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_ConcurrentResourcesLimitExceededException(body.Error, context);\n const exception = new ConcurrentResourcesLimitExceededException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_ConcurrentResourcesLimitExceededExceptionRes\");\nvar de_CreatedButModifiedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_CreatedButModifiedException(body.Error, context);\n const exception = new CreatedButModifiedException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_CreatedButModifiedExceptionRes\");\nvar de_GeneratedTemplateNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_GeneratedTemplateNotFoundException(body.Error, context);\n const exception = new GeneratedTemplateNotFoundException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_GeneratedTemplateNotFoundExceptionRes\");\nvar de_HookResultNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_HookResultNotFoundException(body.Error, context);\n const exception = new HookResultNotFoundException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_HookResultNotFoundExceptionRes\");\nvar de_InsufficientCapabilitiesExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_InsufficientCapabilitiesException(body.Error, context);\n const exception = new InsufficientCapabilitiesException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_InsufficientCapabilitiesExceptionRes\");\nvar de_InvalidChangeSetStatusExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_InvalidChangeSetStatusException(body.Error, context);\n const exception = new InvalidChangeSetStatusException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_InvalidChangeSetStatusExceptionRes\");\nvar de_InvalidOperationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_InvalidOperationException(body.Error, context);\n const exception = new InvalidOperationException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_InvalidOperationExceptionRes\");\nvar de_InvalidStateTransitionExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_InvalidStateTransitionException(body.Error, context);\n const exception = new InvalidStateTransitionException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_InvalidStateTransitionExceptionRes\");\nvar de_LimitExceededExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_LimitExceededException(body.Error, context);\n const exception = new LimitExceededException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_LimitExceededExceptionRes\");\nvar de_NameAlreadyExistsExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_NameAlreadyExistsException(body.Error, context);\n const exception = new NameAlreadyExistsException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_NameAlreadyExistsExceptionRes\");\nvar de_OperationIdAlreadyExistsExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_OperationIdAlreadyExistsException(body.Error, context);\n const exception = new OperationIdAlreadyExistsException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_OperationIdAlreadyExistsExceptionRes\");\nvar de_OperationInProgressExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_OperationInProgressException(body.Error, context);\n const exception = new OperationInProgressException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_OperationInProgressExceptionRes\");\nvar de_OperationNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_OperationNotFoundException(body.Error, context);\n const exception = new OperationNotFoundException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_OperationNotFoundExceptionRes\");\nvar de_OperationStatusCheckFailedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_OperationStatusCheckFailedException(body.Error, context);\n const exception = new OperationStatusCheckFailedException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_OperationStatusCheckFailedExceptionRes\");\nvar de_ResourceScanInProgressExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_ResourceScanInProgressException(body.Error, context);\n const exception = new ResourceScanInProgressException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_ResourceScanInProgressExceptionRes\");\nvar de_ResourceScanLimitExceededExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_ResourceScanLimitExceededException(body.Error, context);\n const exception = new ResourceScanLimitExceededException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_ResourceScanLimitExceededExceptionRes\");\nvar de_ResourceScanNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_ResourceScanNotFoundException(body.Error, context);\n const exception = new ResourceScanNotFoundException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_ResourceScanNotFoundExceptionRes\");\nvar de_StackInstanceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_StackInstanceNotFoundException(body.Error, context);\n const exception = new StackInstanceNotFoundException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_StackInstanceNotFoundExceptionRes\");\nvar de_StackNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_StackNotFoundException(body.Error, context);\n const exception = new StackNotFoundException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_StackNotFoundExceptionRes\");\nvar de_StackRefactorNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_StackRefactorNotFoundException(body.Error, context);\n const exception = new StackRefactorNotFoundException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_StackRefactorNotFoundExceptionRes\");\nvar de_StackSetNotEmptyExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_StackSetNotEmptyException(body.Error, context);\n const exception = new StackSetNotEmptyException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_StackSetNotEmptyExceptionRes\");\nvar de_StackSetNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_StackSetNotFoundException(body.Error, context);\n const exception = new StackSetNotFoundException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_StackSetNotFoundExceptionRes\");\nvar de_StaleRequestExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_StaleRequestException(body.Error, context);\n const exception = new StaleRequestException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_StaleRequestExceptionRes\");\nvar de_TokenAlreadyExistsExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_TokenAlreadyExistsException(body.Error, context);\n const exception = new TokenAlreadyExistsException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_TokenAlreadyExistsExceptionRes\");\nvar de_TypeConfigurationNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_TypeConfigurationNotFoundException(body.Error, context);\n const exception = new TypeConfigurationNotFoundException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_TypeConfigurationNotFoundExceptionRes\");\nvar de_TypeNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_TypeNotFoundException(body.Error, context);\n const exception = new TypeNotFoundException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_TypeNotFoundExceptionRes\");\nvar se_AccountList = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n entries[`member.${counter}`] = entry;\n counter++;\n }\n return entries;\n}, \"se_AccountList\");\nvar se_ActivateOrganizationsAccessInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n return entries;\n}, \"se_ActivateOrganizationsAccessInput\");\nvar se_ActivateTypeInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_T] != null) {\n entries[_T] = input[_T];\n }\n if (input[_PTA] != null) {\n entries[_PTA] = input[_PTA];\n }\n if (input[_PI] != null) {\n entries[_PI] = input[_PI];\n }\n if (input[_TN] != null) {\n entries[_TN] = input[_TN];\n }\n if (input[_TNA] != null) {\n entries[_TNA] = input[_TNA];\n }\n if (input[_AU] != null) {\n entries[_AU] = input[_AU];\n }\n if (input[_LC] != null) {\n const memberEntries = se_LoggingConfig(input[_LC], context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `LoggingConfig.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_ERA] != null) {\n entries[_ERA] = input[_ERA];\n }\n if (input[_VB] != null) {\n entries[_VB] = input[_VB];\n }\n if (input[_MV] != null) {\n entries[_MV] = input[_MV];\n }\n return entries;\n}, \"se_ActivateTypeInput\");\nvar se_AutoDeployment = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_E] != null) {\n entries[_E] = input[_E];\n }\n if (input[_RSOAR] != null) {\n entries[_RSOAR] = input[_RSOAR];\n }\n return entries;\n}, \"se_AutoDeployment\");\nvar se_BatchDescribeTypeConfigurationsInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_TCI] != null) {\n const memberEntries = se_TypeConfigurationIdentifiers(input[_TCI], context);\n if (input[_TCI]?.length === 0) {\n entries.TypeConfigurationIdentifiers = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `TypeConfigurationIdentifiers.${key}`;\n entries[loc] = value;\n });\n }\n return entries;\n}, \"se_BatchDescribeTypeConfigurationsInput\");\nvar se_CancelUpdateStackInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SN] != null) {\n entries[_SN] = input[_SN];\n }\n if (input[_CRT] != null) {\n entries[_CRT] = input[_CRT];\n }\n return entries;\n}, \"se_CancelUpdateStackInput\");\nvar se_Capabilities = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n entries[`member.${counter}`] = entry;\n counter++;\n }\n return entries;\n}, \"se_Capabilities\");\nvar se_ContinueUpdateRollbackInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SN] != null) {\n entries[_SN] = input[_SN];\n }\n if (input[_RARN] != null) {\n entries[_RARN] = input[_RARN];\n }\n if (input[_RTS] != null) {\n const memberEntries = se_ResourcesToSkip(input[_RTS], context);\n if (input[_RTS]?.length === 0) {\n entries.ResourcesToSkip = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `ResourcesToSkip.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_CRT] != null) {\n entries[_CRT] = input[_CRT];\n }\n return entries;\n}, \"se_ContinueUpdateRollbackInput\");\nvar se_CreateChangeSetInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SN] != null) {\n entries[_SN] = input[_SN];\n }\n if (input[_TB] != null) {\n entries[_TB] = input[_TB];\n }\n if (input[_TURL] != null) {\n entries[_TURL] = input[_TURL];\n }\n if (input[_UPT] != null) {\n entries[_UPT] = input[_UPT];\n }\n if (input[_P] != null) {\n const memberEntries = se_Parameters(input[_P], context);\n if (input[_P]?.length === 0) {\n entries.Parameters = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Parameters.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_C] != null) {\n const memberEntries = se_Capabilities(input[_C], context);\n if (input[_C]?.length === 0) {\n entries.Capabilities = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Capabilities.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_RTe] != null) {\n const memberEntries = se_ResourceTypes(input[_RTe], context);\n if (input[_RTe]?.length === 0) {\n entries.ResourceTypes = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `ResourceTypes.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_RARN] != null) {\n entries[_RARN] = input[_RARN];\n }\n if (input[_RC] != null) {\n const memberEntries = se_RollbackConfiguration(input[_RC], context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `RollbackConfiguration.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_NARN] != null) {\n const memberEntries = se_NotificationARNs(input[_NARN], context);\n if (input[_NARN]?.length === 0) {\n entries.NotificationARNs = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `NotificationARNs.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_Ta] != null) {\n const memberEntries = se_Tags(input[_Ta], context);\n if (input[_Ta]?.length === 0) {\n entries.Tags = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Tags.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_CSN] != null) {\n entries[_CSN] = input[_CSN];\n }\n if (input[_CT] != null) {\n entries[_CT] = input[_CT];\n }\n if (input[_D] != null) {\n entries[_D] = input[_D];\n }\n if (input[_CST] != null) {\n entries[_CST] = input[_CST];\n }\n if (input[_RTI] != null) {\n const memberEntries = se_ResourcesToImport(input[_RTI], context);\n if (input[_RTI]?.length === 0) {\n entries.ResourcesToImport = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `ResourcesToImport.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_INS] != null) {\n entries[_INS] = input[_INS];\n }\n if (input[_OSF] != null) {\n entries[_OSF] = input[_OSF];\n }\n if (input[_IER] != null) {\n entries[_IER] = input[_IER];\n }\n return entries;\n}, \"se_CreateChangeSetInput\");\nvar se_CreateGeneratedTemplateInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_R] != null) {\n const memberEntries = se_ResourceDefinitions(input[_R], context);\n if (input[_R]?.length === 0) {\n entries.Resources = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Resources.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_GTN] != null) {\n entries[_GTN] = input[_GTN];\n }\n if (input[_SN] != null) {\n entries[_SN] = input[_SN];\n }\n if (input[_TC] != null) {\n const memberEntries = se_TemplateConfiguration(input[_TC], context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `TemplateConfiguration.${key}`;\n entries[loc] = value;\n });\n }\n return entries;\n}, \"se_CreateGeneratedTemplateInput\");\nvar se_CreateStackInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SN] != null) {\n entries[_SN] = input[_SN];\n }\n if (input[_TB] != null) {\n entries[_TB] = input[_TB];\n }\n if (input[_TURL] != null) {\n entries[_TURL] = input[_TURL];\n }\n if (input[_P] != null) {\n const memberEntries = se_Parameters(input[_P], context);\n if (input[_P]?.length === 0) {\n entries.Parameters = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Parameters.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_DR] != null) {\n entries[_DR] = input[_DR];\n }\n if (input[_RC] != null) {\n const memberEntries = se_RollbackConfiguration(input[_RC], context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `RollbackConfiguration.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_TIM] != null) {\n entries[_TIM] = input[_TIM];\n }\n if (input[_NARN] != null) {\n const memberEntries = se_NotificationARNs(input[_NARN], context);\n if (input[_NARN]?.length === 0) {\n entries.NotificationARNs = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `NotificationARNs.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_C] != null) {\n const memberEntries = se_Capabilities(input[_C], context);\n if (input[_C]?.length === 0) {\n entries.Capabilities = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Capabilities.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_RTe] != null) {\n const memberEntries = se_ResourceTypes(input[_RTe], context);\n if (input[_RTe]?.length === 0) {\n entries.ResourceTypes = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `ResourceTypes.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_RARN] != null) {\n entries[_RARN] = input[_RARN];\n }\n if (input[_OF] != null) {\n entries[_OF] = input[_OF];\n }\n if (input[_SPB] != null) {\n entries[_SPB] = input[_SPB];\n }\n if (input[_SPURL] != null) {\n entries[_SPURL] = input[_SPURL];\n }\n if (input[_Ta] != null) {\n const memberEntries = se_Tags(input[_Ta], context);\n if (input[_Ta]?.length === 0) {\n entries.Tags = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Tags.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_CRT] != null) {\n entries[_CRT] = input[_CRT];\n }\n if (input[_ETP] != null) {\n entries[_ETP] = input[_ETP];\n }\n if (input[_REOC] != null) {\n entries[_REOC] = input[_REOC];\n }\n return entries;\n}, \"se_CreateStackInput\");\nvar se_CreateStackInstancesInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SSN] != null) {\n entries[_SSN] = input[_SSN];\n }\n if (input[_Ac] != null) {\n const memberEntries = se_AccountList(input[_Ac], context);\n if (input[_Ac]?.length === 0) {\n entries.Accounts = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Accounts.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_DTep] != null) {\n const memberEntries = se_DeploymentTargets(input[_DTep], context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `DeploymentTargets.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_Re] != null) {\n const memberEntries = se_RegionList(input[_Re], context);\n if (input[_Re]?.length === 0) {\n entries.Regions = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Regions.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_PO] != null) {\n const memberEntries = se_Parameters(input[_PO], context);\n if (input[_PO]?.length === 0) {\n entries.ParameterOverrides = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `ParameterOverrides.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_OP] != null) {\n const memberEntries = se_StackSetOperationPreferences(input[_OP], context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `OperationPreferences.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_OI] === void 0) {\n input[_OI] = (0, import_uuid.v4)();\n }\n if (input[_OI] != null) {\n entries[_OI] = input[_OI];\n }\n if (input[_CA] != null) {\n entries[_CA] = input[_CA];\n }\n return entries;\n}, \"se_CreateStackInstancesInput\");\nvar se_CreateStackRefactorInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_D] != null) {\n entries[_D] = input[_D];\n }\n if (input[_ESC] != null) {\n entries[_ESC] = input[_ESC];\n }\n if (input[_RM] != null) {\n const memberEntries = se_ResourceMappings(input[_RM], context);\n if (input[_RM]?.length === 0) {\n entries.ResourceMappings = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `ResourceMappings.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_SD] != null) {\n const memberEntries = se_StackDefinitions(input[_SD], context);\n if (input[_SD]?.length === 0) {\n entries.StackDefinitions = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `StackDefinitions.${key}`;\n entries[loc] = value;\n });\n }\n return entries;\n}, \"se_CreateStackRefactorInput\");\nvar se_CreateStackSetInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SSN] != null) {\n entries[_SSN] = input[_SSN];\n }\n if (input[_D] != null) {\n entries[_D] = input[_D];\n }\n if (input[_TB] != null) {\n entries[_TB] = input[_TB];\n }\n if (input[_TURL] != null) {\n entries[_TURL] = input[_TURL];\n }\n if (input[_SI] != null) {\n entries[_SI] = input[_SI];\n }\n if (input[_P] != null) {\n const memberEntries = se_Parameters(input[_P], context);\n if (input[_P]?.length === 0) {\n entries.Parameters = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Parameters.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_C] != null) {\n const memberEntries = se_Capabilities(input[_C], context);\n if (input[_C]?.length === 0) {\n entries.Capabilities = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Capabilities.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_Ta] != null) {\n const memberEntries = se_Tags(input[_Ta], context);\n if (input[_Ta]?.length === 0) {\n entries.Tags = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Tags.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_ARARN] != null) {\n entries[_ARARN] = input[_ARARN];\n }\n if (input[_ERN] != null) {\n entries[_ERN] = input[_ERN];\n }\n if (input[_PM] != null) {\n entries[_PM] = input[_PM];\n }\n if (input[_AD] != null) {\n const memberEntries = se_AutoDeployment(input[_AD], context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `AutoDeployment.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_CA] != null) {\n entries[_CA] = input[_CA];\n }\n if (input[_CRT] === void 0) {\n input[_CRT] = (0, import_uuid.v4)();\n }\n if (input[_CRT] != null) {\n entries[_CRT] = input[_CRT];\n }\n if (input[_ME] != null) {\n const memberEntries = se_ManagedExecution(input[_ME], context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `ManagedExecution.${key}`;\n entries[loc] = value;\n });\n }\n return entries;\n}, \"se_CreateStackSetInput\");\nvar se_DeactivateOrganizationsAccessInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n return entries;\n}, \"se_DeactivateOrganizationsAccessInput\");\nvar se_DeactivateTypeInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_TN] != null) {\n entries[_TN] = input[_TN];\n }\n if (input[_T] != null) {\n entries[_T] = input[_T];\n }\n if (input[_Ar] != null) {\n entries[_Ar] = input[_Ar];\n }\n return entries;\n}, \"se_DeactivateTypeInput\");\nvar se_DeleteChangeSetInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_CSN] != null) {\n entries[_CSN] = input[_CSN];\n }\n if (input[_SN] != null) {\n entries[_SN] = input[_SN];\n }\n return entries;\n}, \"se_DeleteChangeSetInput\");\nvar se_DeleteGeneratedTemplateInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_GTN] != null) {\n entries[_GTN] = input[_GTN];\n }\n return entries;\n}, \"se_DeleteGeneratedTemplateInput\");\nvar se_DeleteStackInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SN] != null) {\n entries[_SN] = input[_SN];\n }\n if (input[_RR] != null) {\n const memberEntries = se_RetainResources(input[_RR], context);\n if (input[_RR]?.length === 0) {\n entries.RetainResources = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `RetainResources.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_RARN] != null) {\n entries[_RARN] = input[_RARN];\n }\n if (input[_CRT] != null) {\n entries[_CRT] = input[_CRT];\n }\n if (input[_DM] != null) {\n entries[_DM] = input[_DM];\n }\n return entries;\n}, \"se_DeleteStackInput\");\nvar se_DeleteStackInstancesInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SSN] != null) {\n entries[_SSN] = input[_SSN];\n }\n if (input[_Ac] != null) {\n const memberEntries = se_AccountList(input[_Ac], context);\n if (input[_Ac]?.length === 0) {\n entries.Accounts = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Accounts.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_DTep] != null) {\n const memberEntries = se_DeploymentTargets(input[_DTep], context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `DeploymentTargets.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_Re] != null) {\n const memberEntries = se_RegionList(input[_Re], context);\n if (input[_Re]?.length === 0) {\n entries.Regions = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Regions.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_OP] != null) {\n const memberEntries = se_StackSetOperationPreferences(input[_OP], context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `OperationPreferences.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_RSe] != null) {\n entries[_RSe] = input[_RSe];\n }\n if (input[_OI] === void 0) {\n input[_OI] = (0, import_uuid.v4)();\n }\n if (input[_OI] != null) {\n entries[_OI] = input[_OI];\n }\n if (input[_CA] != null) {\n entries[_CA] = input[_CA];\n }\n return entries;\n}, \"se_DeleteStackInstancesInput\");\nvar se_DeleteStackSetInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SSN] != null) {\n entries[_SSN] = input[_SSN];\n }\n if (input[_CA] != null) {\n entries[_CA] = input[_CA];\n }\n return entries;\n}, \"se_DeleteStackSetInput\");\nvar se_DeploymentTargets = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_Ac] != null) {\n const memberEntries = se_AccountList(input[_Ac], context);\n if (input[_Ac]?.length === 0) {\n entries.Accounts = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Accounts.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_AUc] != null) {\n entries[_AUc] = input[_AUc];\n }\n if (input[_OUI] != null) {\n const memberEntries = se_OrganizationalUnitIdList(input[_OUI], context);\n if (input[_OUI]?.length === 0) {\n entries.OrganizationalUnitIds = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `OrganizationalUnitIds.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_AFT] != null) {\n entries[_AFT] = input[_AFT];\n }\n return entries;\n}, \"se_DeploymentTargets\");\nvar se_DeregisterTypeInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_Ar] != null) {\n entries[_Ar] = input[_Ar];\n }\n if (input[_T] != null) {\n entries[_T] = input[_T];\n }\n if (input[_TN] != null) {\n entries[_TN] = input[_TN];\n }\n if (input[_VI] != null) {\n entries[_VI] = input[_VI];\n }\n return entries;\n}, \"se_DeregisterTypeInput\");\nvar se_DescribeAccountLimitsInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_NT] != null) {\n entries[_NT] = input[_NT];\n }\n return entries;\n}, \"se_DescribeAccountLimitsInput\");\nvar se_DescribeChangeSetHooksInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_CSN] != null) {\n entries[_CSN] = input[_CSN];\n }\n if (input[_SN] != null) {\n entries[_SN] = input[_SN];\n }\n if (input[_NT] != null) {\n entries[_NT] = input[_NT];\n }\n if (input[_LRI] != null) {\n entries[_LRI] = input[_LRI];\n }\n return entries;\n}, \"se_DescribeChangeSetHooksInput\");\nvar se_DescribeChangeSetInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_CSN] != null) {\n entries[_CSN] = input[_CSN];\n }\n if (input[_SN] != null) {\n entries[_SN] = input[_SN];\n }\n if (input[_NT] != null) {\n entries[_NT] = input[_NT];\n }\n if (input[_IPV] != null) {\n entries[_IPV] = input[_IPV];\n }\n return entries;\n}, \"se_DescribeChangeSetInput\");\nvar se_DescribeGeneratedTemplateInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_GTN] != null) {\n entries[_GTN] = input[_GTN];\n }\n return entries;\n}, \"se_DescribeGeneratedTemplateInput\");\nvar se_DescribeOrganizationsAccessInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_CA] != null) {\n entries[_CA] = input[_CA];\n }\n return entries;\n}, \"se_DescribeOrganizationsAccessInput\");\nvar se_DescribePublisherInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_PI] != null) {\n entries[_PI] = input[_PI];\n }\n return entries;\n}, \"se_DescribePublisherInput\");\nvar se_DescribeResourceScanInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_RSI] != null) {\n entries[_RSI] = input[_RSI];\n }\n return entries;\n}, \"se_DescribeResourceScanInput\");\nvar se_DescribeStackDriftDetectionStatusInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SDDI] != null) {\n entries[_SDDI] = input[_SDDI];\n }\n return entries;\n}, \"se_DescribeStackDriftDetectionStatusInput\");\nvar se_DescribeStackEventsInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SN] != null) {\n entries[_SN] = input[_SN];\n }\n if (input[_NT] != null) {\n entries[_NT] = input[_NT];\n }\n return entries;\n}, \"se_DescribeStackEventsInput\");\nvar se_DescribeStackInstanceInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SSN] != null) {\n entries[_SSN] = input[_SSN];\n }\n if (input[_SIA] != null) {\n entries[_SIA] = input[_SIA];\n }\n if (input[_SIR] != null) {\n entries[_SIR] = input[_SIR];\n }\n if (input[_CA] != null) {\n entries[_CA] = input[_CA];\n }\n return entries;\n}, \"se_DescribeStackInstanceInput\");\nvar se_DescribeStackRefactorInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SRI] != null) {\n entries[_SRI] = input[_SRI];\n }\n return entries;\n}, \"se_DescribeStackRefactorInput\");\nvar se_DescribeStackResourceDriftsInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SN] != null) {\n entries[_SN] = input[_SN];\n }\n if (input[_SRDSF] != null) {\n const memberEntries = se_StackResourceDriftStatusFilters(input[_SRDSF], context);\n if (input[_SRDSF]?.length === 0) {\n entries.StackResourceDriftStatusFilters = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `StackResourceDriftStatusFilters.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_NT] != null) {\n entries[_NT] = input[_NT];\n }\n if (input[_MR] != null) {\n entries[_MR] = input[_MR];\n }\n return entries;\n}, \"se_DescribeStackResourceDriftsInput\");\nvar se_DescribeStackResourceInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SN] != null) {\n entries[_SN] = input[_SN];\n }\n if (input[_LRI] != null) {\n entries[_LRI] = input[_LRI];\n }\n return entries;\n}, \"se_DescribeStackResourceInput\");\nvar se_DescribeStackResourcesInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SN] != null) {\n entries[_SN] = input[_SN];\n }\n if (input[_LRI] != null) {\n entries[_LRI] = input[_LRI];\n }\n if (input[_PRI] != null) {\n entries[_PRI] = input[_PRI];\n }\n return entries;\n}, \"se_DescribeStackResourcesInput\");\nvar se_DescribeStackSetInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SSN] != null) {\n entries[_SSN] = input[_SSN];\n }\n if (input[_CA] != null) {\n entries[_CA] = input[_CA];\n }\n return entries;\n}, \"se_DescribeStackSetInput\");\nvar se_DescribeStackSetOperationInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SSN] != null) {\n entries[_SSN] = input[_SSN];\n }\n if (input[_OI] != null) {\n entries[_OI] = input[_OI];\n }\n if (input[_CA] != null) {\n entries[_CA] = input[_CA];\n }\n return entries;\n}, \"se_DescribeStackSetOperationInput\");\nvar se_DescribeStacksInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SN] != null) {\n entries[_SN] = input[_SN];\n }\n if (input[_NT] != null) {\n entries[_NT] = input[_NT];\n }\n return entries;\n}, \"se_DescribeStacksInput\");\nvar se_DescribeTypeInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_T] != null) {\n entries[_T] = input[_T];\n }\n if (input[_TN] != null) {\n entries[_TN] = input[_TN];\n }\n if (input[_Ar] != null) {\n entries[_Ar] = input[_Ar];\n }\n if (input[_VI] != null) {\n entries[_VI] = input[_VI];\n }\n if (input[_PI] != null) {\n entries[_PI] = input[_PI];\n }\n if (input[_PVN] != null) {\n entries[_PVN] = input[_PVN];\n }\n return entries;\n}, \"se_DescribeTypeInput\");\nvar se_DescribeTypeRegistrationInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_RTeg] != null) {\n entries[_RTeg] = input[_RTeg];\n }\n return entries;\n}, \"se_DescribeTypeRegistrationInput\");\nvar se_DetectStackDriftInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SN] != null) {\n entries[_SN] = input[_SN];\n }\n if (input[_LRIo] != null) {\n const memberEntries = se_LogicalResourceIds(input[_LRIo], context);\n if (input[_LRIo]?.length === 0) {\n entries.LogicalResourceIds = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `LogicalResourceIds.${key}`;\n entries[loc] = value;\n });\n }\n return entries;\n}, \"se_DetectStackDriftInput\");\nvar se_DetectStackResourceDriftInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SN] != null) {\n entries[_SN] = input[_SN];\n }\n if (input[_LRI] != null) {\n entries[_LRI] = input[_LRI];\n }\n return entries;\n}, \"se_DetectStackResourceDriftInput\");\nvar se_DetectStackSetDriftInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SSN] != null) {\n entries[_SSN] = input[_SSN];\n }\n if (input[_OP] != null) {\n const memberEntries = se_StackSetOperationPreferences(input[_OP], context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `OperationPreferences.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_OI] === void 0) {\n input[_OI] = (0, import_uuid.v4)();\n }\n if (input[_OI] != null) {\n entries[_OI] = input[_OI];\n }\n if (input[_CA] != null) {\n entries[_CA] = input[_CA];\n }\n return entries;\n}, \"se_DetectStackSetDriftInput\");\nvar se_EstimateTemplateCostInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_TB] != null) {\n entries[_TB] = input[_TB];\n }\n if (input[_TURL] != null) {\n entries[_TURL] = input[_TURL];\n }\n if (input[_P] != null) {\n const memberEntries = se_Parameters(input[_P], context);\n if (input[_P]?.length === 0) {\n entries.Parameters = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Parameters.${key}`;\n entries[loc] = value;\n });\n }\n return entries;\n}, \"se_EstimateTemplateCostInput\");\nvar se_ExecuteChangeSetInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_CSN] != null) {\n entries[_CSN] = input[_CSN];\n }\n if (input[_SN] != null) {\n entries[_SN] = input[_SN];\n }\n if (input[_CRT] != null) {\n entries[_CRT] = input[_CRT];\n }\n if (input[_DR] != null) {\n entries[_DR] = input[_DR];\n }\n if (input[_REOC] != null) {\n entries[_REOC] = input[_REOC];\n }\n return entries;\n}, \"se_ExecuteChangeSetInput\");\nvar se_ExecuteStackRefactorInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SRI] != null) {\n entries[_SRI] = input[_SRI];\n }\n return entries;\n}, \"se_ExecuteStackRefactorInput\");\nvar se_GetGeneratedTemplateInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_F] != null) {\n entries[_F] = input[_F];\n }\n if (input[_GTN] != null) {\n entries[_GTN] = input[_GTN];\n }\n return entries;\n}, \"se_GetGeneratedTemplateInput\");\nvar se_GetStackPolicyInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SN] != null) {\n entries[_SN] = input[_SN];\n }\n return entries;\n}, \"se_GetStackPolicyInput\");\nvar se_GetTemplateInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SN] != null) {\n entries[_SN] = input[_SN];\n }\n if (input[_CSN] != null) {\n entries[_CSN] = input[_CSN];\n }\n if (input[_TS] != null) {\n entries[_TS] = input[_TS];\n }\n return entries;\n}, \"se_GetTemplateInput\");\nvar se_GetTemplateSummaryInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_TB] != null) {\n entries[_TB] = input[_TB];\n }\n if (input[_TURL] != null) {\n entries[_TURL] = input[_TURL];\n }\n if (input[_SN] != null) {\n entries[_SN] = input[_SN];\n }\n if (input[_SSN] != null) {\n entries[_SSN] = input[_SSN];\n }\n if (input[_CA] != null) {\n entries[_CA] = input[_CA];\n }\n if (input[_TSC] != null) {\n const memberEntries = se_TemplateSummaryConfig(input[_TSC], context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `TemplateSummaryConfig.${key}`;\n entries[loc] = value;\n });\n }\n return entries;\n}, \"se_GetTemplateSummaryInput\");\nvar se_ImportStacksToStackSetInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SSN] != null) {\n entries[_SSN] = input[_SSN];\n }\n if (input[_SIt] != null) {\n const memberEntries = se_StackIdList(input[_SIt], context);\n if (input[_SIt]?.length === 0) {\n entries.StackIds = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `StackIds.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_SIU] != null) {\n entries[_SIU] = input[_SIU];\n }\n if (input[_OUI] != null) {\n const memberEntries = se_OrganizationalUnitIdList(input[_OUI], context);\n if (input[_OUI]?.length === 0) {\n entries.OrganizationalUnitIds = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `OrganizationalUnitIds.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_OP] != null) {\n const memberEntries = se_StackSetOperationPreferences(input[_OP], context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `OperationPreferences.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_OI] === void 0) {\n input[_OI] = (0, import_uuid.v4)();\n }\n if (input[_OI] != null) {\n entries[_OI] = input[_OI];\n }\n if (input[_CA] != null) {\n entries[_CA] = input[_CA];\n }\n return entries;\n}, \"se_ImportStacksToStackSetInput\");\nvar se_JazzLogicalResourceIds = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n entries[`member.${counter}`] = entry;\n counter++;\n }\n return entries;\n}, \"se_JazzLogicalResourceIds\");\nvar se_JazzResourceIdentifierProperties = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n Object.keys(input).filter((key) => input[key] != null).forEach((key) => {\n entries[`entry.${counter}.key`] = key;\n entries[`entry.${counter}.value`] = input[key];\n counter++;\n });\n return entries;\n}, \"se_JazzResourceIdentifierProperties\");\nvar se_ListChangeSetsInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SN] != null) {\n entries[_SN] = input[_SN];\n }\n if (input[_NT] != null) {\n entries[_NT] = input[_NT];\n }\n return entries;\n}, \"se_ListChangeSetsInput\");\nvar se_ListExportsInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_NT] != null) {\n entries[_NT] = input[_NT];\n }\n return entries;\n}, \"se_ListExportsInput\");\nvar se_ListGeneratedTemplatesInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_NT] != null) {\n entries[_NT] = input[_NT];\n }\n if (input[_MR] != null) {\n entries[_MR] = input[_MR];\n }\n return entries;\n}, \"se_ListGeneratedTemplatesInput\");\nvar se_ListHookResultsInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_TTa] != null) {\n entries[_TTa] = input[_TTa];\n }\n if (input[_TI] != null) {\n entries[_TI] = input[_TI];\n }\n if (input[_NT] != null) {\n entries[_NT] = input[_NT];\n }\n return entries;\n}, \"se_ListHookResultsInput\");\nvar se_ListImportsInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_EN] != null) {\n entries[_EN] = input[_EN];\n }\n if (input[_NT] != null) {\n entries[_NT] = input[_NT];\n }\n return entries;\n}, \"se_ListImportsInput\");\nvar se_ListResourceScanRelatedResourcesInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_RSI] != null) {\n entries[_RSI] = input[_RSI];\n }\n if (input[_R] != null) {\n const memberEntries = se_ScannedResourceIdentifiers(input[_R], context);\n if (input[_R]?.length === 0) {\n entries.Resources = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Resources.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_NT] != null) {\n entries[_NT] = input[_NT];\n }\n if (input[_MR] != null) {\n entries[_MR] = input[_MR];\n }\n return entries;\n}, \"se_ListResourceScanRelatedResourcesInput\");\nvar se_ListResourceScanResourcesInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_RSI] != null) {\n entries[_RSI] = input[_RSI];\n }\n if (input[_RI] != null) {\n entries[_RI] = input[_RI];\n }\n if (input[_RTP] != null) {\n entries[_RTP] = input[_RTP];\n }\n if (input[_TK] != null) {\n entries[_TK] = input[_TK];\n }\n if (input[_TV] != null) {\n entries[_TV] = input[_TV];\n }\n if (input[_NT] != null) {\n entries[_NT] = input[_NT];\n }\n if (input[_MR] != null) {\n entries[_MR] = input[_MR];\n }\n return entries;\n}, \"se_ListResourceScanResourcesInput\");\nvar se_ListResourceScansInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_NT] != null) {\n entries[_NT] = input[_NT];\n }\n if (input[_MR] != null) {\n entries[_MR] = input[_MR];\n }\n if (input[_STF] != null) {\n entries[_STF] = input[_STF];\n }\n return entries;\n}, \"se_ListResourceScansInput\");\nvar se_ListStackInstanceResourceDriftsInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SSN] != null) {\n entries[_SSN] = input[_SSN];\n }\n if (input[_NT] != null) {\n entries[_NT] = input[_NT];\n }\n if (input[_MR] != null) {\n entries[_MR] = input[_MR];\n }\n if (input[_SIRDS] != null) {\n const memberEntries = se_StackResourceDriftStatusFilters(input[_SIRDS], context);\n if (input[_SIRDS]?.length === 0) {\n entries.StackInstanceResourceDriftStatuses = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `StackInstanceResourceDriftStatuses.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_SIA] != null) {\n entries[_SIA] = input[_SIA];\n }\n if (input[_SIR] != null) {\n entries[_SIR] = input[_SIR];\n }\n if (input[_OI] != null) {\n entries[_OI] = input[_OI];\n }\n if (input[_CA] != null) {\n entries[_CA] = input[_CA];\n }\n return entries;\n}, \"se_ListStackInstanceResourceDriftsInput\");\nvar se_ListStackInstancesInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SSN] != null) {\n entries[_SSN] = input[_SSN];\n }\n if (input[_NT] != null) {\n entries[_NT] = input[_NT];\n }\n if (input[_MR] != null) {\n entries[_MR] = input[_MR];\n }\n if (input[_Fi] != null) {\n const memberEntries = se_StackInstanceFilters(input[_Fi], context);\n if (input[_Fi]?.length === 0) {\n entries.Filters = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Filters.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_SIA] != null) {\n entries[_SIA] = input[_SIA];\n }\n if (input[_SIR] != null) {\n entries[_SIR] = input[_SIR];\n }\n if (input[_CA] != null) {\n entries[_CA] = input[_CA];\n }\n return entries;\n}, \"se_ListStackInstancesInput\");\nvar se_ListStackRefactorActionsInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SRI] != null) {\n entries[_SRI] = input[_SRI];\n }\n if (input[_NT] != null) {\n entries[_NT] = input[_NT];\n }\n if (input[_MR] != null) {\n entries[_MR] = input[_MR];\n }\n return entries;\n}, \"se_ListStackRefactorActionsInput\");\nvar se_ListStackRefactorsInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_ESF] != null) {\n const memberEntries = se_StackRefactorExecutionStatusFilter(input[_ESF], context);\n if (input[_ESF]?.length === 0) {\n entries.ExecutionStatusFilter = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `ExecutionStatusFilter.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_NT] != null) {\n entries[_NT] = input[_NT];\n }\n if (input[_MR] != null) {\n entries[_MR] = input[_MR];\n }\n return entries;\n}, \"se_ListStackRefactorsInput\");\nvar se_ListStackResourcesInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SN] != null) {\n entries[_SN] = input[_SN];\n }\n if (input[_NT] != null) {\n entries[_NT] = input[_NT];\n }\n return entries;\n}, \"se_ListStackResourcesInput\");\nvar se_ListStackSetAutoDeploymentTargetsInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SSN] != null) {\n entries[_SSN] = input[_SSN];\n }\n if (input[_NT] != null) {\n entries[_NT] = input[_NT];\n }\n if (input[_MR] != null) {\n entries[_MR] = input[_MR];\n }\n if (input[_CA] != null) {\n entries[_CA] = input[_CA];\n }\n return entries;\n}, \"se_ListStackSetAutoDeploymentTargetsInput\");\nvar se_ListStackSetOperationResultsInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SSN] != null) {\n entries[_SSN] = input[_SSN];\n }\n if (input[_OI] != null) {\n entries[_OI] = input[_OI];\n }\n if (input[_NT] != null) {\n entries[_NT] = input[_NT];\n }\n if (input[_MR] != null) {\n entries[_MR] = input[_MR];\n }\n if (input[_CA] != null) {\n entries[_CA] = input[_CA];\n }\n if (input[_Fi] != null) {\n const memberEntries = se_OperationResultFilters(input[_Fi], context);\n if (input[_Fi]?.length === 0) {\n entries.Filters = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Filters.${key}`;\n entries[loc] = value;\n });\n }\n return entries;\n}, \"se_ListStackSetOperationResultsInput\");\nvar se_ListStackSetOperationsInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SSN] != null) {\n entries[_SSN] = input[_SSN];\n }\n if (input[_NT] != null) {\n entries[_NT] = input[_NT];\n }\n if (input[_MR] != null) {\n entries[_MR] = input[_MR];\n }\n if (input[_CA] != null) {\n entries[_CA] = input[_CA];\n }\n return entries;\n}, \"se_ListStackSetOperationsInput\");\nvar se_ListStackSetsInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_NT] != null) {\n entries[_NT] = input[_NT];\n }\n if (input[_MR] != null) {\n entries[_MR] = input[_MR];\n }\n if (input[_S] != null) {\n entries[_S] = input[_S];\n }\n if (input[_CA] != null) {\n entries[_CA] = input[_CA];\n }\n return entries;\n}, \"se_ListStackSetsInput\");\nvar se_ListStacksInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_NT] != null) {\n entries[_NT] = input[_NT];\n }\n if (input[_SSF] != null) {\n const memberEntries = se_StackStatusFilter(input[_SSF], context);\n if (input[_SSF]?.length === 0) {\n entries.StackStatusFilter = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `StackStatusFilter.${key}`;\n entries[loc] = value;\n });\n }\n return entries;\n}, \"se_ListStacksInput\");\nvar se_ListTypeRegistrationsInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_T] != null) {\n entries[_T] = input[_T];\n }\n if (input[_TN] != null) {\n entries[_TN] = input[_TN];\n }\n if (input[_TA] != null) {\n entries[_TA] = input[_TA];\n }\n if (input[_RSF] != null) {\n entries[_RSF] = input[_RSF];\n }\n if (input[_MR] != null) {\n entries[_MR] = input[_MR];\n }\n if (input[_NT] != null) {\n entries[_NT] = input[_NT];\n }\n return entries;\n}, \"se_ListTypeRegistrationsInput\");\nvar se_ListTypesInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_Vi] != null) {\n entries[_Vi] = input[_Vi];\n }\n if (input[_PTr] != null) {\n entries[_PTr] = input[_PTr];\n }\n if (input[_DSep] != null) {\n entries[_DSep] = input[_DSep];\n }\n if (input[_T] != null) {\n entries[_T] = input[_T];\n }\n if (input[_Fi] != null) {\n const memberEntries = se_TypeFilters(input[_Fi], context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Filters.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_MR] != null) {\n entries[_MR] = input[_MR];\n }\n if (input[_NT] != null) {\n entries[_NT] = input[_NT];\n }\n return entries;\n}, \"se_ListTypesInput\");\nvar se_ListTypeVersionsInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_T] != null) {\n entries[_T] = input[_T];\n }\n if (input[_TN] != null) {\n entries[_TN] = input[_TN];\n }\n if (input[_Ar] != null) {\n entries[_Ar] = input[_Ar];\n }\n if (input[_MR] != null) {\n entries[_MR] = input[_MR];\n }\n if (input[_NT] != null) {\n entries[_NT] = input[_NT];\n }\n if (input[_DSep] != null) {\n entries[_DSep] = input[_DSep];\n }\n if (input[_PI] != null) {\n entries[_PI] = input[_PI];\n }\n return entries;\n}, \"se_ListTypeVersionsInput\");\nvar se_LoggingConfig = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_LRA] != null) {\n entries[_LRA] = input[_LRA];\n }\n if (input[_LGN] != null) {\n entries[_LGN] = input[_LGN];\n }\n return entries;\n}, \"se_LoggingConfig\");\nvar se_LogicalResourceIds = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n entries[`member.${counter}`] = entry;\n counter++;\n }\n return entries;\n}, \"se_LogicalResourceIds\");\nvar se_ManagedExecution = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_Act] != null) {\n entries[_Act] = input[_Act];\n }\n return entries;\n}, \"se_ManagedExecution\");\nvar se_NotificationARNs = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n entries[`member.${counter}`] = entry;\n counter++;\n }\n return entries;\n}, \"se_NotificationARNs\");\nvar se_OperationResultFilter = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_N] != null) {\n entries[_N] = input[_N];\n }\n if (input[_Va] != null) {\n entries[_Va] = input[_Va];\n }\n return entries;\n}, \"se_OperationResultFilter\");\nvar se_OperationResultFilters = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n const memberEntries = se_OperationResultFilter(entry, context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n entries[`member.${counter}.${key}`] = value;\n });\n counter++;\n }\n return entries;\n}, \"se_OperationResultFilters\");\nvar se_OrganizationalUnitIdList = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n entries[`member.${counter}`] = entry;\n counter++;\n }\n return entries;\n}, \"se_OrganizationalUnitIdList\");\nvar se_Parameter = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_PK] != null) {\n entries[_PK] = input[_PK];\n }\n if (input[_PV] != null) {\n entries[_PV] = input[_PV];\n }\n if (input[_UPV] != null) {\n entries[_UPV] = input[_UPV];\n }\n if (input[_RV] != null) {\n entries[_RV] = input[_RV];\n }\n return entries;\n}, \"se_Parameter\");\nvar se_Parameters = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n const memberEntries = se_Parameter(entry, context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n entries[`member.${counter}.${key}`] = value;\n });\n counter++;\n }\n return entries;\n}, \"se_Parameters\");\nvar se_PublishTypeInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_T] != null) {\n entries[_T] = input[_T];\n }\n if (input[_Ar] != null) {\n entries[_Ar] = input[_Ar];\n }\n if (input[_TN] != null) {\n entries[_TN] = input[_TN];\n }\n if (input[_PVN] != null) {\n entries[_PVN] = input[_PVN];\n }\n return entries;\n}, \"se_PublishTypeInput\");\nvar se_RecordHandlerProgressInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_BT] != null) {\n entries[_BT] = input[_BT];\n }\n if (input[_OS] != null) {\n entries[_OS] = input[_OS];\n }\n if (input[_COS] != null) {\n entries[_COS] = input[_COS];\n }\n if (input[_SM] != null) {\n entries[_SM] = input[_SM];\n }\n if (input[_EC] != null) {\n entries[_EC] = input[_EC];\n }\n if (input[_RMe] != null) {\n entries[_RMe] = input[_RMe];\n }\n if (input[_CRT] != null) {\n entries[_CRT] = input[_CRT];\n }\n return entries;\n}, \"se_RecordHandlerProgressInput\");\nvar se_RegionList = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n entries[`member.${counter}`] = entry;\n counter++;\n }\n return entries;\n}, \"se_RegionList\");\nvar se_RegisterPublisherInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_ATAC] != null) {\n entries[_ATAC] = input[_ATAC];\n }\n if (input[_CAo] != null) {\n entries[_CAo] = input[_CAo];\n }\n return entries;\n}, \"se_RegisterPublisherInput\");\nvar se_RegisterTypeInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_T] != null) {\n entries[_T] = input[_T];\n }\n if (input[_TN] != null) {\n entries[_TN] = input[_TN];\n }\n if (input[_SHP] != null) {\n entries[_SHP] = input[_SHP];\n }\n if (input[_LC] != null) {\n const memberEntries = se_LoggingConfig(input[_LC], context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `LoggingConfig.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_ERA] != null) {\n entries[_ERA] = input[_ERA];\n }\n if (input[_CRT] != null) {\n entries[_CRT] = input[_CRT];\n }\n return entries;\n}, \"se_RegisterTypeInput\");\nvar se_ResourceDefinition = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_RTes] != null) {\n entries[_RTes] = input[_RTes];\n }\n if (input[_LRI] != null) {\n entries[_LRI] = input[_LRI];\n }\n if (input[_RI] != null) {\n const memberEntries = se_ResourceIdentifierProperties(input[_RI], context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `ResourceIdentifier.${key}`;\n entries[loc] = value;\n });\n }\n return entries;\n}, \"se_ResourceDefinition\");\nvar se_ResourceDefinitions = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n const memberEntries = se_ResourceDefinition(entry, context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n entries[`member.${counter}.${key}`] = value;\n });\n counter++;\n }\n return entries;\n}, \"se_ResourceDefinitions\");\nvar se_ResourceIdentifierProperties = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n Object.keys(input).filter((key) => input[key] != null).forEach((key) => {\n entries[`entry.${counter}.key`] = key;\n entries[`entry.${counter}.value`] = input[key];\n counter++;\n });\n return entries;\n}, \"se_ResourceIdentifierProperties\");\nvar se_ResourceLocation = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SN] != null) {\n entries[_SN] = input[_SN];\n }\n if (input[_LRI] != null) {\n entries[_LRI] = input[_LRI];\n }\n return entries;\n}, \"se_ResourceLocation\");\nvar se_ResourceMapping = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_So] != null) {\n const memberEntries = se_ResourceLocation(input[_So], context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Source.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_De] != null) {\n const memberEntries = se_ResourceLocation(input[_De], context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Destination.${key}`;\n entries[loc] = value;\n });\n }\n return entries;\n}, \"se_ResourceMapping\");\nvar se_ResourceMappings = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n const memberEntries = se_ResourceMapping(entry, context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n entries[`member.${counter}.${key}`] = value;\n });\n counter++;\n }\n return entries;\n}, \"se_ResourceMappings\");\nvar se_ResourcesToImport = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n const memberEntries = se_ResourceToImport(entry, context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n entries[`member.${counter}.${key}`] = value;\n });\n counter++;\n }\n return entries;\n}, \"se_ResourcesToImport\");\nvar se_ResourcesToSkip = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n entries[`member.${counter}`] = entry;\n counter++;\n }\n return entries;\n}, \"se_ResourcesToSkip\");\nvar se_ResourceToImport = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_RTes] != null) {\n entries[_RTes] = input[_RTes];\n }\n if (input[_LRI] != null) {\n entries[_LRI] = input[_LRI];\n }\n if (input[_RI] != null) {\n const memberEntries = se_ResourceIdentifierProperties(input[_RI], context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `ResourceIdentifier.${key}`;\n entries[loc] = value;\n });\n }\n return entries;\n}, \"se_ResourceToImport\");\nvar se_ResourceTypeFilters = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n entries[`member.${counter}`] = entry;\n counter++;\n }\n return entries;\n}, \"se_ResourceTypeFilters\");\nvar se_ResourceTypes = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n entries[`member.${counter}`] = entry;\n counter++;\n }\n return entries;\n}, \"se_ResourceTypes\");\nvar se_RetainResources = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n entries[`member.${counter}`] = entry;\n counter++;\n }\n return entries;\n}, \"se_RetainResources\");\nvar se_RollbackConfiguration = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_RTo] != null) {\n const memberEntries = se_RollbackTriggers(input[_RTo], context);\n if (input[_RTo]?.length === 0) {\n entries.RollbackTriggers = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `RollbackTriggers.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_MTIM] != null) {\n entries[_MTIM] = input[_MTIM];\n }\n return entries;\n}, \"se_RollbackConfiguration\");\nvar se_RollbackStackInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SN] != null) {\n entries[_SN] = input[_SN];\n }\n if (input[_RARN] != null) {\n entries[_RARN] = input[_RARN];\n }\n if (input[_CRT] != null) {\n entries[_CRT] = input[_CRT];\n }\n if (input[_REOC] != null) {\n entries[_REOC] = input[_REOC];\n }\n return entries;\n}, \"se_RollbackStackInput\");\nvar se_RollbackTrigger = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_Ar] != null) {\n entries[_Ar] = input[_Ar];\n }\n if (input[_T] != null) {\n entries[_T] = input[_T];\n }\n return entries;\n}, \"se_RollbackTrigger\");\nvar se_RollbackTriggers = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n const memberEntries = se_RollbackTrigger(entry, context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n entries[`member.${counter}.${key}`] = value;\n });\n counter++;\n }\n return entries;\n}, \"se_RollbackTriggers\");\nvar se_ScanFilter = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_Ty] != null) {\n const memberEntries = se_ResourceTypeFilters(input[_Ty], context);\n if (input[_Ty]?.length === 0) {\n entries.Types = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Types.${key}`;\n entries[loc] = value;\n });\n }\n return entries;\n}, \"se_ScanFilter\");\nvar se_ScanFilters = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n const memberEntries = se_ScanFilter(entry, context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n entries[`member.${counter}.${key}`] = value;\n });\n counter++;\n }\n return entries;\n}, \"se_ScanFilters\");\nvar se_ScannedResourceIdentifier = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_RTes] != null) {\n entries[_RTes] = input[_RTes];\n }\n if (input[_RI] != null) {\n const memberEntries = se_JazzResourceIdentifierProperties(input[_RI], context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `ResourceIdentifier.${key}`;\n entries[loc] = value;\n });\n }\n return entries;\n}, \"se_ScannedResourceIdentifier\");\nvar se_ScannedResourceIdentifiers = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n const memberEntries = se_ScannedResourceIdentifier(entry, context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n entries[`member.${counter}.${key}`] = value;\n });\n counter++;\n }\n return entries;\n}, \"se_ScannedResourceIdentifiers\");\nvar se_SetStackPolicyInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SN] != null) {\n entries[_SN] = input[_SN];\n }\n if (input[_SPB] != null) {\n entries[_SPB] = input[_SPB];\n }\n if (input[_SPURL] != null) {\n entries[_SPURL] = input[_SPURL];\n }\n return entries;\n}, \"se_SetStackPolicyInput\");\nvar se_SetTypeConfigurationInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_TA] != null) {\n entries[_TA] = input[_TA];\n }\n if (input[_Co] != null) {\n entries[_Co] = input[_Co];\n }\n if (input[_CAon] != null) {\n entries[_CAon] = input[_CAon];\n }\n if (input[_TN] != null) {\n entries[_TN] = input[_TN];\n }\n if (input[_T] != null) {\n entries[_T] = input[_T];\n }\n return entries;\n}, \"se_SetTypeConfigurationInput\");\nvar se_SetTypeDefaultVersionInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_Ar] != null) {\n entries[_Ar] = input[_Ar];\n }\n if (input[_T] != null) {\n entries[_T] = input[_T];\n }\n if (input[_TN] != null) {\n entries[_TN] = input[_TN];\n }\n if (input[_VI] != null) {\n entries[_VI] = input[_VI];\n }\n return entries;\n}, \"se_SetTypeDefaultVersionInput\");\nvar se_SignalResourceInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SN] != null) {\n entries[_SN] = input[_SN];\n }\n if (input[_LRI] != null) {\n entries[_LRI] = input[_LRI];\n }\n if (input[_UI] != null) {\n entries[_UI] = input[_UI];\n }\n if (input[_S] != null) {\n entries[_S] = input[_S];\n }\n return entries;\n}, \"se_SignalResourceInput\");\nvar se_StackDefinition = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SN] != null) {\n entries[_SN] = input[_SN];\n }\n if (input[_TB] != null) {\n entries[_TB] = input[_TB];\n }\n if (input[_TURL] != null) {\n entries[_TURL] = input[_TURL];\n }\n return entries;\n}, \"se_StackDefinition\");\nvar se_StackDefinitions = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n const memberEntries = se_StackDefinition(entry, context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n entries[`member.${counter}.${key}`] = value;\n });\n counter++;\n }\n return entries;\n}, \"se_StackDefinitions\");\nvar se_StackIdList = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n entries[`member.${counter}`] = entry;\n counter++;\n }\n return entries;\n}, \"se_StackIdList\");\nvar se_StackInstanceFilter = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_N] != null) {\n entries[_N] = input[_N];\n }\n if (input[_Va] != null) {\n entries[_Va] = input[_Va];\n }\n return entries;\n}, \"se_StackInstanceFilter\");\nvar se_StackInstanceFilters = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n const memberEntries = se_StackInstanceFilter(entry, context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n entries[`member.${counter}.${key}`] = value;\n });\n counter++;\n }\n return entries;\n}, \"se_StackInstanceFilters\");\nvar se_StackRefactorExecutionStatusFilter = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n entries[`member.${counter}`] = entry;\n counter++;\n }\n return entries;\n}, \"se_StackRefactorExecutionStatusFilter\");\nvar se_StackResourceDriftStatusFilters = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n entries[`member.${counter}`] = entry;\n counter++;\n }\n return entries;\n}, \"se_StackResourceDriftStatusFilters\");\nvar se_StackSetOperationPreferences = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_RCT] != null) {\n entries[_RCT] = input[_RCT];\n }\n if (input[_RO] != null) {\n const memberEntries = se_RegionList(input[_RO], context);\n if (input[_RO]?.length === 0) {\n entries.RegionOrder = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `RegionOrder.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_FTC] != null) {\n entries[_FTC] = input[_FTC];\n }\n if (input[_FTP] != null) {\n entries[_FTP] = input[_FTP];\n }\n if (input[_MCC] != null) {\n entries[_MCC] = input[_MCC];\n }\n if (input[_MCP] != null) {\n entries[_MCP] = input[_MCP];\n }\n if (input[_CM] != null) {\n entries[_CM] = input[_CM];\n }\n return entries;\n}, \"se_StackSetOperationPreferences\");\nvar se_StackStatusFilter = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n entries[`member.${counter}`] = entry;\n counter++;\n }\n return entries;\n}, \"se_StackStatusFilter\");\nvar se_StartResourceScanInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_CRT] != null) {\n entries[_CRT] = input[_CRT];\n }\n if (input[_SF] != null) {\n const memberEntries = se_ScanFilters(input[_SF], context);\n if (input[_SF]?.length === 0) {\n entries.ScanFilters = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `ScanFilters.${key}`;\n entries[loc] = value;\n });\n }\n return entries;\n}, \"se_StartResourceScanInput\");\nvar se_StopStackSetOperationInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SSN] != null) {\n entries[_SSN] = input[_SSN];\n }\n if (input[_OI] != null) {\n entries[_OI] = input[_OI];\n }\n if (input[_CA] != null) {\n entries[_CA] = input[_CA];\n }\n return entries;\n}, \"se_StopStackSetOperationInput\");\nvar se_Tag = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_K] != null) {\n entries[_K] = input[_K];\n }\n if (input[_Val] != null) {\n entries[_Val] = input[_Val];\n }\n return entries;\n}, \"se_Tag\");\nvar se_Tags = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n const memberEntries = se_Tag(entry, context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n entries[`member.${counter}.${key}`] = value;\n });\n counter++;\n }\n return entries;\n}, \"se_Tags\");\nvar se_TemplateConfiguration = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_DPe] != null) {\n entries[_DPe] = input[_DPe];\n }\n if (input[_URP] != null) {\n entries[_URP] = input[_URP];\n }\n return entries;\n}, \"se_TemplateConfiguration\");\nvar se_TemplateSummaryConfig = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_TURTAW] != null) {\n entries[_TURTAW] = input[_TURTAW];\n }\n return entries;\n}, \"se_TemplateSummaryConfig\");\nvar se_TestTypeInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_Ar] != null) {\n entries[_Ar] = input[_Ar];\n }\n if (input[_T] != null) {\n entries[_T] = input[_T];\n }\n if (input[_TN] != null) {\n entries[_TN] = input[_TN];\n }\n if (input[_VI] != null) {\n entries[_VI] = input[_VI];\n }\n if (input[_LDB] != null) {\n entries[_LDB] = input[_LDB];\n }\n return entries;\n}, \"se_TestTypeInput\");\nvar se_TypeConfigurationIdentifier = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_TA] != null) {\n entries[_TA] = input[_TA];\n }\n if (input[_TCA] != null) {\n entries[_TCA] = input[_TCA];\n }\n if (input[_TCAy] != null) {\n entries[_TCAy] = input[_TCAy];\n }\n if (input[_T] != null) {\n entries[_T] = input[_T];\n }\n if (input[_TN] != null) {\n entries[_TN] = input[_TN];\n }\n return entries;\n}, \"se_TypeConfigurationIdentifier\");\nvar se_TypeConfigurationIdentifiers = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n const memberEntries = se_TypeConfigurationIdentifier(entry, context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n entries[`member.${counter}.${key}`] = value;\n });\n counter++;\n }\n return entries;\n}, \"se_TypeConfigurationIdentifiers\");\nvar se_TypeFilters = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_Ca] != null) {\n entries[_Ca] = input[_Ca];\n }\n if (input[_PI] != null) {\n entries[_PI] = input[_PI];\n }\n if (input[_TNP] != null) {\n entries[_TNP] = input[_TNP];\n }\n return entries;\n}, \"se_TypeFilters\");\nvar se_UpdateGeneratedTemplateInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_GTN] != null) {\n entries[_GTN] = input[_GTN];\n }\n if (input[_NGTN] != null) {\n entries[_NGTN] = input[_NGTN];\n }\n if (input[_AR] != null) {\n const memberEntries = se_ResourceDefinitions(input[_AR], context);\n if (input[_AR]?.length === 0) {\n entries.AddResources = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `AddResources.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_RRe] != null) {\n const memberEntries = se_JazzLogicalResourceIds(input[_RRe], context);\n if (input[_RRe]?.length === 0) {\n entries.RemoveResources = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `RemoveResources.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_RAR] != null) {\n entries[_RAR] = input[_RAR];\n }\n if (input[_TC] != null) {\n const memberEntries = se_TemplateConfiguration(input[_TC], context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `TemplateConfiguration.${key}`;\n entries[loc] = value;\n });\n }\n return entries;\n}, \"se_UpdateGeneratedTemplateInput\");\nvar se_UpdateStackInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SN] != null) {\n entries[_SN] = input[_SN];\n }\n if (input[_TB] != null) {\n entries[_TB] = input[_TB];\n }\n if (input[_TURL] != null) {\n entries[_TURL] = input[_TURL];\n }\n if (input[_UPT] != null) {\n entries[_UPT] = input[_UPT];\n }\n if (input[_SPDUB] != null) {\n entries[_SPDUB] = input[_SPDUB];\n }\n if (input[_SPDUURL] != null) {\n entries[_SPDUURL] = input[_SPDUURL];\n }\n if (input[_P] != null) {\n const memberEntries = se_Parameters(input[_P], context);\n if (input[_P]?.length === 0) {\n entries.Parameters = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Parameters.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_C] != null) {\n const memberEntries = se_Capabilities(input[_C], context);\n if (input[_C]?.length === 0) {\n entries.Capabilities = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Capabilities.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_RTe] != null) {\n const memberEntries = se_ResourceTypes(input[_RTe], context);\n if (input[_RTe]?.length === 0) {\n entries.ResourceTypes = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `ResourceTypes.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_RARN] != null) {\n entries[_RARN] = input[_RARN];\n }\n if (input[_RC] != null) {\n const memberEntries = se_RollbackConfiguration(input[_RC], context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `RollbackConfiguration.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_SPB] != null) {\n entries[_SPB] = input[_SPB];\n }\n if (input[_SPURL] != null) {\n entries[_SPURL] = input[_SPURL];\n }\n if (input[_NARN] != null) {\n const memberEntries = se_NotificationARNs(input[_NARN], context);\n if (input[_NARN]?.length === 0) {\n entries.NotificationARNs = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `NotificationARNs.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_Ta] != null) {\n const memberEntries = se_Tags(input[_Ta], context);\n if (input[_Ta]?.length === 0) {\n entries.Tags = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Tags.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_DR] != null) {\n entries[_DR] = input[_DR];\n }\n if (input[_CRT] != null) {\n entries[_CRT] = input[_CRT];\n }\n if (input[_REOC] != null) {\n entries[_REOC] = input[_REOC];\n }\n return entries;\n}, \"se_UpdateStackInput\");\nvar se_UpdateStackInstancesInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SSN] != null) {\n entries[_SSN] = input[_SSN];\n }\n if (input[_Ac] != null) {\n const memberEntries = se_AccountList(input[_Ac], context);\n if (input[_Ac]?.length === 0) {\n entries.Accounts = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Accounts.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_DTep] != null) {\n const memberEntries = se_DeploymentTargets(input[_DTep], context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `DeploymentTargets.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_Re] != null) {\n const memberEntries = se_RegionList(input[_Re], context);\n if (input[_Re]?.length === 0) {\n entries.Regions = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Regions.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_PO] != null) {\n const memberEntries = se_Parameters(input[_PO], context);\n if (input[_PO]?.length === 0) {\n entries.ParameterOverrides = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `ParameterOverrides.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_OP] != null) {\n const memberEntries = se_StackSetOperationPreferences(input[_OP], context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `OperationPreferences.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_OI] === void 0) {\n input[_OI] = (0, import_uuid.v4)();\n }\n if (input[_OI] != null) {\n entries[_OI] = input[_OI];\n }\n if (input[_CA] != null) {\n entries[_CA] = input[_CA];\n }\n return entries;\n}, \"se_UpdateStackInstancesInput\");\nvar se_UpdateStackSetInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_SSN] != null) {\n entries[_SSN] = input[_SSN];\n }\n if (input[_D] != null) {\n entries[_D] = input[_D];\n }\n if (input[_TB] != null) {\n entries[_TB] = input[_TB];\n }\n if (input[_TURL] != null) {\n entries[_TURL] = input[_TURL];\n }\n if (input[_UPT] != null) {\n entries[_UPT] = input[_UPT];\n }\n if (input[_P] != null) {\n const memberEntries = se_Parameters(input[_P], context);\n if (input[_P]?.length === 0) {\n entries.Parameters = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Parameters.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_C] != null) {\n const memberEntries = se_Capabilities(input[_C], context);\n if (input[_C]?.length === 0) {\n entries.Capabilities = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Capabilities.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_Ta] != null) {\n const memberEntries = se_Tags(input[_Ta], context);\n if (input[_Ta]?.length === 0) {\n entries.Tags = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Tags.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_OP] != null) {\n const memberEntries = se_StackSetOperationPreferences(input[_OP], context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `OperationPreferences.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_ARARN] != null) {\n entries[_ARARN] = input[_ARARN];\n }\n if (input[_ERN] != null) {\n entries[_ERN] = input[_ERN];\n }\n if (input[_DTep] != null) {\n const memberEntries = se_DeploymentTargets(input[_DTep], context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `DeploymentTargets.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_PM] != null) {\n entries[_PM] = input[_PM];\n }\n if (input[_AD] != null) {\n const memberEntries = se_AutoDeployment(input[_AD], context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `AutoDeployment.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_OI] === void 0) {\n input[_OI] = (0, import_uuid.v4)();\n }\n if (input[_OI] != null) {\n entries[_OI] = input[_OI];\n }\n if (input[_Ac] != null) {\n const memberEntries = se_AccountList(input[_Ac], context);\n if (input[_Ac]?.length === 0) {\n entries.Accounts = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Accounts.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_Re] != null) {\n const memberEntries = se_RegionList(input[_Re], context);\n if (input[_Re]?.length === 0) {\n entries.Regions = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Regions.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_CA] != null) {\n entries[_CA] = input[_CA];\n }\n if (input[_ME] != null) {\n const memberEntries = se_ManagedExecution(input[_ME], context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `ManagedExecution.${key}`;\n entries[loc] = value;\n });\n }\n return entries;\n}, \"se_UpdateStackSetInput\");\nvar se_UpdateTerminationProtectionInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_ETP] != null) {\n entries[_ETP] = input[_ETP];\n }\n if (input[_SN] != null) {\n entries[_SN] = input[_SN];\n }\n return entries;\n}, \"se_UpdateTerminationProtectionInput\");\nvar se_ValidateTemplateInput = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_TB] != null) {\n entries[_TB] = input[_TB];\n }\n if (input[_TURL] != null) {\n entries[_TURL] = input[_TURL];\n }\n return entries;\n}, \"se_ValidateTemplateInput\");\nvar de_AccountGateResult = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_S] != null) {\n contents[_S] = (0, import_smithy_client.expectString)(output[_S]);\n }\n if (output[_SRt] != null) {\n contents[_SRt] = (0, import_smithy_client.expectString)(output[_SRt]);\n }\n return contents;\n}, \"de_AccountGateResult\");\nvar de_AccountLimit = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_N] != null) {\n contents[_N] = (0, import_smithy_client.expectString)(output[_N]);\n }\n if (output[_Val] != null) {\n contents[_Val] = (0, import_smithy_client.strictParseInt32)(output[_Val]);\n }\n return contents;\n}, \"de_AccountLimit\");\nvar de_AccountLimitList = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_AccountLimit(entry, context);\n });\n}, \"de_AccountLimitList\");\nvar de_AccountList = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return (0, import_smithy_client.expectString)(entry);\n });\n}, \"de_AccountList\");\nvar de_ActivateOrganizationsAccessOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n return contents;\n}, \"de_ActivateOrganizationsAccessOutput\");\nvar de_ActivateTypeOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_Ar] != null) {\n contents[_Ar] = (0, import_smithy_client.expectString)(output[_Ar]);\n }\n return contents;\n}, \"de_ActivateTypeOutput\");\nvar de_AllowedValues = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return (0, import_smithy_client.expectString)(entry);\n });\n}, \"de_AllowedValues\");\nvar de_AlreadyExistsException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_M] != null) {\n contents[_M] = (0, import_smithy_client.expectString)(output[_M]);\n }\n return contents;\n}, \"de_AlreadyExistsException\");\nvar de_AutoDeployment = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_E] != null) {\n contents[_E] = (0, import_smithy_client.parseBoolean)(output[_E]);\n }\n if (output[_RSOAR] != null) {\n contents[_RSOAR] = (0, import_smithy_client.parseBoolean)(output[_RSOAR]);\n }\n return contents;\n}, \"de_AutoDeployment\");\nvar de_BatchDescribeTypeConfigurationsError = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_EC] != null) {\n contents[_EC] = (0, import_smithy_client.expectString)(output[_EC]);\n }\n if (output[_EM] != null) {\n contents[_EM] = (0, import_smithy_client.expectString)(output[_EM]);\n }\n if (output[_TCIy] != null) {\n contents[_TCIy] = de_TypeConfigurationIdentifier(output[_TCIy], context);\n }\n return contents;\n}, \"de_BatchDescribeTypeConfigurationsError\");\nvar de_BatchDescribeTypeConfigurationsErrors = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_BatchDescribeTypeConfigurationsError(entry, context);\n });\n}, \"de_BatchDescribeTypeConfigurationsErrors\");\nvar de_BatchDescribeTypeConfigurationsOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output.Errors === \"\") {\n contents[_Er] = [];\n } else if (output[_Er] != null && output[_Er][_m] != null) {\n contents[_Er] = de_BatchDescribeTypeConfigurationsErrors((0, import_smithy_client.getArrayIfSingleItem)(output[_Er][_m]), context);\n }\n if (output.UnprocessedTypeConfigurations === \"\") {\n contents[_UTC] = [];\n } else if (output[_UTC] != null && output[_UTC][_m] != null) {\n contents[_UTC] = de_UnprocessedTypeConfigurations((0, import_smithy_client.getArrayIfSingleItem)(output[_UTC][_m]), context);\n }\n if (output.TypeConfigurations === \"\") {\n contents[_TCy] = [];\n } else if (output[_TCy] != null && output[_TCy][_m] != null) {\n contents[_TCy] = de_TypeConfigurationDetailsList((0, import_smithy_client.getArrayIfSingleItem)(output[_TCy][_m]), context);\n }\n return contents;\n}, \"de_BatchDescribeTypeConfigurationsOutput\");\nvar de_Capabilities = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return (0, import_smithy_client.expectString)(entry);\n });\n}, \"de_Capabilities\");\nvar de_CFNRegistryException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_M] != null) {\n contents[_M] = (0, import_smithy_client.expectString)(output[_M]);\n }\n return contents;\n}, \"de_CFNRegistryException\");\nvar de_Change = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_T] != null) {\n contents[_T] = (0, import_smithy_client.expectString)(output[_T]);\n }\n if (output[_HIC] != null) {\n contents[_HIC] = (0, import_smithy_client.strictParseInt32)(output[_HIC]);\n }\n if (output[_RCe] != null) {\n contents[_RCe] = de_ResourceChange(output[_RCe], context);\n }\n return contents;\n}, \"de_Change\");\nvar de_Changes = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_Change(entry, context);\n });\n}, \"de_Changes\");\nvar de_ChangeSetHook = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_IP] != null) {\n contents[_IP] = (0, import_smithy_client.expectString)(output[_IP]);\n }\n if (output[_FM] != null) {\n contents[_FM] = (0, import_smithy_client.expectString)(output[_FM]);\n }\n if (output[_TN] != null) {\n contents[_TN] = (0, import_smithy_client.expectString)(output[_TN]);\n }\n if (output[_TVI] != null) {\n contents[_TVI] = (0, import_smithy_client.expectString)(output[_TVI]);\n }\n if (output[_TCVI] != null) {\n contents[_TCVI] = (0, import_smithy_client.expectString)(output[_TCVI]);\n }\n if (output[_TD] != null) {\n contents[_TD] = de_ChangeSetHookTargetDetails(output[_TD], context);\n }\n return contents;\n}, \"de_ChangeSetHook\");\nvar de_ChangeSetHookResourceTargetDetails = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_LRI] != null) {\n contents[_LRI] = (0, import_smithy_client.expectString)(output[_LRI]);\n }\n if (output[_RTes] != null) {\n contents[_RTes] = (0, import_smithy_client.expectString)(output[_RTes]);\n }\n if (output[_RA] != null) {\n contents[_RA] = (0, import_smithy_client.expectString)(output[_RA]);\n }\n return contents;\n}, \"de_ChangeSetHookResourceTargetDetails\");\nvar de_ChangeSetHooks = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_ChangeSetHook(entry, context);\n });\n}, \"de_ChangeSetHooks\");\nvar de_ChangeSetHookTargetDetails = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_TTa] != null) {\n contents[_TTa] = (0, import_smithy_client.expectString)(output[_TTa]);\n }\n if (output[_RTD] != null) {\n contents[_RTD] = de_ChangeSetHookResourceTargetDetails(output[_RTD], context);\n }\n return contents;\n}, \"de_ChangeSetHookTargetDetails\");\nvar de_ChangeSetNotFoundException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_M] != null) {\n contents[_M] = (0, import_smithy_client.expectString)(output[_M]);\n }\n return contents;\n}, \"de_ChangeSetNotFoundException\");\nvar de_ChangeSetSummaries = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_ChangeSetSummary(entry, context);\n });\n}, \"de_ChangeSetSummaries\");\nvar de_ChangeSetSummary = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_SI] != null) {\n contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);\n }\n if (output[_SN] != null) {\n contents[_SN] = (0, import_smithy_client.expectString)(output[_SN]);\n }\n if (output[_CSIh] != null) {\n contents[_CSIh] = (0, import_smithy_client.expectString)(output[_CSIh]);\n }\n if (output[_CSN] != null) {\n contents[_CSN] = (0, import_smithy_client.expectString)(output[_CSN]);\n }\n if (output[_ES] != null) {\n contents[_ES] = (0, import_smithy_client.expectString)(output[_ES]);\n }\n if (output[_S] != null) {\n contents[_S] = (0, import_smithy_client.expectString)(output[_S]);\n }\n if (output[_SRt] != null) {\n contents[_SRt] = (0, import_smithy_client.expectString)(output[_SRt]);\n }\n if (output[_CTr] != null) {\n contents[_CTr] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_CTr]));\n }\n if (output[_D] != null) {\n contents[_D] = (0, import_smithy_client.expectString)(output[_D]);\n }\n if (output[_INS] != null) {\n contents[_INS] = (0, import_smithy_client.parseBoolean)(output[_INS]);\n }\n if (output[_PCSI] != null) {\n contents[_PCSI] = (0, import_smithy_client.expectString)(output[_PCSI]);\n }\n if (output[_RCSI] != null) {\n contents[_RCSI] = (0, import_smithy_client.expectString)(output[_RCSI]);\n }\n if (output[_IER] != null) {\n contents[_IER] = (0, import_smithy_client.parseBoolean)(output[_IER]);\n }\n return contents;\n}, \"de_ChangeSetSummary\");\nvar de_ConcurrentResourcesLimitExceededException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_M] != null) {\n contents[_M] = (0, import_smithy_client.expectString)(output[_M]);\n }\n return contents;\n}, \"de_ConcurrentResourcesLimitExceededException\");\nvar de_ContinueUpdateRollbackOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n return contents;\n}, \"de_ContinueUpdateRollbackOutput\");\nvar de_CreateChangeSetOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_I] != null) {\n contents[_I] = (0, import_smithy_client.expectString)(output[_I]);\n }\n if (output[_SI] != null) {\n contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);\n }\n return contents;\n}, \"de_CreateChangeSetOutput\");\nvar de_CreatedButModifiedException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_M] != null) {\n contents[_M] = (0, import_smithy_client.expectString)(output[_M]);\n }\n return contents;\n}, \"de_CreatedButModifiedException\");\nvar de_CreateGeneratedTemplateOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_GTI] != null) {\n contents[_GTI] = (0, import_smithy_client.expectString)(output[_GTI]);\n }\n return contents;\n}, \"de_CreateGeneratedTemplateOutput\");\nvar de_CreateStackInstancesOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_OI] != null) {\n contents[_OI] = (0, import_smithy_client.expectString)(output[_OI]);\n }\n return contents;\n}, \"de_CreateStackInstancesOutput\");\nvar de_CreateStackOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_SI] != null) {\n contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);\n }\n return contents;\n}, \"de_CreateStackOutput\");\nvar de_CreateStackRefactorOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_SRI] != null) {\n contents[_SRI] = (0, import_smithy_client.expectString)(output[_SRI]);\n }\n return contents;\n}, \"de_CreateStackRefactorOutput\");\nvar de_CreateStackSetOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_SSI] != null) {\n contents[_SSI] = (0, import_smithy_client.expectString)(output[_SSI]);\n }\n return contents;\n}, \"de_CreateStackSetOutput\");\nvar de_DeactivateOrganizationsAccessOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n return contents;\n}, \"de_DeactivateOrganizationsAccessOutput\");\nvar de_DeactivateTypeOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n return contents;\n}, \"de_DeactivateTypeOutput\");\nvar de_DeleteChangeSetOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n return contents;\n}, \"de_DeleteChangeSetOutput\");\nvar de_DeleteStackInstancesOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_OI] != null) {\n contents[_OI] = (0, import_smithy_client.expectString)(output[_OI]);\n }\n return contents;\n}, \"de_DeleteStackInstancesOutput\");\nvar de_DeleteStackSetOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n return contents;\n}, \"de_DeleteStackSetOutput\");\nvar de_DeploymentTargets = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output.Accounts === \"\") {\n contents[_Ac] = [];\n } else if (output[_Ac] != null && output[_Ac][_m] != null) {\n contents[_Ac] = de_AccountList((0, import_smithy_client.getArrayIfSingleItem)(output[_Ac][_m]), context);\n }\n if (output[_AUc] != null) {\n contents[_AUc] = (0, import_smithy_client.expectString)(output[_AUc]);\n }\n if (output.OrganizationalUnitIds === \"\") {\n contents[_OUI] = [];\n } else if (output[_OUI] != null && output[_OUI][_m] != null) {\n contents[_OUI] = de_OrganizationalUnitIdList((0, import_smithy_client.getArrayIfSingleItem)(output[_OUI][_m]), context);\n }\n if (output[_AFT] != null) {\n contents[_AFT] = (0, import_smithy_client.expectString)(output[_AFT]);\n }\n return contents;\n}, \"de_DeploymentTargets\");\nvar de_DeregisterTypeOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n return contents;\n}, \"de_DeregisterTypeOutput\");\nvar de_DescribeAccountLimitsOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output.AccountLimits === \"\") {\n contents[_AL] = [];\n } else if (output[_AL] != null && output[_AL][_m] != null) {\n contents[_AL] = de_AccountLimitList((0, import_smithy_client.getArrayIfSingleItem)(output[_AL][_m]), context);\n }\n if (output[_NT] != null) {\n contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);\n }\n return contents;\n}, \"de_DescribeAccountLimitsOutput\");\nvar de_DescribeChangeSetHooksOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_CSIh] != null) {\n contents[_CSIh] = (0, import_smithy_client.expectString)(output[_CSIh]);\n }\n if (output[_CSN] != null) {\n contents[_CSN] = (0, import_smithy_client.expectString)(output[_CSN]);\n }\n if (output.Hooks === \"\") {\n contents[_H] = [];\n } else if (output[_H] != null && output[_H][_m] != null) {\n contents[_H] = de_ChangeSetHooks((0, import_smithy_client.getArrayIfSingleItem)(output[_H][_m]), context);\n }\n if (output[_S] != null) {\n contents[_S] = (0, import_smithy_client.expectString)(output[_S]);\n }\n if (output[_NT] != null) {\n contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);\n }\n if (output[_SI] != null) {\n contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);\n }\n if (output[_SN] != null) {\n contents[_SN] = (0, import_smithy_client.expectString)(output[_SN]);\n }\n return contents;\n}, \"de_DescribeChangeSetHooksOutput\");\nvar de_DescribeChangeSetOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_CSN] != null) {\n contents[_CSN] = (0, import_smithy_client.expectString)(output[_CSN]);\n }\n if (output[_CSIh] != null) {\n contents[_CSIh] = (0, import_smithy_client.expectString)(output[_CSIh]);\n }\n if (output[_SI] != null) {\n contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);\n }\n if (output[_SN] != null) {\n contents[_SN] = (0, import_smithy_client.expectString)(output[_SN]);\n }\n if (output[_D] != null) {\n contents[_D] = (0, import_smithy_client.expectString)(output[_D]);\n }\n if (output.Parameters === \"\") {\n contents[_P] = [];\n } else if (output[_P] != null && output[_P][_m] != null) {\n contents[_P] = de_Parameters((0, import_smithy_client.getArrayIfSingleItem)(output[_P][_m]), context);\n }\n if (output[_CTr] != null) {\n contents[_CTr] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_CTr]));\n }\n if (output[_ES] != null) {\n contents[_ES] = (0, import_smithy_client.expectString)(output[_ES]);\n }\n if (output[_S] != null) {\n contents[_S] = (0, import_smithy_client.expectString)(output[_S]);\n }\n if (output[_SRt] != null) {\n contents[_SRt] = (0, import_smithy_client.expectString)(output[_SRt]);\n }\n if (output.NotificationARNs === \"\") {\n contents[_NARN] = [];\n } else if (output[_NARN] != null && output[_NARN][_m] != null) {\n contents[_NARN] = de_NotificationARNs((0, import_smithy_client.getArrayIfSingleItem)(output[_NARN][_m]), context);\n }\n if (output[_RC] != null) {\n contents[_RC] = de_RollbackConfiguration(output[_RC], context);\n }\n if (output.Capabilities === \"\") {\n contents[_C] = [];\n } else if (output[_C] != null && output[_C][_m] != null) {\n contents[_C] = de_Capabilities((0, import_smithy_client.getArrayIfSingleItem)(output[_C][_m]), context);\n }\n if (output.Tags === \"\") {\n contents[_Ta] = [];\n } else if (output[_Ta] != null && output[_Ta][_m] != null) {\n contents[_Ta] = de_Tags((0, import_smithy_client.getArrayIfSingleItem)(output[_Ta][_m]), context);\n }\n if (output.Changes === \"\") {\n contents[_Ch] = [];\n } else if (output[_Ch] != null && output[_Ch][_m] != null) {\n contents[_Ch] = de_Changes((0, import_smithy_client.getArrayIfSingleItem)(output[_Ch][_m]), context);\n }\n if (output[_NT] != null) {\n contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);\n }\n if (output[_INS] != null) {\n contents[_INS] = (0, import_smithy_client.parseBoolean)(output[_INS]);\n }\n if (output[_PCSI] != null) {\n contents[_PCSI] = (0, import_smithy_client.expectString)(output[_PCSI]);\n }\n if (output[_RCSI] != null) {\n contents[_RCSI] = (0, import_smithy_client.expectString)(output[_RCSI]);\n }\n if (output[_OSF] != null) {\n contents[_OSF] = (0, import_smithy_client.expectString)(output[_OSF]);\n }\n if (output[_IER] != null) {\n contents[_IER] = (0, import_smithy_client.parseBoolean)(output[_IER]);\n }\n return contents;\n}, \"de_DescribeChangeSetOutput\");\nvar de_DescribeGeneratedTemplateOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_GTI] != null) {\n contents[_GTI] = (0, import_smithy_client.expectString)(output[_GTI]);\n }\n if (output[_GTN] != null) {\n contents[_GTN] = (0, import_smithy_client.expectString)(output[_GTN]);\n }\n if (output.Resources === \"\") {\n contents[_R] = [];\n } else if (output[_R] != null && output[_R][_m] != null) {\n contents[_R] = de_ResourceDetails((0, import_smithy_client.getArrayIfSingleItem)(output[_R][_m]), context);\n }\n if (output[_S] != null) {\n contents[_S] = (0, import_smithy_client.expectString)(output[_S]);\n }\n if (output[_SRt] != null) {\n contents[_SRt] = (0, import_smithy_client.expectString)(output[_SRt]);\n }\n if (output[_CTr] != null) {\n contents[_CTr] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_CTr]));\n }\n if (output[_LUT] != null) {\n contents[_LUT] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LUT]));\n }\n if (output[_Pr] != null) {\n contents[_Pr] = de_TemplateProgress(output[_Pr], context);\n }\n if (output[_SI] != null) {\n contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);\n }\n if (output[_TC] != null) {\n contents[_TC] = de_TemplateConfiguration(output[_TC], context);\n }\n if (output[_TW] != null) {\n contents[_TW] = (0, import_smithy_client.strictParseInt32)(output[_TW]);\n }\n return contents;\n}, \"de_DescribeGeneratedTemplateOutput\");\nvar de_DescribeOrganizationsAccessOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_S] != null) {\n contents[_S] = (0, import_smithy_client.expectString)(output[_S]);\n }\n return contents;\n}, \"de_DescribeOrganizationsAccessOutput\");\nvar de_DescribePublisherOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_PI] != null) {\n contents[_PI] = (0, import_smithy_client.expectString)(output[_PI]);\n }\n if (output[_PS] != null) {\n contents[_PS] = (0, import_smithy_client.expectString)(output[_PS]);\n }\n if (output[_IPd] != null) {\n contents[_IPd] = (0, import_smithy_client.expectString)(output[_IPd]);\n }\n if (output[_PP] != null) {\n contents[_PP] = (0, import_smithy_client.expectString)(output[_PP]);\n }\n return contents;\n}, \"de_DescribePublisherOutput\");\nvar de_DescribeResourceScanOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_RSI] != null) {\n contents[_RSI] = (0, import_smithy_client.expectString)(output[_RSI]);\n }\n if (output[_S] != null) {\n contents[_S] = (0, import_smithy_client.expectString)(output[_S]);\n }\n if (output[_SRt] != null) {\n contents[_SRt] = (0, import_smithy_client.expectString)(output[_SRt]);\n }\n if (output[_ST] != null) {\n contents[_ST] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_ST]));\n }\n if (output[_ET] != null) {\n contents[_ET] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_ET]));\n }\n if (output[_PC] != null) {\n contents[_PC] = (0, import_smithy_client.strictParseFloat)(output[_PC]);\n }\n if (output.ResourceTypes === \"\") {\n contents[_RTe] = [];\n } else if (output[_RTe] != null && output[_RTe][_m] != null) {\n contents[_RTe] = de_ResourceTypes((0, import_smithy_client.getArrayIfSingleItem)(output[_RTe][_m]), context);\n }\n if (output[_RSes] != null) {\n contents[_RSes] = (0, import_smithy_client.strictParseInt32)(output[_RSes]);\n }\n if (output[_RRes] != null) {\n contents[_RRes] = (0, import_smithy_client.strictParseInt32)(output[_RRes]);\n }\n if (output.ScanFilters === \"\") {\n contents[_SF] = [];\n } else if (output[_SF] != null && output[_SF][_m] != null) {\n contents[_SF] = de_ScanFilters((0, import_smithy_client.getArrayIfSingleItem)(output[_SF][_m]), context);\n }\n return contents;\n}, \"de_DescribeResourceScanOutput\");\nvar de_DescribeStackDriftDetectionStatusOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_SI] != null) {\n contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);\n }\n if (output[_SDDI] != null) {\n contents[_SDDI] = (0, import_smithy_client.expectString)(output[_SDDI]);\n }\n if (output[_SDS] != null) {\n contents[_SDS] = (0, import_smithy_client.expectString)(output[_SDS]);\n }\n if (output[_DSet] != null) {\n contents[_DSet] = (0, import_smithy_client.expectString)(output[_DSet]);\n }\n if (output[_DSRet] != null) {\n contents[_DSRet] = (0, import_smithy_client.expectString)(output[_DSRet]);\n }\n if (output[_DSRC] != null) {\n contents[_DSRC] = (0, import_smithy_client.strictParseInt32)(output[_DSRC]);\n }\n if (output[_Ti] != null) {\n contents[_Ti] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_Ti]));\n }\n return contents;\n}, \"de_DescribeStackDriftDetectionStatusOutput\");\nvar de_DescribeStackEventsOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output.StackEvents === \"\") {\n contents[_SE] = [];\n } else if (output[_SE] != null && output[_SE][_m] != null) {\n contents[_SE] = de_StackEvents((0, import_smithy_client.getArrayIfSingleItem)(output[_SE][_m]), context);\n }\n if (output[_NT] != null) {\n contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);\n }\n return contents;\n}, \"de_DescribeStackEventsOutput\");\nvar de_DescribeStackInstanceOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_SIta] != null) {\n contents[_SIta] = de_StackInstance(output[_SIta], context);\n }\n return contents;\n}, \"de_DescribeStackInstanceOutput\");\nvar de_DescribeStackRefactorOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_D] != null) {\n contents[_D] = (0, import_smithy_client.expectString)(output[_D]);\n }\n if (output[_SRI] != null) {\n contents[_SRI] = (0, import_smithy_client.expectString)(output[_SRI]);\n }\n if (output.StackIds === \"\") {\n contents[_SIt] = [];\n } else if (output[_SIt] != null && output[_SIt][_m] != null) {\n contents[_SIt] = de_StackIds((0, import_smithy_client.getArrayIfSingleItem)(output[_SIt][_m]), context);\n }\n if (output[_ES] != null) {\n contents[_ES] = (0, import_smithy_client.expectString)(output[_ES]);\n }\n if (output[_ESRx] != null) {\n contents[_ESRx] = (0, import_smithy_client.expectString)(output[_ESRx]);\n }\n if (output[_S] != null) {\n contents[_S] = (0, import_smithy_client.expectString)(output[_S]);\n }\n if (output[_SRt] != null) {\n contents[_SRt] = (0, import_smithy_client.expectString)(output[_SRt]);\n }\n return contents;\n}, \"de_DescribeStackRefactorOutput\");\nvar de_DescribeStackResourceDriftsOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output.StackResourceDrifts === \"\") {\n contents[_SRD] = [];\n } else if (output[_SRD] != null && output[_SRD][_m] != null) {\n contents[_SRD] = de_StackResourceDrifts((0, import_smithy_client.getArrayIfSingleItem)(output[_SRD][_m]), context);\n }\n if (output[_NT] != null) {\n contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);\n }\n return contents;\n}, \"de_DescribeStackResourceDriftsOutput\");\nvar de_DescribeStackResourceOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_SRDt] != null) {\n contents[_SRDt] = de_StackResourceDetail(output[_SRDt], context);\n }\n return contents;\n}, \"de_DescribeStackResourceOutput\");\nvar de_DescribeStackResourcesOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output.StackResources === \"\") {\n contents[_SRta] = [];\n } else if (output[_SRta] != null && output[_SRta][_m] != null) {\n contents[_SRta] = de_StackResources((0, import_smithy_client.getArrayIfSingleItem)(output[_SRta][_m]), context);\n }\n return contents;\n}, \"de_DescribeStackResourcesOutput\");\nvar de_DescribeStackSetOperationOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_SSO] != null) {\n contents[_SSO] = de_StackSetOperation(output[_SSO], context);\n }\n return contents;\n}, \"de_DescribeStackSetOperationOutput\");\nvar de_DescribeStackSetOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_SS] != null) {\n contents[_SS] = de_StackSet(output[_SS], context);\n }\n return contents;\n}, \"de_DescribeStackSetOutput\");\nvar de_DescribeStacksOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output.Stacks === \"\") {\n contents[_St] = [];\n } else if (output[_St] != null && output[_St][_m] != null) {\n contents[_St] = de_Stacks((0, import_smithy_client.getArrayIfSingleItem)(output[_St][_m]), context);\n }\n if (output[_NT] != null) {\n contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);\n }\n return contents;\n}, \"de_DescribeStacksOutput\");\nvar de_DescribeTypeOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_Ar] != null) {\n contents[_Ar] = (0, import_smithy_client.expectString)(output[_Ar]);\n }\n if (output[_T] != null) {\n contents[_T] = (0, import_smithy_client.expectString)(output[_T]);\n }\n if (output[_TN] != null) {\n contents[_TN] = (0, import_smithy_client.expectString)(output[_TN]);\n }\n if (output[_DVI] != null) {\n contents[_DVI] = (0, import_smithy_client.expectString)(output[_DVI]);\n }\n if (output[_IDV] != null) {\n contents[_IDV] = (0, import_smithy_client.parseBoolean)(output[_IDV]);\n }\n if (output[_TTS] != null) {\n contents[_TTS] = (0, import_smithy_client.expectString)(output[_TTS]);\n }\n if (output[_TTSD] != null) {\n contents[_TTSD] = (0, import_smithy_client.expectString)(output[_TTSD]);\n }\n if (output[_D] != null) {\n contents[_D] = (0, import_smithy_client.expectString)(output[_D]);\n }\n if (output[_Sc] != null) {\n contents[_Sc] = (0, import_smithy_client.expectString)(output[_Sc]);\n }\n if (output[_PTr] != null) {\n contents[_PTr] = (0, import_smithy_client.expectString)(output[_PTr]);\n }\n if (output[_DSep] != null) {\n contents[_DSep] = (0, import_smithy_client.expectString)(output[_DSep]);\n }\n if (output[_LC] != null) {\n contents[_LC] = de_LoggingConfig(output[_LC], context);\n }\n if (output.RequiredActivatedTypes === \"\") {\n contents[_RAT] = [];\n } else if (output[_RAT] != null && output[_RAT][_m] != null) {\n contents[_RAT] = de_RequiredActivatedTypes((0, import_smithy_client.getArrayIfSingleItem)(output[_RAT][_m]), context);\n }\n if (output[_ERA] != null) {\n contents[_ERA] = (0, import_smithy_client.expectString)(output[_ERA]);\n }\n if (output[_Vi] != null) {\n contents[_Vi] = (0, import_smithy_client.expectString)(output[_Vi]);\n }\n if (output[_SU] != null) {\n contents[_SU] = (0, import_smithy_client.expectString)(output[_SU]);\n }\n if (output[_DU] != null) {\n contents[_DU] = (0, import_smithy_client.expectString)(output[_DU]);\n }\n if (output[_LU] != null) {\n contents[_LU] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LU]));\n }\n if (output[_TCi] != null) {\n contents[_TCi] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_TCi]));\n }\n if (output[_CSo] != null) {\n contents[_CSo] = (0, import_smithy_client.expectString)(output[_CSo]);\n }\n if (output[_PI] != null) {\n contents[_PI] = (0, import_smithy_client.expectString)(output[_PI]);\n }\n if (output[_OTN] != null) {\n contents[_OTN] = (0, import_smithy_client.expectString)(output[_OTN]);\n }\n if (output[_OTA] != null) {\n contents[_OTA] = (0, import_smithy_client.expectString)(output[_OTA]);\n }\n if (output[_PVN] != null) {\n contents[_PVN] = (0, import_smithy_client.expectString)(output[_PVN]);\n }\n if (output[_LPV] != null) {\n contents[_LPV] = (0, import_smithy_client.expectString)(output[_LPV]);\n }\n if (output[_IA] != null) {\n contents[_IA] = (0, import_smithy_client.parseBoolean)(output[_IA]);\n }\n if (output[_AU] != null) {\n contents[_AU] = (0, import_smithy_client.parseBoolean)(output[_AU]);\n }\n return contents;\n}, \"de_DescribeTypeOutput\");\nvar de_DescribeTypeRegistrationOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_PSr] != null) {\n contents[_PSr] = (0, import_smithy_client.expectString)(output[_PSr]);\n }\n if (output[_D] != null) {\n contents[_D] = (0, import_smithy_client.expectString)(output[_D]);\n }\n if (output[_TA] != null) {\n contents[_TA] = (0, import_smithy_client.expectString)(output[_TA]);\n }\n if (output[_TVA] != null) {\n contents[_TVA] = (0, import_smithy_client.expectString)(output[_TVA]);\n }\n return contents;\n}, \"de_DescribeTypeRegistrationOutput\");\nvar de_DetectStackDriftOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_SDDI] != null) {\n contents[_SDDI] = (0, import_smithy_client.expectString)(output[_SDDI]);\n }\n return contents;\n}, \"de_DetectStackDriftOutput\");\nvar de_DetectStackResourceDriftOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_SRDta] != null) {\n contents[_SRDta] = de_StackResourceDrift(output[_SRDta], context);\n }\n return contents;\n}, \"de_DetectStackResourceDriftOutput\");\nvar de_DetectStackSetDriftOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_OI] != null) {\n contents[_OI] = (0, import_smithy_client.expectString)(output[_OI]);\n }\n return contents;\n}, \"de_DetectStackSetDriftOutput\");\nvar de_EstimateTemplateCostOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_U] != null) {\n contents[_U] = (0, import_smithy_client.expectString)(output[_U]);\n }\n return contents;\n}, \"de_EstimateTemplateCostOutput\");\nvar de_ExecuteChangeSetOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n return contents;\n}, \"de_ExecuteChangeSetOutput\");\nvar de_Export = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_ESI] != null) {\n contents[_ESI] = (0, import_smithy_client.expectString)(output[_ESI]);\n }\n if (output[_N] != null) {\n contents[_N] = (0, import_smithy_client.expectString)(output[_N]);\n }\n if (output[_Val] != null) {\n contents[_Val] = (0, import_smithy_client.expectString)(output[_Val]);\n }\n return contents;\n}, \"de_Export\");\nvar de_Exports = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_Export(entry, context);\n });\n}, \"de_Exports\");\nvar de_GeneratedTemplateNotFoundException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_M] != null) {\n contents[_M] = (0, import_smithy_client.expectString)(output[_M]);\n }\n return contents;\n}, \"de_GeneratedTemplateNotFoundException\");\nvar de_GetGeneratedTemplateOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_S] != null) {\n contents[_S] = (0, import_smithy_client.expectString)(output[_S]);\n }\n if (output[_TB] != null) {\n contents[_TB] = (0, import_smithy_client.expectString)(output[_TB]);\n }\n return contents;\n}, \"de_GetGeneratedTemplateOutput\");\nvar de_GetStackPolicyOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_SPB] != null) {\n contents[_SPB] = (0, import_smithy_client.expectString)(output[_SPB]);\n }\n return contents;\n}, \"de_GetStackPolicyOutput\");\nvar de_GetTemplateOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_TB] != null) {\n contents[_TB] = (0, import_smithy_client.expectString)(output[_TB]);\n }\n if (output.StagesAvailable === \"\") {\n contents[_SA] = [];\n } else if (output[_SA] != null && output[_SA][_m] != null) {\n contents[_SA] = de_StageList((0, import_smithy_client.getArrayIfSingleItem)(output[_SA][_m]), context);\n }\n return contents;\n}, \"de_GetTemplateOutput\");\nvar de_GetTemplateSummaryOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output.Parameters === \"\") {\n contents[_P] = [];\n } else if (output[_P] != null && output[_P][_m] != null) {\n contents[_P] = de_ParameterDeclarations((0, import_smithy_client.getArrayIfSingleItem)(output[_P][_m]), context);\n }\n if (output[_D] != null) {\n contents[_D] = (0, import_smithy_client.expectString)(output[_D]);\n }\n if (output.Capabilities === \"\") {\n contents[_C] = [];\n } else if (output[_C] != null && output[_C][_m] != null) {\n contents[_C] = de_Capabilities((0, import_smithy_client.getArrayIfSingleItem)(output[_C][_m]), context);\n }\n if (output[_CR] != null) {\n contents[_CR] = (0, import_smithy_client.expectString)(output[_CR]);\n }\n if (output.ResourceTypes === \"\") {\n contents[_RTe] = [];\n } else if (output[_RTe] != null && output[_RTe][_m] != null) {\n contents[_RTe] = de_ResourceTypes((0, import_smithy_client.getArrayIfSingleItem)(output[_RTe][_m]), context);\n }\n if (output[_V] != null) {\n contents[_V] = (0, import_smithy_client.expectString)(output[_V]);\n }\n if (output[_Me] != null) {\n contents[_Me] = (0, import_smithy_client.expectString)(output[_Me]);\n }\n if (output.DeclaredTransforms === \"\") {\n contents[_DTec] = [];\n } else if (output[_DTec] != null && output[_DTec][_m] != null) {\n contents[_DTec] = de_TransformsList((0, import_smithy_client.getArrayIfSingleItem)(output[_DTec][_m]), context);\n }\n if (output.ResourceIdentifierSummaries === \"\") {\n contents[_RIS] = [];\n } else if (output[_RIS] != null && output[_RIS][_m] != null) {\n contents[_RIS] = de_ResourceIdentifierSummaries((0, import_smithy_client.getArrayIfSingleItem)(output[_RIS][_m]), context);\n }\n if (output[_W] != null) {\n contents[_W] = de_Warnings(output[_W], context);\n }\n return contents;\n}, \"de_GetTemplateSummaryOutput\");\nvar de_HookResultNotFoundException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_M] != null) {\n contents[_M] = (0, import_smithy_client.expectString)(output[_M]);\n }\n return contents;\n}, \"de_HookResultNotFoundException\");\nvar de_HookResultSummaries = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_HookResultSummary(entry, context);\n });\n}, \"de_HookResultSummaries\");\nvar de_HookResultSummary = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_IP] != null) {\n contents[_IP] = (0, import_smithy_client.expectString)(output[_IP]);\n }\n if (output[_FM] != null) {\n contents[_FM] = (0, import_smithy_client.expectString)(output[_FM]);\n }\n if (output[_TN] != null) {\n contents[_TN] = (0, import_smithy_client.expectString)(output[_TN]);\n }\n if (output[_TVI] != null) {\n contents[_TVI] = (0, import_smithy_client.expectString)(output[_TVI]);\n }\n if (output[_TCVI] != null) {\n contents[_TCVI] = (0, import_smithy_client.expectString)(output[_TCVI]);\n }\n if (output[_S] != null) {\n contents[_S] = (0, import_smithy_client.expectString)(output[_S]);\n }\n if (output[_HSR] != null) {\n contents[_HSR] = (0, import_smithy_client.expectString)(output[_HSR]);\n }\n return contents;\n}, \"de_HookResultSummary\");\nvar de_Imports = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return (0, import_smithy_client.expectString)(entry);\n });\n}, \"de_Imports\");\nvar de_ImportStacksToStackSetOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_OI] != null) {\n contents[_OI] = (0, import_smithy_client.expectString)(output[_OI]);\n }\n return contents;\n}, \"de_ImportStacksToStackSetOutput\");\nvar de_InsufficientCapabilitiesException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_M] != null) {\n contents[_M] = (0, import_smithy_client.expectString)(output[_M]);\n }\n return contents;\n}, \"de_InsufficientCapabilitiesException\");\nvar de_InvalidChangeSetStatusException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_M] != null) {\n contents[_M] = (0, import_smithy_client.expectString)(output[_M]);\n }\n return contents;\n}, \"de_InvalidChangeSetStatusException\");\nvar de_InvalidOperationException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_M] != null) {\n contents[_M] = (0, import_smithy_client.expectString)(output[_M]);\n }\n return contents;\n}, \"de_InvalidOperationException\");\nvar de_InvalidStateTransitionException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_M] != null) {\n contents[_M] = (0, import_smithy_client.expectString)(output[_M]);\n }\n return contents;\n}, \"de_InvalidStateTransitionException\");\nvar de_JazzResourceIdentifierProperties = /* @__PURE__ */ __name((output, context) => {\n return output.reduce((acc, pair) => {\n if (pair[\"value\"] === null) {\n return acc;\n }\n acc[pair[\"key\"]] = (0, import_smithy_client.expectString)(pair[\"value\"]);\n return acc;\n }, {});\n}, \"de_JazzResourceIdentifierProperties\");\nvar de_LimitExceededException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_M] != null) {\n contents[_M] = (0, import_smithy_client.expectString)(output[_M]);\n }\n return contents;\n}, \"de_LimitExceededException\");\nvar de_ListChangeSetsOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output.Summaries === \"\") {\n contents[_Su] = [];\n } else if (output[_Su] != null && output[_Su][_m] != null) {\n contents[_Su] = de_ChangeSetSummaries((0, import_smithy_client.getArrayIfSingleItem)(output[_Su][_m]), context);\n }\n if (output[_NT] != null) {\n contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);\n }\n return contents;\n}, \"de_ListChangeSetsOutput\");\nvar de_ListExportsOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output.Exports === \"\") {\n contents[_Ex] = [];\n } else if (output[_Ex] != null && output[_Ex][_m] != null) {\n contents[_Ex] = de_Exports((0, import_smithy_client.getArrayIfSingleItem)(output[_Ex][_m]), context);\n }\n if (output[_NT] != null) {\n contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);\n }\n return contents;\n}, \"de_ListExportsOutput\");\nvar de_ListGeneratedTemplatesOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output.Summaries === \"\") {\n contents[_Su] = [];\n } else if (output[_Su] != null && output[_Su][_m] != null) {\n contents[_Su] = de_TemplateSummaries((0, import_smithy_client.getArrayIfSingleItem)(output[_Su][_m]), context);\n }\n if (output[_NT] != null) {\n contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);\n }\n return contents;\n}, \"de_ListGeneratedTemplatesOutput\");\nvar de_ListHookResultsOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_TTa] != null) {\n contents[_TTa] = (0, import_smithy_client.expectString)(output[_TTa]);\n }\n if (output[_TI] != null) {\n contents[_TI] = (0, import_smithy_client.expectString)(output[_TI]);\n }\n if (output.HookResults === \"\") {\n contents[_HR] = [];\n } else if (output[_HR] != null && output[_HR][_m] != null) {\n contents[_HR] = de_HookResultSummaries((0, import_smithy_client.getArrayIfSingleItem)(output[_HR][_m]), context);\n }\n if (output[_NT] != null) {\n contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);\n }\n return contents;\n}, \"de_ListHookResultsOutput\");\nvar de_ListImportsOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output.Imports === \"\") {\n contents[_Im] = [];\n } else if (output[_Im] != null && output[_Im][_m] != null) {\n contents[_Im] = de_Imports((0, import_smithy_client.getArrayIfSingleItem)(output[_Im][_m]), context);\n }\n if (output[_NT] != null) {\n contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);\n }\n return contents;\n}, \"de_ListImportsOutput\");\nvar de_ListResourceScanRelatedResourcesOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output.RelatedResources === \"\") {\n contents[_RRel] = [];\n } else if (output[_RRel] != null && output[_RRel][_m] != null) {\n contents[_RRel] = de_RelatedResources((0, import_smithy_client.getArrayIfSingleItem)(output[_RRel][_m]), context);\n }\n if (output[_NT] != null) {\n contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);\n }\n return contents;\n}, \"de_ListResourceScanRelatedResourcesOutput\");\nvar de_ListResourceScanResourcesOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output.Resources === \"\") {\n contents[_R] = [];\n } else if (output[_R] != null && output[_R][_m] != null) {\n contents[_R] = de_ScannedResources((0, import_smithy_client.getArrayIfSingleItem)(output[_R][_m]), context);\n }\n if (output[_NT] != null) {\n contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);\n }\n return contents;\n}, \"de_ListResourceScanResourcesOutput\");\nvar de_ListResourceScansOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output.ResourceScanSummaries === \"\") {\n contents[_RSS] = [];\n } else if (output[_RSS] != null && output[_RSS][_m] != null) {\n contents[_RSS] = de_ResourceScanSummaries((0, import_smithy_client.getArrayIfSingleItem)(output[_RSS][_m]), context);\n }\n if (output[_NT] != null) {\n contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);\n }\n return contents;\n}, \"de_ListResourceScansOutput\");\nvar de_ListStackInstanceResourceDriftsOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output.Summaries === \"\") {\n contents[_Su] = [];\n } else if (output[_Su] != null && output[_Su][_m] != null) {\n contents[_Su] = de_StackInstanceResourceDriftsSummaries((0, import_smithy_client.getArrayIfSingleItem)(output[_Su][_m]), context);\n }\n if (output[_NT] != null) {\n contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);\n }\n return contents;\n}, \"de_ListStackInstanceResourceDriftsOutput\");\nvar de_ListStackInstancesOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output.Summaries === \"\") {\n contents[_Su] = [];\n } else if (output[_Su] != null && output[_Su][_m] != null) {\n contents[_Su] = de_StackInstanceSummaries((0, import_smithy_client.getArrayIfSingleItem)(output[_Su][_m]), context);\n }\n if (output[_NT] != null) {\n contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);\n }\n return contents;\n}, \"de_ListStackInstancesOutput\");\nvar de_ListStackRefactorActionsOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output.StackRefactorActions === \"\") {\n contents[_SRA] = [];\n } else if (output[_SRA] != null && output[_SRA][_m] != null) {\n contents[_SRA] = de_StackRefactorActions((0, import_smithy_client.getArrayIfSingleItem)(output[_SRA][_m]), context);\n }\n if (output[_NT] != null) {\n contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);\n }\n return contents;\n}, \"de_ListStackRefactorActionsOutput\");\nvar de_ListStackRefactorsOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output.StackRefactorSummaries === \"\") {\n contents[_SRSt] = [];\n } else if (output[_SRSt] != null && output[_SRSt][_m] != null) {\n contents[_SRSt] = de_StackRefactorSummaries((0, import_smithy_client.getArrayIfSingleItem)(output[_SRSt][_m]), context);\n }\n if (output[_NT] != null) {\n contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);\n }\n return contents;\n}, \"de_ListStackRefactorsOutput\");\nvar de_ListStackResourcesOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output.StackResourceSummaries === \"\") {\n contents[_SRSta] = [];\n } else if (output[_SRSta] != null && output[_SRSta][_m] != null) {\n contents[_SRSta] = de_StackResourceSummaries((0, import_smithy_client.getArrayIfSingleItem)(output[_SRSta][_m]), context);\n }\n if (output[_NT] != null) {\n contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);\n }\n return contents;\n}, \"de_ListStackResourcesOutput\");\nvar de_ListStackSetAutoDeploymentTargetsOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output.Summaries === \"\") {\n contents[_Su] = [];\n } else if (output[_Su] != null && output[_Su][_m] != null) {\n contents[_Su] = de_StackSetAutoDeploymentTargetSummaries((0, import_smithy_client.getArrayIfSingleItem)(output[_Su][_m]), context);\n }\n if (output[_NT] != null) {\n contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);\n }\n return contents;\n}, \"de_ListStackSetAutoDeploymentTargetsOutput\");\nvar de_ListStackSetOperationResultsOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output.Summaries === \"\") {\n contents[_Su] = [];\n } else if (output[_Su] != null && output[_Su][_m] != null) {\n contents[_Su] = de_StackSetOperationResultSummaries((0, import_smithy_client.getArrayIfSingleItem)(output[_Su][_m]), context);\n }\n if (output[_NT] != null) {\n contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);\n }\n return contents;\n}, \"de_ListStackSetOperationResultsOutput\");\nvar de_ListStackSetOperationsOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output.Summaries === \"\") {\n contents[_Su] = [];\n } else if (output[_Su] != null && output[_Su][_m] != null) {\n contents[_Su] = de_StackSetOperationSummaries((0, import_smithy_client.getArrayIfSingleItem)(output[_Su][_m]), context);\n }\n if (output[_NT] != null) {\n contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);\n }\n return contents;\n}, \"de_ListStackSetOperationsOutput\");\nvar de_ListStackSetsOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output.Summaries === \"\") {\n contents[_Su] = [];\n } else if (output[_Su] != null && output[_Su][_m] != null) {\n contents[_Su] = de_StackSetSummaries((0, import_smithy_client.getArrayIfSingleItem)(output[_Su][_m]), context);\n }\n if (output[_NT] != null) {\n contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);\n }\n return contents;\n}, \"de_ListStackSetsOutput\");\nvar de_ListStacksOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output.StackSummaries === \"\") {\n contents[_SSt] = [];\n } else if (output[_SSt] != null && output[_SSt][_m] != null) {\n contents[_SSt] = de_StackSummaries((0, import_smithy_client.getArrayIfSingleItem)(output[_SSt][_m]), context);\n }\n if (output[_NT] != null) {\n contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);\n }\n return contents;\n}, \"de_ListStacksOutput\");\nvar de_ListTypeRegistrationsOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output.RegistrationTokenList === \"\") {\n contents[_RTL] = [];\n } else if (output[_RTL] != null && output[_RTL][_m] != null) {\n contents[_RTL] = de_RegistrationTokenList((0, import_smithy_client.getArrayIfSingleItem)(output[_RTL][_m]), context);\n }\n if (output[_NT] != null) {\n contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);\n }\n return contents;\n}, \"de_ListTypeRegistrationsOutput\");\nvar de_ListTypesOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output.TypeSummaries === \"\") {\n contents[_TSy] = [];\n } else if (output[_TSy] != null && output[_TSy][_m] != null) {\n contents[_TSy] = de_TypeSummaries((0, import_smithy_client.getArrayIfSingleItem)(output[_TSy][_m]), context);\n }\n if (output[_NT] != null) {\n contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);\n }\n return contents;\n}, \"de_ListTypesOutput\");\nvar de_ListTypeVersionsOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output.TypeVersionSummaries === \"\") {\n contents[_TVS] = [];\n } else if (output[_TVS] != null && output[_TVS][_m] != null) {\n contents[_TVS] = de_TypeVersionSummaries((0, import_smithy_client.getArrayIfSingleItem)(output[_TVS][_m]), context);\n }\n if (output[_NT] != null) {\n contents[_NT] = (0, import_smithy_client.expectString)(output[_NT]);\n }\n return contents;\n}, \"de_ListTypeVersionsOutput\");\nvar de_LoggingConfig = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_LRA] != null) {\n contents[_LRA] = (0, import_smithy_client.expectString)(output[_LRA]);\n }\n if (output[_LGN] != null) {\n contents[_LGN] = (0, import_smithy_client.expectString)(output[_LGN]);\n }\n return contents;\n}, \"de_LoggingConfig\");\nvar de_LogicalResourceIds = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return (0, import_smithy_client.expectString)(entry);\n });\n}, \"de_LogicalResourceIds\");\nvar de_ManagedExecution = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_Act] != null) {\n contents[_Act] = (0, import_smithy_client.parseBoolean)(output[_Act]);\n }\n return contents;\n}, \"de_ManagedExecution\");\nvar de_ModuleInfo = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_TH] != null) {\n contents[_TH] = (0, import_smithy_client.expectString)(output[_TH]);\n }\n if (output[_LIH] != null) {\n contents[_LIH] = (0, import_smithy_client.expectString)(output[_LIH]);\n }\n return contents;\n}, \"de_ModuleInfo\");\nvar de_NameAlreadyExistsException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_M] != null) {\n contents[_M] = (0, import_smithy_client.expectString)(output[_M]);\n }\n return contents;\n}, \"de_NameAlreadyExistsException\");\nvar de_NotificationARNs = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return (0, import_smithy_client.expectString)(entry);\n });\n}, \"de_NotificationARNs\");\nvar de_OperationIdAlreadyExistsException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_M] != null) {\n contents[_M] = (0, import_smithy_client.expectString)(output[_M]);\n }\n return contents;\n}, \"de_OperationIdAlreadyExistsException\");\nvar de_OperationInProgressException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_M] != null) {\n contents[_M] = (0, import_smithy_client.expectString)(output[_M]);\n }\n return contents;\n}, \"de_OperationInProgressException\");\nvar de_OperationNotFoundException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_M] != null) {\n contents[_M] = (0, import_smithy_client.expectString)(output[_M]);\n }\n return contents;\n}, \"de_OperationNotFoundException\");\nvar de_OperationStatusCheckFailedException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_M] != null) {\n contents[_M] = (0, import_smithy_client.expectString)(output[_M]);\n }\n return contents;\n}, \"de_OperationStatusCheckFailedException\");\nvar de_OrganizationalUnitIdList = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return (0, import_smithy_client.expectString)(entry);\n });\n}, \"de_OrganizationalUnitIdList\");\nvar de_Output = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_OK] != null) {\n contents[_OK] = (0, import_smithy_client.expectString)(output[_OK]);\n }\n if (output[_OV] != null) {\n contents[_OV] = (0, import_smithy_client.expectString)(output[_OV]);\n }\n if (output[_D] != null) {\n contents[_D] = (0, import_smithy_client.expectString)(output[_D]);\n }\n if (output[_EN] != null) {\n contents[_EN] = (0, import_smithy_client.expectString)(output[_EN]);\n }\n return contents;\n}, \"de_Output\");\nvar de_Outputs = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_Output(entry, context);\n });\n}, \"de_Outputs\");\nvar de_Parameter = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_PK] != null) {\n contents[_PK] = (0, import_smithy_client.expectString)(output[_PK]);\n }\n if (output[_PV] != null) {\n contents[_PV] = (0, import_smithy_client.expectString)(output[_PV]);\n }\n if (output[_UPV] != null) {\n contents[_UPV] = (0, import_smithy_client.parseBoolean)(output[_UPV]);\n }\n if (output[_RV] != null) {\n contents[_RV] = (0, import_smithy_client.expectString)(output[_RV]);\n }\n return contents;\n}, \"de_Parameter\");\nvar de_ParameterConstraints = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output.AllowedValues === \"\") {\n contents[_AV] = [];\n } else if (output[_AV] != null && output[_AV][_m] != null) {\n contents[_AV] = de_AllowedValues((0, import_smithy_client.getArrayIfSingleItem)(output[_AV][_m]), context);\n }\n return contents;\n}, \"de_ParameterConstraints\");\nvar de_ParameterDeclaration = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_PK] != null) {\n contents[_PK] = (0, import_smithy_client.expectString)(output[_PK]);\n }\n if (output[_DV] != null) {\n contents[_DV] = (0, import_smithy_client.expectString)(output[_DV]);\n }\n if (output[_PTa] != null) {\n contents[_PTa] = (0, import_smithy_client.expectString)(output[_PTa]);\n }\n if (output[_NE] != null) {\n contents[_NE] = (0, import_smithy_client.parseBoolean)(output[_NE]);\n }\n if (output[_D] != null) {\n contents[_D] = (0, import_smithy_client.expectString)(output[_D]);\n }\n if (output[_PCa] != null) {\n contents[_PCa] = de_ParameterConstraints(output[_PCa], context);\n }\n return contents;\n}, \"de_ParameterDeclaration\");\nvar de_ParameterDeclarations = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_ParameterDeclaration(entry, context);\n });\n}, \"de_ParameterDeclarations\");\nvar de_Parameters = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_Parameter(entry, context);\n });\n}, \"de_Parameters\");\nvar de_PhysicalResourceIdContext = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_PhysicalResourceIdContextKeyValuePair(entry, context);\n });\n}, \"de_PhysicalResourceIdContext\");\nvar de_PhysicalResourceIdContextKeyValuePair = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_K] != null) {\n contents[_K] = (0, import_smithy_client.expectString)(output[_K]);\n }\n if (output[_Val] != null) {\n contents[_Val] = (0, import_smithy_client.expectString)(output[_Val]);\n }\n return contents;\n}, \"de_PhysicalResourceIdContextKeyValuePair\");\nvar de_PropertyDifference = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_PPr] != null) {\n contents[_PPr] = (0, import_smithy_client.expectString)(output[_PPr]);\n }\n if (output[_EV] != null) {\n contents[_EV] = (0, import_smithy_client.expectString)(output[_EV]);\n }\n if (output[_AVc] != null) {\n contents[_AVc] = (0, import_smithy_client.expectString)(output[_AVc]);\n }\n if (output[_DTi] != null) {\n contents[_DTi] = (0, import_smithy_client.expectString)(output[_DTi]);\n }\n return contents;\n}, \"de_PropertyDifference\");\nvar de_PropertyDifferences = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_PropertyDifference(entry, context);\n });\n}, \"de_PropertyDifferences\");\nvar de_PublishTypeOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_PTA] != null) {\n contents[_PTA] = (0, import_smithy_client.expectString)(output[_PTA]);\n }\n return contents;\n}, \"de_PublishTypeOutput\");\nvar de_RecordHandlerProgressOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n return contents;\n}, \"de_RecordHandlerProgressOutput\");\nvar de_RegionList = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return (0, import_smithy_client.expectString)(entry);\n });\n}, \"de_RegionList\");\nvar de_RegisterPublisherOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_PI] != null) {\n contents[_PI] = (0, import_smithy_client.expectString)(output[_PI]);\n }\n return contents;\n}, \"de_RegisterPublisherOutput\");\nvar de_RegisterTypeOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_RTeg] != null) {\n contents[_RTeg] = (0, import_smithy_client.expectString)(output[_RTeg]);\n }\n return contents;\n}, \"de_RegisterTypeOutput\");\nvar de_RegistrationTokenList = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return (0, import_smithy_client.expectString)(entry);\n });\n}, \"de_RegistrationTokenList\");\nvar de_RelatedResources = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_ScannedResource(entry, context);\n });\n}, \"de_RelatedResources\");\nvar de_RequiredActivatedType = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_TNA] != null) {\n contents[_TNA] = (0, import_smithy_client.expectString)(output[_TNA]);\n }\n if (output[_OTN] != null) {\n contents[_OTN] = (0, import_smithy_client.expectString)(output[_OTN]);\n }\n if (output[_PI] != null) {\n contents[_PI] = (0, import_smithy_client.expectString)(output[_PI]);\n }\n if (output.SupportedMajorVersions === \"\") {\n contents[_SMV] = [];\n } else if (output[_SMV] != null && output[_SMV][_m] != null) {\n contents[_SMV] = de_SupportedMajorVersions((0, import_smithy_client.getArrayIfSingleItem)(output[_SMV][_m]), context);\n }\n return contents;\n}, \"de_RequiredActivatedType\");\nvar de_RequiredActivatedTypes = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_RequiredActivatedType(entry, context);\n });\n}, \"de_RequiredActivatedTypes\");\nvar de_ResourceChange = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_PA] != null) {\n contents[_PA] = (0, import_smithy_client.expectString)(output[_PA]);\n }\n if (output[_A] != null) {\n contents[_A] = (0, import_smithy_client.expectString)(output[_A]);\n }\n if (output[_LRI] != null) {\n contents[_LRI] = (0, import_smithy_client.expectString)(output[_LRI]);\n }\n if (output[_PRI] != null) {\n contents[_PRI] = (0, import_smithy_client.expectString)(output[_PRI]);\n }\n if (output[_RTes] != null) {\n contents[_RTes] = (0, import_smithy_client.expectString)(output[_RTes]);\n }\n if (output[_Rep] != null) {\n contents[_Rep] = (0, import_smithy_client.expectString)(output[_Rep]);\n }\n if (output.Scope === \"\") {\n contents[_Sco] = [];\n } else if (output[_Sco] != null && output[_Sco][_m] != null) {\n contents[_Sco] = de_Scope((0, import_smithy_client.getArrayIfSingleItem)(output[_Sco][_m]), context);\n }\n if (output.Details === \"\") {\n contents[_Det] = [];\n } else if (output[_Det] != null && output[_Det][_m] != null) {\n contents[_Det] = de_ResourceChangeDetails((0, import_smithy_client.getArrayIfSingleItem)(output[_Det][_m]), context);\n }\n if (output[_CSIh] != null) {\n contents[_CSIh] = (0, import_smithy_client.expectString)(output[_CSIh]);\n }\n if (output[_MI] != null) {\n contents[_MI] = de_ModuleInfo(output[_MI], context);\n }\n if (output[_BC] != null) {\n contents[_BC] = (0, import_smithy_client.expectString)(output[_BC]);\n }\n if (output[_AC] != null) {\n contents[_AC] = (0, import_smithy_client.expectString)(output[_AC]);\n }\n return contents;\n}, \"de_ResourceChange\");\nvar de_ResourceChangeDetail = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_Tar] != null) {\n contents[_Tar] = de_ResourceTargetDefinition(output[_Tar], context);\n }\n if (output[_Ev] != null) {\n contents[_Ev] = (0, import_smithy_client.expectString)(output[_Ev]);\n }\n if (output[_CSh] != null) {\n contents[_CSh] = (0, import_smithy_client.expectString)(output[_CSh]);\n }\n if (output[_CE] != null) {\n contents[_CE] = (0, import_smithy_client.expectString)(output[_CE]);\n }\n return contents;\n}, \"de_ResourceChangeDetail\");\nvar de_ResourceChangeDetails = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_ResourceChangeDetail(entry, context);\n });\n}, \"de_ResourceChangeDetails\");\nvar de_ResourceDetail = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_RTes] != null) {\n contents[_RTes] = (0, import_smithy_client.expectString)(output[_RTes]);\n }\n if (output[_LRI] != null) {\n contents[_LRI] = (0, import_smithy_client.expectString)(output[_LRI]);\n }\n if (output.ResourceIdentifier === \"\") {\n contents[_RI] = {};\n } else if (output[_RI] != null && output[_RI][_e] != null) {\n contents[_RI] = de_ResourceIdentifierProperties((0, import_smithy_client.getArrayIfSingleItem)(output[_RI][_e]), context);\n }\n if (output[_RSeso] != null) {\n contents[_RSeso] = (0, import_smithy_client.expectString)(output[_RSeso]);\n }\n if (output[_RSR] != null) {\n contents[_RSR] = (0, import_smithy_client.expectString)(output[_RSR]);\n }\n if (output.Warnings === \"\") {\n contents[_W] = [];\n } else if (output[_W] != null && output[_W][_m] != null) {\n contents[_W] = de_WarningDetails((0, import_smithy_client.getArrayIfSingleItem)(output[_W][_m]), context);\n }\n return contents;\n}, \"de_ResourceDetail\");\nvar de_ResourceDetails = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_ResourceDetail(entry, context);\n });\n}, \"de_ResourceDetails\");\nvar de_ResourceIdentifierProperties = /* @__PURE__ */ __name((output, context) => {\n return output.reduce((acc, pair) => {\n if (pair[\"value\"] === null) {\n return acc;\n }\n acc[pair[\"key\"]] = (0, import_smithy_client.expectString)(pair[\"value\"]);\n return acc;\n }, {});\n}, \"de_ResourceIdentifierProperties\");\nvar de_ResourceIdentifiers = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return (0, import_smithy_client.expectString)(entry);\n });\n}, \"de_ResourceIdentifiers\");\nvar de_ResourceIdentifierSummaries = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_ResourceIdentifierSummary(entry, context);\n });\n}, \"de_ResourceIdentifierSummaries\");\nvar de_ResourceIdentifierSummary = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_RTes] != null) {\n contents[_RTes] = (0, import_smithy_client.expectString)(output[_RTes]);\n }\n if (output.LogicalResourceIds === \"\") {\n contents[_LRIo] = [];\n } else if (output[_LRIo] != null && output[_LRIo][_m] != null) {\n contents[_LRIo] = de_LogicalResourceIds((0, import_smithy_client.getArrayIfSingleItem)(output[_LRIo][_m]), context);\n }\n if (output.ResourceIdentifiers === \"\") {\n contents[_RIe] = [];\n } else if (output[_RIe] != null && output[_RIe][_m] != null) {\n contents[_RIe] = de_ResourceIdentifiers((0, import_smithy_client.getArrayIfSingleItem)(output[_RIe][_m]), context);\n }\n return contents;\n}, \"de_ResourceIdentifierSummary\");\nvar de_ResourceLocation = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_SN] != null) {\n contents[_SN] = (0, import_smithy_client.expectString)(output[_SN]);\n }\n if (output[_LRI] != null) {\n contents[_LRI] = (0, import_smithy_client.expectString)(output[_LRI]);\n }\n return contents;\n}, \"de_ResourceLocation\");\nvar de_ResourceMapping = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_So] != null) {\n contents[_So] = de_ResourceLocation(output[_So], context);\n }\n if (output[_De] != null) {\n contents[_De] = de_ResourceLocation(output[_De], context);\n }\n return contents;\n}, \"de_ResourceMapping\");\nvar de_ResourceScanInProgressException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_M] != null) {\n contents[_M] = (0, import_smithy_client.expectString)(output[_M]);\n }\n return contents;\n}, \"de_ResourceScanInProgressException\");\nvar de_ResourceScanLimitExceededException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_M] != null) {\n contents[_M] = (0, import_smithy_client.expectString)(output[_M]);\n }\n return contents;\n}, \"de_ResourceScanLimitExceededException\");\nvar de_ResourceScanNotFoundException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_M] != null) {\n contents[_M] = (0, import_smithy_client.expectString)(output[_M]);\n }\n return contents;\n}, \"de_ResourceScanNotFoundException\");\nvar de_ResourceScanSummaries = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_ResourceScanSummary(entry, context);\n });\n}, \"de_ResourceScanSummaries\");\nvar de_ResourceScanSummary = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_RSI] != null) {\n contents[_RSI] = (0, import_smithy_client.expectString)(output[_RSI]);\n }\n if (output[_S] != null) {\n contents[_S] = (0, import_smithy_client.expectString)(output[_S]);\n }\n if (output[_SRt] != null) {\n contents[_SRt] = (0, import_smithy_client.expectString)(output[_SRt]);\n }\n if (output[_ST] != null) {\n contents[_ST] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_ST]));\n }\n if (output[_ET] != null) {\n contents[_ET] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_ET]));\n }\n if (output[_PC] != null) {\n contents[_PC] = (0, import_smithy_client.strictParseFloat)(output[_PC]);\n }\n if (output[_STc] != null) {\n contents[_STc] = (0, import_smithy_client.expectString)(output[_STc]);\n }\n return contents;\n}, \"de_ResourceScanSummary\");\nvar de_ResourceTargetDefinition = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_At] != null) {\n contents[_At] = (0, import_smithy_client.expectString)(output[_At]);\n }\n if (output[_N] != null) {\n contents[_N] = (0, import_smithy_client.expectString)(output[_N]);\n }\n if (output[_RReq] != null) {\n contents[_RReq] = (0, import_smithy_client.expectString)(output[_RReq]);\n }\n if (output[_Pa] != null) {\n contents[_Pa] = (0, import_smithy_client.expectString)(output[_Pa]);\n }\n if (output[_BV] != null) {\n contents[_BV] = (0, import_smithy_client.expectString)(output[_BV]);\n }\n if (output[_AVf] != null) {\n contents[_AVf] = (0, import_smithy_client.expectString)(output[_AVf]);\n }\n if (output[_ACT] != null) {\n contents[_ACT] = (0, import_smithy_client.expectString)(output[_ACT]);\n }\n return contents;\n}, \"de_ResourceTargetDefinition\");\nvar de_ResourceTypeFilters = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return (0, import_smithy_client.expectString)(entry);\n });\n}, \"de_ResourceTypeFilters\");\nvar de_ResourceTypes = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return (0, import_smithy_client.expectString)(entry);\n });\n}, \"de_ResourceTypes\");\nvar de_RollbackConfiguration = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output.RollbackTriggers === \"\") {\n contents[_RTo] = [];\n } else if (output[_RTo] != null && output[_RTo][_m] != null) {\n contents[_RTo] = de_RollbackTriggers((0, import_smithy_client.getArrayIfSingleItem)(output[_RTo][_m]), context);\n }\n if (output[_MTIM] != null) {\n contents[_MTIM] = (0, import_smithy_client.strictParseInt32)(output[_MTIM]);\n }\n return contents;\n}, \"de_RollbackConfiguration\");\nvar de_RollbackStackOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_SI] != null) {\n contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);\n }\n return contents;\n}, \"de_RollbackStackOutput\");\nvar de_RollbackTrigger = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_Ar] != null) {\n contents[_Ar] = (0, import_smithy_client.expectString)(output[_Ar]);\n }\n if (output[_T] != null) {\n contents[_T] = (0, import_smithy_client.expectString)(output[_T]);\n }\n return contents;\n}, \"de_RollbackTrigger\");\nvar de_RollbackTriggers = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_RollbackTrigger(entry, context);\n });\n}, \"de_RollbackTriggers\");\nvar de_ScanFilter = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output.Types === \"\") {\n contents[_Ty] = [];\n } else if (output[_Ty] != null && output[_Ty][_m] != null) {\n contents[_Ty] = de_ResourceTypeFilters((0, import_smithy_client.getArrayIfSingleItem)(output[_Ty][_m]), context);\n }\n return contents;\n}, \"de_ScanFilter\");\nvar de_ScanFilters = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_ScanFilter(entry, context);\n });\n}, \"de_ScanFilters\");\nvar de_ScannedResource = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_RTes] != null) {\n contents[_RTes] = (0, import_smithy_client.expectString)(output[_RTes]);\n }\n if (output.ResourceIdentifier === \"\") {\n contents[_RI] = {};\n } else if (output[_RI] != null && output[_RI][_e] != null) {\n contents[_RI] = de_JazzResourceIdentifierProperties((0, import_smithy_client.getArrayIfSingleItem)(output[_RI][_e]), context);\n }\n if (output[_MBS] != null) {\n contents[_MBS] = (0, import_smithy_client.parseBoolean)(output[_MBS]);\n }\n return contents;\n}, \"de_ScannedResource\");\nvar de_ScannedResources = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_ScannedResource(entry, context);\n });\n}, \"de_ScannedResources\");\nvar de_Scope = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return (0, import_smithy_client.expectString)(entry);\n });\n}, \"de_Scope\");\nvar de_SetTypeConfigurationOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_CAonf] != null) {\n contents[_CAonf] = (0, import_smithy_client.expectString)(output[_CAonf]);\n }\n return contents;\n}, \"de_SetTypeConfigurationOutput\");\nvar de_SetTypeDefaultVersionOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n return contents;\n}, \"de_SetTypeDefaultVersionOutput\");\nvar de_Stack = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_SI] != null) {\n contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);\n }\n if (output[_SN] != null) {\n contents[_SN] = (0, import_smithy_client.expectString)(output[_SN]);\n }\n if (output[_CSIh] != null) {\n contents[_CSIh] = (0, import_smithy_client.expectString)(output[_CSIh]);\n }\n if (output[_D] != null) {\n contents[_D] = (0, import_smithy_client.expectString)(output[_D]);\n }\n if (output.Parameters === \"\") {\n contents[_P] = [];\n } else if (output[_P] != null && output[_P][_m] != null) {\n contents[_P] = de_Parameters((0, import_smithy_client.getArrayIfSingleItem)(output[_P][_m]), context);\n }\n if (output[_CTr] != null) {\n contents[_CTr] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_CTr]));\n }\n if (output[_DTel] != null) {\n contents[_DTel] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_DTel]));\n }\n if (output[_LUT] != null) {\n contents[_LUT] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LUT]));\n }\n if (output[_RC] != null) {\n contents[_RC] = de_RollbackConfiguration(output[_RC], context);\n }\n if (output[_SSta] != null) {\n contents[_SSta] = (0, import_smithy_client.expectString)(output[_SSta]);\n }\n if (output[_SSR] != null) {\n contents[_SSR] = (0, import_smithy_client.expectString)(output[_SSR]);\n }\n if (output[_DR] != null) {\n contents[_DR] = (0, import_smithy_client.parseBoolean)(output[_DR]);\n }\n if (output.NotificationARNs === \"\") {\n contents[_NARN] = [];\n } else if (output[_NARN] != null && output[_NARN][_m] != null) {\n contents[_NARN] = de_NotificationARNs((0, import_smithy_client.getArrayIfSingleItem)(output[_NARN][_m]), context);\n }\n if (output[_TIM] != null) {\n contents[_TIM] = (0, import_smithy_client.strictParseInt32)(output[_TIM]);\n }\n if (output.Capabilities === \"\") {\n contents[_C] = [];\n } else if (output[_C] != null && output[_C][_m] != null) {\n contents[_C] = de_Capabilities((0, import_smithy_client.getArrayIfSingleItem)(output[_C][_m]), context);\n }\n if (output.Outputs === \"\") {\n contents[_O] = [];\n } else if (output[_O] != null && output[_O][_m] != null) {\n contents[_O] = de_Outputs((0, import_smithy_client.getArrayIfSingleItem)(output[_O][_m]), context);\n }\n if (output[_RARN] != null) {\n contents[_RARN] = (0, import_smithy_client.expectString)(output[_RARN]);\n }\n if (output.Tags === \"\") {\n contents[_Ta] = [];\n } else if (output[_Ta] != null && output[_Ta][_m] != null) {\n contents[_Ta] = de_Tags((0, import_smithy_client.getArrayIfSingleItem)(output[_Ta][_m]), context);\n }\n if (output[_ETP] != null) {\n contents[_ETP] = (0, import_smithy_client.parseBoolean)(output[_ETP]);\n }\n if (output[_PIa] != null) {\n contents[_PIa] = (0, import_smithy_client.expectString)(output[_PIa]);\n }\n if (output[_RIo] != null) {\n contents[_RIo] = (0, import_smithy_client.expectString)(output[_RIo]);\n }\n if (output[_DI] != null) {\n contents[_DI] = de_StackDriftInformation(output[_DI], context);\n }\n if (output[_REOC] != null) {\n contents[_REOC] = (0, import_smithy_client.parseBoolean)(output[_REOC]);\n }\n if (output[_DM] != null) {\n contents[_DM] = (0, import_smithy_client.expectString)(output[_DM]);\n }\n if (output[_DSeta] != null) {\n contents[_DSeta] = (0, import_smithy_client.expectString)(output[_DSeta]);\n }\n return contents;\n}, \"de_Stack\");\nvar de_StackDriftInformation = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_SDS] != null) {\n contents[_SDS] = (0, import_smithy_client.expectString)(output[_SDS]);\n }\n if (output[_LCT] != null) {\n contents[_LCT] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LCT]));\n }\n return contents;\n}, \"de_StackDriftInformation\");\nvar de_StackDriftInformationSummary = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_SDS] != null) {\n contents[_SDS] = (0, import_smithy_client.expectString)(output[_SDS]);\n }\n if (output[_LCT] != null) {\n contents[_LCT] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LCT]));\n }\n return contents;\n}, \"de_StackDriftInformationSummary\");\nvar de_StackEvent = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_SI] != null) {\n contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);\n }\n if (output[_EI] != null) {\n contents[_EI] = (0, import_smithy_client.expectString)(output[_EI]);\n }\n if (output[_SN] != null) {\n contents[_SN] = (0, import_smithy_client.expectString)(output[_SN]);\n }\n if (output[_LRI] != null) {\n contents[_LRI] = (0, import_smithy_client.expectString)(output[_LRI]);\n }\n if (output[_PRI] != null) {\n contents[_PRI] = (0, import_smithy_client.expectString)(output[_PRI]);\n }\n if (output[_RTes] != null) {\n contents[_RTes] = (0, import_smithy_client.expectString)(output[_RTes]);\n }\n if (output[_Ti] != null) {\n contents[_Ti] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_Ti]));\n }\n if (output[_RSeso] != null) {\n contents[_RSeso] = (0, import_smithy_client.expectString)(output[_RSeso]);\n }\n if (output[_RSR] != null) {\n contents[_RSR] = (0, import_smithy_client.expectString)(output[_RSR]);\n }\n if (output[_RPe] != null) {\n contents[_RPe] = (0, import_smithy_client.expectString)(output[_RPe]);\n }\n if (output[_CRT] != null) {\n contents[_CRT] = (0, import_smithy_client.expectString)(output[_CRT]);\n }\n if (output[_HT] != null) {\n contents[_HT] = (0, import_smithy_client.expectString)(output[_HT]);\n }\n if (output[_HS] != null) {\n contents[_HS] = (0, import_smithy_client.expectString)(output[_HS]);\n }\n if (output[_HSR] != null) {\n contents[_HSR] = (0, import_smithy_client.expectString)(output[_HSR]);\n }\n if (output[_HIP] != null) {\n contents[_HIP] = (0, import_smithy_client.expectString)(output[_HIP]);\n }\n if (output[_HFM] != null) {\n contents[_HFM] = (0, import_smithy_client.expectString)(output[_HFM]);\n }\n if (output[_DSeta] != null) {\n contents[_DSeta] = (0, import_smithy_client.expectString)(output[_DSeta]);\n }\n return contents;\n}, \"de_StackEvent\");\nvar de_StackEvents = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_StackEvent(entry, context);\n });\n}, \"de_StackEvents\");\nvar de_StackIds = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return (0, import_smithy_client.expectString)(entry);\n });\n}, \"de_StackIds\");\nvar de_StackInstance = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_SSI] != null) {\n contents[_SSI] = (0, import_smithy_client.expectString)(output[_SSI]);\n }\n if (output[_Reg] != null) {\n contents[_Reg] = (0, import_smithy_client.expectString)(output[_Reg]);\n }\n if (output[_Acc] != null) {\n contents[_Acc] = (0, import_smithy_client.expectString)(output[_Acc]);\n }\n if (output[_SI] != null) {\n contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);\n }\n if (output.ParameterOverrides === \"\") {\n contents[_PO] = [];\n } else if (output[_PO] != null && output[_PO][_m] != null) {\n contents[_PO] = de_Parameters((0, import_smithy_client.getArrayIfSingleItem)(output[_PO][_m]), context);\n }\n if (output[_S] != null) {\n contents[_S] = (0, import_smithy_client.expectString)(output[_S]);\n }\n if (output[_SIS] != null) {\n contents[_SIS] = de_StackInstanceComprehensiveStatus(output[_SIS], context);\n }\n if (output[_SRt] != null) {\n contents[_SRt] = (0, import_smithy_client.expectString)(output[_SRt]);\n }\n if (output[_OUIr] != null) {\n contents[_OUIr] = (0, import_smithy_client.expectString)(output[_OUIr]);\n }\n if (output[_DSr] != null) {\n contents[_DSr] = (0, import_smithy_client.expectString)(output[_DSr]);\n }\n if (output[_LDCT] != null) {\n contents[_LDCT] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LDCT]));\n }\n if (output[_LOI] != null) {\n contents[_LOI] = (0, import_smithy_client.expectString)(output[_LOI]);\n }\n return contents;\n}, \"de_StackInstance\");\nvar de_StackInstanceComprehensiveStatus = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_DSeta] != null) {\n contents[_DSeta] = (0, import_smithy_client.expectString)(output[_DSeta]);\n }\n return contents;\n}, \"de_StackInstanceComprehensiveStatus\");\nvar de_StackInstanceNotFoundException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_M] != null) {\n contents[_M] = (0, import_smithy_client.expectString)(output[_M]);\n }\n return contents;\n}, \"de_StackInstanceNotFoundException\");\nvar de_StackInstanceResourceDriftsSummaries = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_StackInstanceResourceDriftsSummary(entry, context);\n });\n}, \"de_StackInstanceResourceDriftsSummaries\");\nvar de_StackInstanceResourceDriftsSummary = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_SI] != null) {\n contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);\n }\n if (output[_LRI] != null) {\n contents[_LRI] = (0, import_smithy_client.expectString)(output[_LRI]);\n }\n if (output[_PRI] != null) {\n contents[_PRI] = (0, import_smithy_client.expectString)(output[_PRI]);\n }\n if (output.PhysicalResourceIdContext === \"\") {\n contents[_PRIC] = [];\n } else if (output[_PRIC] != null && output[_PRIC][_m] != null) {\n contents[_PRIC] = de_PhysicalResourceIdContext((0, import_smithy_client.getArrayIfSingleItem)(output[_PRIC][_m]), context);\n }\n if (output[_RTes] != null) {\n contents[_RTes] = (0, import_smithy_client.expectString)(output[_RTes]);\n }\n if (output.PropertyDifferences === \"\") {\n contents[_PD] = [];\n } else if (output[_PD] != null && output[_PD][_m] != null) {\n contents[_PD] = de_PropertyDifferences((0, import_smithy_client.getArrayIfSingleItem)(output[_PD][_m]), context);\n }\n if (output[_SRDS] != null) {\n contents[_SRDS] = (0, import_smithy_client.expectString)(output[_SRDS]);\n }\n if (output[_Ti] != null) {\n contents[_Ti] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_Ti]));\n }\n return contents;\n}, \"de_StackInstanceResourceDriftsSummary\");\nvar de_StackInstanceSummaries = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_StackInstanceSummary(entry, context);\n });\n}, \"de_StackInstanceSummaries\");\nvar de_StackInstanceSummary = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_SSI] != null) {\n contents[_SSI] = (0, import_smithy_client.expectString)(output[_SSI]);\n }\n if (output[_Reg] != null) {\n contents[_Reg] = (0, import_smithy_client.expectString)(output[_Reg]);\n }\n if (output[_Acc] != null) {\n contents[_Acc] = (0, import_smithy_client.expectString)(output[_Acc]);\n }\n if (output[_SI] != null) {\n contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);\n }\n if (output[_S] != null) {\n contents[_S] = (0, import_smithy_client.expectString)(output[_S]);\n }\n if (output[_SRt] != null) {\n contents[_SRt] = (0, import_smithy_client.expectString)(output[_SRt]);\n }\n if (output[_SIS] != null) {\n contents[_SIS] = de_StackInstanceComprehensiveStatus(output[_SIS], context);\n }\n if (output[_OUIr] != null) {\n contents[_OUIr] = (0, import_smithy_client.expectString)(output[_OUIr]);\n }\n if (output[_DSr] != null) {\n contents[_DSr] = (0, import_smithy_client.expectString)(output[_DSr]);\n }\n if (output[_LDCT] != null) {\n contents[_LDCT] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LDCT]));\n }\n if (output[_LOI] != null) {\n contents[_LOI] = (0, import_smithy_client.expectString)(output[_LOI]);\n }\n return contents;\n}, \"de_StackInstanceSummary\");\nvar de_StackNotFoundException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_M] != null) {\n contents[_M] = (0, import_smithy_client.expectString)(output[_M]);\n }\n return contents;\n}, \"de_StackNotFoundException\");\nvar de_StackRefactorAction = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_A] != null) {\n contents[_A] = (0, import_smithy_client.expectString)(output[_A]);\n }\n if (output[_En] != null) {\n contents[_En] = (0, import_smithy_client.expectString)(output[_En]);\n }\n if (output[_PRI] != null) {\n contents[_PRI] = (0, import_smithy_client.expectString)(output[_PRI]);\n }\n if (output[_RI] != null) {\n contents[_RI] = (0, import_smithy_client.expectString)(output[_RI]);\n }\n if (output[_D] != null) {\n contents[_D] = (0, import_smithy_client.expectString)(output[_D]);\n }\n if (output[_Dete] != null) {\n contents[_Dete] = (0, import_smithy_client.expectString)(output[_Dete]);\n }\n if (output[_DRe] != null) {\n contents[_DRe] = (0, import_smithy_client.expectString)(output[_DRe]);\n }\n if (output.TagResources === \"\") {\n contents[_TR] = [];\n } else if (output[_TR] != null && output[_TR][_m] != null) {\n contents[_TR] = de_StackRefactorTagResources((0, import_smithy_client.getArrayIfSingleItem)(output[_TR][_m]), context);\n }\n if (output.UntagResources === \"\") {\n contents[_UR] = [];\n } else if (output[_UR] != null && output[_UR][_m] != null) {\n contents[_UR] = de_StackRefactorUntagResources((0, import_smithy_client.getArrayIfSingleItem)(output[_UR][_m]), context);\n }\n if (output[_RMes] != null) {\n contents[_RMes] = de_ResourceMapping(output[_RMes], context);\n }\n return contents;\n}, \"de_StackRefactorAction\");\nvar de_StackRefactorActions = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_StackRefactorAction(entry, context);\n });\n}, \"de_StackRefactorActions\");\nvar de_StackRefactorNotFoundException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_M] != null) {\n contents[_M] = (0, import_smithy_client.expectString)(output[_M]);\n }\n return contents;\n}, \"de_StackRefactorNotFoundException\");\nvar de_StackRefactorSummaries = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_StackRefactorSummary(entry, context);\n });\n}, \"de_StackRefactorSummaries\");\nvar de_StackRefactorSummary = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_SRI] != null) {\n contents[_SRI] = (0, import_smithy_client.expectString)(output[_SRI]);\n }\n if (output[_D] != null) {\n contents[_D] = (0, import_smithy_client.expectString)(output[_D]);\n }\n if (output[_ES] != null) {\n contents[_ES] = (0, import_smithy_client.expectString)(output[_ES]);\n }\n if (output[_ESRx] != null) {\n contents[_ESRx] = (0, import_smithy_client.expectString)(output[_ESRx]);\n }\n if (output[_S] != null) {\n contents[_S] = (0, import_smithy_client.expectString)(output[_S]);\n }\n if (output[_SRt] != null) {\n contents[_SRt] = (0, import_smithy_client.expectString)(output[_SRt]);\n }\n return contents;\n}, \"de_StackRefactorSummary\");\nvar de_StackRefactorTagResources = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_Tag(entry, context);\n });\n}, \"de_StackRefactorTagResources\");\nvar de_StackRefactorUntagResources = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return (0, import_smithy_client.expectString)(entry);\n });\n}, \"de_StackRefactorUntagResources\");\nvar de_StackResource = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_SN] != null) {\n contents[_SN] = (0, import_smithy_client.expectString)(output[_SN]);\n }\n if (output[_SI] != null) {\n contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);\n }\n if (output[_LRI] != null) {\n contents[_LRI] = (0, import_smithy_client.expectString)(output[_LRI]);\n }\n if (output[_PRI] != null) {\n contents[_PRI] = (0, import_smithy_client.expectString)(output[_PRI]);\n }\n if (output[_RTes] != null) {\n contents[_RTes] = (0, import_smithy_client.expectString)(output[_RTes]);\n }\n if (output[_Ti] != null) {\n contents[_Ti] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_Ti]));\n }\n if (output[_RSeso] != null) {\n contents[_RSeso] = (0, import_smithy_client.expectString)(output[_RSeso]);\n }\n if (output[_RSR] != null) {\n contents[_RSR] = (0, import_smithy_client.expectString)(output[_RSR]);\n }\n if (output[_D] != null) {\n contents[_D] = (0, import_smithy_client.expectString)(output[_D]);\n }\n if (output[_DI] != null) {\n contents[_DI] = de_StackResourceDriftInformation(output[_DI], context);\n }\n if (output[_MI] != null) {\n contents[_MI] = de_ModuleInfo(output[_MI], context);\n }\n return contents;\n}, \"de_StackResource\");\nvar de_StackResourceDetail = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_SN] != null) {\n contents[_SN] = (0, import_smithy_client.expectString)(output[_SN]);\n }\n if (output[_SI] != null) {\n contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);\n }\n if (output[_LRI] != null) {\n contents[_LRI] = (0, import_smithy_client.expectString)(output[_LRI]);\n }\n if (output[_PRI] != null) {\n contents[_PRI] = (0, import_smithy_client.expectString)(output[_PRI]);\n }\n if (output[_RTes] != null) {\n contents[_RTes] = (0, import_smithy_client.expectString)(output[_RTes]);\n }\n if (output[_LUTa] != null) {\n contents[_LUTa] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LUTa]));\n }\n if (output[_RSeso] != null) {\n contents[_RSeso] = (0, import_smithy_client.expectString)(output[_RSeso]);\n }\n if (output[_RSR] != null) {\n contents[_RSR] = (0, import_smithy_client.expectString)(output[_RSR]);\n }\n if (output[_D] != null) {\n contents[_D] = (0, import_smithy_client.expectString)(output[_D]);\n }\n if (output[_Me] != null) {\n contents[_Me] = (0, import_smithy_client.expectString)(output[_Me]);\n }\n if (output[_DI] != null) {\n contents[_DI] = de_StackResourceDriftInformation(output[_DI], context);\n }\n if (output[_MI] != null) {\n contents[_MI] = de_ModuleInfo(output[_MI], context);\n }\n return contents;\n}, \"de_StackResourceDetail\");\nvar de_StackResourceDrift = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_SI] != null) {\n contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);\n }\n if (output[_LRI] != null) {\n contents[_LRI] = (0, import_smithy_client.expectString)(output[_LRI]);\n }\n if (output[_PRI] != null) {\n contents[_PRI] = (0, import_smithy_client.expectString)(output[_PRI]);\n }\n if (output.PhysicalResourceIdContext === \"\") {\n contents[_PRIC] = [];\n } else if (output[_PRIC] != null && output[_PRIC][_m] != null) {\n contents[_PRIC] = de_PhysicalResourceIdContext((0, import_smithy_client.getArrayIfSingleItem)(output[_PRIC][_m]), context);\n }\n if (output[_RTes] != null) {\n contents[_RTes] = (0, import_smithy_client.expectString)(output[_RTes]);\n }\n if (output[_EP] != null) {\n contents[_EP] = (0, import_smithy_client.expectString)(output[_EP]);\n }\n if (output[_AP] != null) {\n contents[_AP] = (0, import_smithy_client.expectString)(output[_AP]);\n }\n if (output.PropertyDifferences === \"\") {\n contents[_PD] = [];\n } else if (output[_PD] != null && output[_PD][_m] != null) {\n contents[_PD] = de_PropertyDifferences((0, import_smithy_client.getArrayIfSingleItem)(output[_PD][_m]), context);\n }\n if (output[_SRDS] != null) {\n contents[_SRDS] = (0, import_smithy_client.expectString)(output[_SRDS]);\n }\n if (output[_Ti] != null) {\n contents[_Ti] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_Ti]));\n }\n if (output[_MI] != null) {\n contents[_MI] = de_ModuleInfo(output[_MI], context);\n }\n return contents;\n}, \"de_StackResourceDrift\");\nvar de_StackResourceDriftInformation = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_SRDS] != null) {\n contents[_SRDS] = (0, import_smithy_client.expectString)(output[_SRDS]);\n }\n if (output[_LCT] != null) {\n contents[_LCT] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LCT]));\n }\n return contents;\n}, \"de_StackResourceDriftInformation\");\nvar de_StackResourceDriftInformationSummary = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_SRDS] != null) {\n contents[_SRDS] = (0, import_smithy_client.expectString)(output[_SRDS]);\n }\n if (output[_LCT] != null) {\n contents[_LCT] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LCT]));\n }\n return contents;\n}, \"de_StackResourceDriftInformationSummary\");\nvar de_StackResourceDrifts = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_StackResourceDrift(entry, context);\n });\n}, \"de_StackResourceDrifts\");\nvar de_StackResources = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_StackResource(entry, context);\n });\n}, \"de_StackResources\");\nvar de_StackResourceSummaries = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_StackResourceSummary(entry, context);\n });\n}, \"de_StackResourceSummaries\");\nvar de_StackResourceSummary = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_LRI] != null) {\n contents[_LRI] = (0, import_smithy_client.expectString)(output[_LRI]);\n }\n if (output[_PRI] != null) {\n contents[_PRI] = (0, import_smithy_client.expectString)(output[_PRI]);\n }\n if (output[_RTes] != null) {\n contents[_RTes] = (0, import_smithy_client.expectString)(output[_RTes]);\n }\n if (output[_LUTa] != null) {\n contents[_LUTa] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LUTa]));\n }\n if (output[_RSeso] != null) {\n contents[_RSeso] = (0, import_smithy_client.expectString)(output[_RSeso]);\n }\n if (output[_RSR] != null) {\n contents[_RSR] = (0, import_smithy_client.expectString)(output[_RSR]);\n }\n if (output[_DI] != null) {\n contents[_DI] = de_StackResourceDriftInformationSummary(output[_DI], context);\n }\n if (output[_MI] != null) {\n contents[_MI] = de_ModuleInfo(output[_MI], context);\n }\n return contents;\n}, \"de_StackResourceSummary\");\nvar de_Stacks = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_Stack(entry, context);\n });\n}, \"de_Stacks\");\nvar de_StackSet = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_SSN] != null) {\n contents[_SSN] = (0, import_smithy_client.expectString)(output[_SSN]);\n }\n if (output[_SSI] != null) {\n contents[_SSI] = (0, import_smithy_client.expectString)(output[_SSI]);\n }\n if (output[_D] != null) {\n contents[_D] = (0, import_smithy_client.expectString)(output[_D]);\n }\n if (output[_S] != null) {\n contents[_S] = (0, import_smithy_client.expectString)(output[_S]);\n }\n if (output[_TB] != null) {\n contents[_TB] = (0, import_smithy_client.expectString)(output[_TB]);\n }\n if (output.Parameters === \"\") {\n contents[_P] = [];\n } else if (output[_P] != null && output[_P][_m] != null) {\n contents[_P] = de_Parameters((0, import_smithy_client.getArrayIfSingleItem)(output[_P][_m]), context);\n }\n if (output.Capabilities === \"\") {\n contents[_C] = [];\n } else if (output[_C] != null && output[_C][_m] != null) {\n contents[_C] = de_Capabilities((0, import_smithy_client.getArrayIfSingleItem)(output[_C][_m]), context);\n }\n if (output.Tags === \"\") {\n contents[_Ta] = [];\n } else if (output[_Ta] != null && output[_Ta][_m] != null) {\n contents[_Ta] = de_Tags((0, import_smithy_client.getArrayIfSingleItem)(output[_Ta][_m]), context);\n }\n if (output[_SSARN] != null) {\n contents[_SSARN] = (0, import_smithy_client.expectString)(output[_SSARN]);\n }\n if (output[_ARARN] != null) {\n contents[_ARARN] = (0, import_smithy_client.expectString)(output[_ARARN]);\n }\n if (output[_ERN] != null) {\n contents[_ERN] = (0, import_smithy_client.expectString)(output[_ERN]);\n }\n if (output[_SSDDD] != null) {\n contents[_SSDDD] = de_StackSetDriftDetectionDetails(output[_SSDDD], context);\n }\n if (output[_AD] != null) {\n contents[_AD] = de_AutoDeployment(output[_AD], context);\n }\n if (output[_PM] != null) {\n contents[_PM] = (0, import_smithy_client.expectString)(output[_PM]);\n }\n if (output.OrganizationalUnitIds === \"\") {\n contents[_OUI] = [];\n } else if (output[_OUI] != null && output[_OUI][_m] != null) {\n contents[_OUI] = de_OrganizationalUnitIdList((0, import_smithy_client.getArrayIfSingleItem)(output[_OUI][_m]), context);\n }\n if (output[_ME] != null) {\n contents[_ME] = de_ManagedExecution(output[_ME], context);\n }\n if (output.Regions === \"\") {\n contents[_Re] = [];\n } else if (output[_Re] != null && output[_Re][_m] != null) {\n contents[_Re] = de_RegionList((0, import_smithy_client.getArrayIfSingleItem)(output[_Re][_m]), context);\n }\n return contents;\n}, \"de_StackSet\");\nvar de_StackSetAutoDeploymentTargetSummaries = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_StackSetAutoDeploymentTargetSummary(entry, context);\n });\n}, \"de_StackSetAutoDeploymentTargetSummaries\");\nvar de_StackSetAutoDeploymentTargetSummary = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_OUIr] != null) {\n contents[_OUIr] = (0, import_smithy_client.expectString)(output[_OUIr]);\n }\n if (output.Regions === \"\") {\n contents[_Re] = [];\n } else if (output[_Re] != null && output[_Re][_m] != null) {\n contents[_Re] = de_RegionList((0, import_smithy_client.getArrayIfSingleItem)(output[_Re][_m]), context);\n }\n return contents;\n}, \"de_StackSetAutoDeploymentTargetSummary\");\nvar de_StackSetDriftDetectionDetails = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_DSr] != null) {\n contents[_DSr] = (0, import_smithy_client.expectString)(output[_DSr]);\n }\n if (output[_DDS] != null) {\n contents[_DDS] = (0, import_smithy_client.expectString)(output[_DDS]);\n }\n if (output[_LDCT] != null) {\n contents[_LDCT] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LDCT]));\n }\n if (output[_TSIC] != null) {\n contents[_TSIC] = (0, import_smithy_client.strictParseInt32)(output[_TSIC]);\n }\n if (output[_DSIC] != null) {\n contents[_DSIC] = (0, import_smithy_client.strictParseInt32)(output[_DSIC]);\n }\n if (output[_ISSIC] != null) {\n contents[_ISSIC] = (0, import_smithy_client.strictParseInt32)(output[_ISSIC]);\n }\n if (output[_IPSIC] != null) {\n contents[_IPSIC] = (0, import_smithy_client.strictParseInt32)(output[_IPSIC]);\n }\n if (output[_FSIC] != null) {\n contents[_FSIC] = (0, import_smithy_client.strictParseInt32)(output[_FSIC]);\n }\n return contents;\n}, \"de_StackSetDriftDetectionDetails\");\nvar de_StackSetNotEmptyException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_M] != null) {\n contents[_M] = (0, import_smithy_client.expectString)(output[_M]);\n }\n return contents;\n}, \"de_StackSetNotEmptyException\");\nvar de_StackSetNotFoundException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_M] != null) {\n contents[_M] = (0, import_smithy_client.expectString)(output[_M]);\n }\n return contents;\n}, \"de_StackSetNotFoundException\");\nvar de_StackSetOperation = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_OI] != null) {\n contents[_OI] = (0, import_smithy_client.expectString)(output[_OI]);\n }\n if (output[_SSI] != null) {\n contents[_SSI] = (0, import_smithy_client.expectString)(output[_SSI]);\n }\n if (output[_A] != null) {\n contents[_A] = (0, import_smithy_client.expectString)(output[_A]);\n }\n if (output[_S] != null) {\n contents[_S] = (0, import_smithy_client.expectString)(output[_S]);\n }\n if (output[_OP] != null) {\n contents[_OP] = de_StackSetOperationPreferences(output[_OP], context);\n }\n if (output[_RSe] != null) {\n contents[_RSe] = (0, import_smithy_client.parseBoolean)(output[_RSe]);\n }\n if (output[_ARARN] != null) {\n contents[_ARARN] = (0, import_smithy_client.expectString)(output[_ARARN]);\n }\n if (output[_ERN] != null) {\n contents[_ERN] = (0, import_smithy_client.expectString)(output[_ERN]);\n }\n if (output[_CTre] != null) {\n contents[_CTre] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_CTre]));\n }\n if (output[_ETn] != null) {\n contents[_ETn] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_ETn]));\n }\n if (output[_DTep] != null) {\n contents[_DTep] = de_DeploymentTargets(output[_DTep], context);\n }\n if (output[_SSDDD] != null) {\n contents[_SSDDD] = de_StackSetDriftDetectionDetails(output[_SSDDD], context);\n }\n if (output[_SRt] != null) {\n contents[_SRt] = (0, import_smithy_client.expectString)(output[_SRt]);\n }\n if (output[_SDt] != null) {\n contents[_SDt] = de_StackSetOperationStatusDetails(output[_SDt], context);\n }\n return contents;\n}, \"de_StackSetOperation\");\nvar de_StackSetOperationPreferences = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_RCT] != null) {\n contents[_RCT] = (0, import_smithy_client.expectString)(output[_RCT]);\n }\n if (output.RegionOrder === \"\") {\n contents[_RO] = [];\n } else if (output[_RO] != null && output[_RO][_m] != null) {\n contents[_RO] = de_RegionList((0, import_smithy_client.getArrayIfSingleItem)(output[_RO][_m]), context);\n }\n if (output[_FTC] != null) {\n contents[_FTC] = (0, import_smithy_client.strictParseInt32)(output[_FTC]);\n }\n if (output[_FTP] != null) {\n contents[_FTP] = (0, import_smithy_client.strictParseInt32)(output[_FTP]);\n }\n if (output[_MCC] != null) {\n contents[_MCC] = (0, import_smithy_client.strictParseInt32)(output[_MCC]);\n }\n if (output[_MCP] != null) {\n contents[_MCP] = (0, import_smithy_client.strictParseInt32)(output[_MCP]);\n }\n if (output[_CM] != null) {\n contents[_CM] = (0, import_smithy_client.expectString)(output[_CM]);\n }\n return contents;\n}, \"de_StackSetOperationPreferences\");\nvar de_StackSetOperationResultSummaries = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_StackSetOperationResultSummary(entry, context);\n });\n}, \"de_StackSetOperationResultSummaries\");\nvar de_StackSetOperationResultSummary = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_Acc] != null) {\n contents[_Acc] = (0, import_smithy_client.expectString)(output[_Acc]);\n }\n if (output[_Reg] != null) {\n contents[_Reg] = (0, import_smithy_client.expectString)(output[_Reg]);\n }\n if (output[_S] != null) {\n contents[_S] = (0, import_smithy_client.expectString)(output[_S]);\n }\n if (output[_SRt] != null) {\n contents[_SRt] = (0, import_smithy_client.expectString)(output[_SRt]);\n }\n if (output[_AGR] != null) {\n contents[_AGR] = de_AccountGateResult(output[_AGR], context);\n }\n if (output[_OUIr] != null) {\n contents[_OUIr] = (0, import_smithy_client.expectString)(output[_OUIr]);\n }\n return contents;\n}, \"de_StackSetOperationResultSummary\");\nvar de_StackSetOperationStatusDetails = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_FSIC] != null) {\n contents[_FSIC] = (0, import_smithy_client.strictParseInt32)(output[_FSIC]);\n }\n return contents;\n}, \"de_StackSetOperationStatusDetails\");\nvar de_StackSetOperationSummaries = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_StackSetOperationSummary(entry, context);\n });\n}, \"de_StackSetOperationSummaries\");\nvar de_StackSetOperationSummary = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_OI] != null) {\n contents[_OI] = (0, import_smithy_client.expectString)(output[_OI]);\n }\n if (output[_A] != null) {\n contents[_A] = (0, import_smithy_client.expectString)(output[_A]);\n }\n if (output[_S] != null) {\n contents[_S] = (0, import_smithy_client.expectString)(output[_S]);\n }\n if (output[_CTre] != null) {\n contents[_CTre] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_CTre]));\n }\n if (output[_ETn] != null) {\n contents[_ETn] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_ETn]));\n }\n if (output[_SRt] != null) {\n contents[_SRt] = (0, import_smithy_client.expectString)(output[_SRt]);\n }\n if (output[_SDt] != null) {\n contents[_SDt] = de_StackSetOperationStatusDetails(output[_SDt], context);\n }\n if (output[_OP] != null) {\n contents[_OP] = de_StackSetOperationPreferences(output[_OP], context);\n }\n return contents;\n}, \"de_StackSetOperationSummary\");\nvar de_StackSetSummaries = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_StackSetSummary(entry, context);\n });\n}, \"de_StackSetSummaries\");\nvar de_StackSetSummary = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_SSN] != null) {\n contents[_SSN] = (0, import_smithy_client.expectString)(output[_SSN]);\n }\n if (output[_SSI] != null) {\n contents[_SSI] = (0, import_smithy_client.expectString)(output[_SSI]);\n }\n if (output[_D] != null) {\n contents[_D] = (0, import_smithy_client.expectString)(output[_D]);\n }\n if (output[_S] != null) {\n contents[_S] = (0, import_smithy_client.expectString)(output[_S]);\n }\n if (output[_AD] != null) {\n contents[_AD] = de_AutoDeployment(output[_AD], context);\n }\n if (output[_PM] != null) {\n contents[_PM] = (0, import_smithy_client.expectString)(output[_PM]);\n }\n if (output[_DSr] != null) {\n contents[_DSr] = (0, import_smithy_client.expectString)(output[_DSr]);\n }\n if (output[_LDCT] != null) {\n contents[_LDCT] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LDCT]));\n }\n if (output[_ME] != null) {\n contents[_ME] = de_ManagedExecution(output[_ME], context);\n }\n return contents;\n}, \"de_StackSetSummary\");\nvar de_StackSummaries = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_StackSummary(entry, context);\n });\n}, \"de_StackSummaries\");\nvar de_StackSummary = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_SI] != null) {\n contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);\n }\n if (output[_SN] != null) {\n contents[_SN] = (0, import_smithy_client.expectString)(output[_SN]);\n }\n if (output[_TDe] != null) {\n contents[_TDe] = (0, import_smithy_client.expectString)(output[_TDe]);\n }\n if (output[_CTr] != null) {\n contents[_CTr] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_CTr]));\n }\n if (output[_LUT] != null) {\n contents[_LUT] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LUT]));\n }\n if (output[_DTel] != null) {\n contents[_DTel] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_DTel]));\n }\n if (output[_SSta] != null) {\n contents[_SSta] = (0, import_smithy_client.expectString)(output[_SSta]);\n }\n if (output[_SSR] != null) {\n contents[_SSR] = (0, import_smithy_client.expectString)(output[_SSR]);\n }\n if (output[_PIa] != null) {\n contents[_PIa] = (0, import_smithy_client.expectString)(output[_PIa]);\n }\n if (output[_RIo] != null) {\n contents[_RIo] = (0, import_smithy_client.expectString)(output[_RIo]);\n }\n if (output[_DI] != null) {\n contents[_DI] = de_StackDriftInformationSummary(output[_DI], context);\n }\n return contents;\n}, \"de_StackSummary\");\nvar de_StageList = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return (0, import_smithy_client.expectString)(entry);\n });\n}, \"de_StageList\");\nvar de_StaleRequestException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_M] != null) {\n contents[_M] = (0, import_smithy_client.expectString)(output[_M]);\n }\n return contents;\n}, \"de_StaleRequestException\");\nvar de_StartResourceScanOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_RSI] != null) {\n contents[_RSI] = (0, import_smithy_client.expectString)(output[_RSI]);\n }\n return contents;\n}, \"de_StartResourceScanOutput\");\nvar de_StopStackSetOperationOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n return contents;\n}, \"de_StopStackSetOperationOutput\");\nvar de_SupportedMajorVersions = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return (0, import_smithy_client.strictParseInt32)(entry);\n });\n}, \"de_SupportedMajorVersions\");\nvar de_Tag = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_K] != null) {\n contents[_K] = (0, import_smithy_client.expectString)(output[_K]);\n }\n if (output[_Val] != null) {\n contents[_Val] = (0, import_smithy_client.expectString)(output[_Val]);\n }\n return contents;\n}, \"de_Tag\");\nvar de_Tags = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_Tag(entry, context);\n });\n}, \"de_Tags\");\nvar de_TemplateConfiguration = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_DPe] != null) {\n contents[_DPe] = (0, import_smithy_client.expectString)(output[_DPe]);\n }\n if (output[_URP] != null) {\n contents[_URP] = (0, import_smithy_client.expectString)(output[_URP]);\n }\n return contents;\n}, \"de_TemplateConfiguration\");\nvar de_TemplateParameter = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_PK] != null) {\n contents[_PK] = (0, import_smithy_client.expectString)(output[_PK]);\n }\n if (output[_DV] != null) {\n contents[_DV] = (0, import_smithy_client.expectString)(output[_DV]);\n }\n if (output[_NE] != null) {\n contents[_NE] = (0, import_smithy_client.parseBoolean)(output[_NE]);\n }\n if (output[_D] != null) {\n contents[_D] = (0, import_smithy_client.expectString)(output[_D]);\n }\n return contents;\n}, \"de_TemplateParameter\");\nvar de_TemplateParameters = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_TemplateParameter(entry, context);\n });\n}, \"de_TemplateParameters\");\nvar de_TemplateProgress = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_RSesou] != null) {\n contents[_RSesou] = (0, import_smithy_client.strictParseInt32)(output[_RSesou]);\n }\n if (output[_RF] != null) {\n contents[_RF] = (0, import_smithy_client.strictParseInt32)(output[_RF]);\n }\n if (output[_RPes] != null) {\n contents[_RPes] = (0, import_smithy_client.strictParseInt32)(output[_RPes]);\n }\n if (output[_RPeso] != null) {\n contents[_RPeso] = (0, import_smithy_client.strictParseInt32)(output[_RPeso]);\n }\n return contents;\n}, \"de_TemplateProgress\");\nvar de_TemplateSummaries = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_TemplateSummary(entry, context);\n });\n}, \"de_TemplateSummaries\");\nvar de_TemplateSummary = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_GTI] != null) {\n contents[_GTI] = (0, import_smithy_client.expectString)(output[_GTI]);\n }\n if (output[_GTN] != null) {\n contents[_GTN] = (0, import_smithy_client.expectString)(output[_GTN]);\n }\n if (output[_S] != null) {\n contents[_S] = (0, import_smithy_client.expectString)(output[_S]);\n }\n if (output[_SRt] != null) {\n contents[_SRt] = (0, import_smithy_client.expectString)(output[_SRt]);\n }\n if (output[_CTr] != null) {\n contents[_CTr] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_CTr]));\n }\n if (output[_LUT] != null) {\n contents[_LUT] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LUT]));\n }\n if (output[_NOR] != null) {\n contents[_NOR] = (0, import_smithy_client.strictParseInt32)(output[_NOR]);\n }\n return contents;\n}, \"de_TemplateSummary\");\nvar de_TestTypeOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_TVA] != null) {\n contents[_TVA] = (0, import_smithy_client.expectString)(output[_TVA]);\n }\n return contents;\n}, \"de_TestTypeOutput\");\nvar de_TokenAlreadyExistsException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_M] != null) {\n contents[_M] = (0, import_smithy_client.expectString)(output[_M]);\n }\n return contents;\n}, \"de_TokenAlreadyExistsException\");\nvar de_TransformsList = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return (0, import_smithy_client.expectString)(entry);\n });\n}, \"de_TransformsList\");\nvar de_TypeConfigurationDetails = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_Ar] != null) {\n contents[_Ar] = (0, import_smithy_client.expectString)(output[_Ar]);\n }\n if (output[_Al] != null) {\n contents[_Al] = (0, import_smithy_client.expectString)(output[_Al]);\n }\n if (output[_Co] != null) {\n contents[_Co] = (0, import_smithy_client.expectString)(output[_Co]);\n }\n if (output[_LU] != null) {\n contents[_LU] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LU]));\n }\n if (output[_TA] != null) {\n contents[_TA] = (0, import_smithy_client.expectString)(output[_TA]);\n }\n if (output[_TN] != null) {\n contents[_TN] = (0, import_smithy_client.expectString)(output[_TN]);\n }\n if (output[_IDC] != null) {\n contents[_IDC] = (0, import_smithy_client.parseBoolean)(output[_IDC]);\n }\n return contents;\n}, \"de_TypeConfigurationDetails\");\nvar de_TypeConfigurationDetailsList = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_TypeConfigurationDetails(entry, context);\n });\n}, \"de_TypeConfigurationDetailsList\");\nvar de_TypeConfigurationIdentifier = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_TA] != null) {\n contents[_TA] = (0, import_smithy_client.expectString)(output[_TA]);\n }\n if (output[_TCA] != null) {\n contents[_TCA] = (0, import_smithy_client.expectString)(output[_TCA]);\n }\n if (output[_TCAy] != null) {\n contents[_TCAy] = (0, import_smithy_client.expectString)(output[_TCAy]);\n }\n if (output[_T] != null) {\n contents[_T] = (0, import_smithy_client.expectString)(output[_T]);\n }\n if (output[_TN] != null) {\n contents[_TN] = (0, import_smithy_client.expectString)(output[_TN]);\n }\n return contents;\n}, \"de_TypeConfigurationIdentifier\");\nvar de_TypeConfigurationNotFoundException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_M] != null) {\n contents[_M] = (0, import_smithy_client.expectString)(output[_M]);\n }\n return contents;\n}, \"de_TypeConfigurationNotFoundException\");\nvar de_TypeNotFoundException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_M] != null) {\n contents[_M] = (0, import_smithy_client.expectString)(output[_M]);\n }\n return contents;\n}, \"de_TypeNotFoundException\");\nvar de_TypeSummaries = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_TypeSummary(entry, context);\n });\n}, \"de_TypeSummaries\");\nvar de_TypeSummary = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_T] != null) {\n contents[_T] = (0, import_smithy_client.expectString)(output[_T]);\n }\n if (output[_TN] != null) {\n contents[_TN] = (0, import_smithy_client.expectString)(output[_TN]);\n }\n if (output[_DVI] != null) {\n contents[_DVI] = (0, import_smithy_client.expectString)(output[_DVI]);\n }\n if (output[_TA] != null) {\n contents[_TA] = (0, import_smithy_client.expectString)(output[_TA]);\n }\n if (output[_LU] != null) {\n contents[_LU] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_LU]));\n }\n if (output[_D] != null) {\n contents[_D] = (0, import_smithy_client.expectString)(output[_D]);\n }\n if (output[_PI] != null) {\n contents[_PI] = (0, import_smithy_client.expectString)(output[_PI]);\n }\n if (output[_OTN] != null) {\n contents[_OTN] = (0, import_smithy_client.expectString)(output[_OTN]);\n }\n if (output[_PVN] != null) {\n contents[_PVN] = (0, import_smithy_client.expectString)(output[_PVN]);\n }\n if (output[_LPV] != null) {\n contents[_LPV] = (0, import_smithy_client.expectString)(output[_LPV]);\n }\n if (output[_PIu] != null) {\n contents[_PIu] = (0, import_smithy_client.expectString)(output[_PIu]);\n }\n if (output[_PN] != null) {\n contents[_PN] = (0, import_smithy_client.expectString)(output[_PN]);\n }\n if (output[_IA] != null) {\n contents[_IA] = (0, import_smithy_client.parseBoolean)(output[_IA]);\n }\n return contents;\n}, \"de_TypeSummary\");\nvar de_TypeVersionSummaries = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_TypeVersionSummary(entry, context);\n });\n}, \"de_TypeVersionSummaries\");\nvar de_TypeVersionSummary = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_T] != null) {\n contents[_T] = (0, import_smithy_client.expectString)(output[_T]);\n }\n if (output[_TN] != null) {\n contents[_TN] = (0, import_smithy_client.expectString)(output[_TN]);\n }\n if (output[_VI] != null) {\n contents[_VI] = (0, import_smithy_client.expectString)(output[_VI]);\n }\n if (output[_IDV] != null) {\n contents[_IDV] = (0, import_smithy_client.parseBoolean)(output[_IDV]);\n }\n if (output[_Ar] != null) {\n contents[_Ar] = (0, import_smithy_client.expectString)(output[_Ar]);\n }\n if (output[_TCi] != null) {\n contents[_TCi] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_TCi]));\n }\n if (output[_D] != null) {\n contents[_D] = (0, import_smithy_client.expectString)(output[_D]);\n }\n if (output[_PVN] != null) {\n contents[_PVN] = (0, import_smithy_client.expectString)(output[_PVN]);\n }\n return contents;\n}, \"de_TypeVersionSummary\");\nvar de_UnprocessedTypeConfigurations = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_TypeConfigurationIdentifier(entry, context);\n });\n}, \"de_UnprocessedTypeConfigurations\");\nvar de_UpdateGeneratedTemplateOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_GTI] != null) {\n contents[_GTI] = (0, import_smithy_client.expectString)(output[_GTI]);\n }\n return contents;\n}, \"de_UpdateGeneratedTemplateOutput\");\nvar de_UpdateStackInstancesOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_OI] != null) {\n contents[_OI] = (0, import_smithy_client.expectString)(output[_OI]);\n }\n return contents;\n}, \"de_UpdateStackInstancesOutput\");\nvar de_UpdateStackOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_SI] != null) {\n contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);\n }\n return contents;\n}, \"de_UpdateStackOutput\");\nvar de_UpdateStackSetOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_OI] != null) {\n contents[_OI] = (0, import_smithy_client.expectString)(output[_OI]);\n }\n return contents;\n}, \"de_UpdateStackSetOutput\");\nvar de_UpdateTerminationProtectionOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_SI] != null) {\n contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);\n }\n return contents;\n}, \"de_UpdateTerminationProtectionOutput\");\nvar de_ValidateTemplateOutput = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output.Parameters === \"\") {\n contents[_P] = [];\n } else if (output[_P] != null && output[_P][_m] != null) {\n contents[_P] = de_TemplateParameters((0, import_smithy_client.getArrayIfSingleItem)(output[_P][_m]), context);\n }\n if (output[_D] != null) {\n contents[_D] = (0, import_smithy_client.expectString)(output[_D]);\n }\n if (output.Capabilities === \"\") {\n contents[_C] = [];\n } else if (output[_C] != null && output[_C][_m] != null) {\n contents[_C] = de_Capabilities((0, import_smithy_client.getArrayIfSingleItem)(output[_C][_m]), context);\n }\n if (output[_CR] != null) {\n contents[_CR] = (0, import_smithy_client.expectString)(output[_CR]);\n }\n if (output.DeclaredTransforms === \"\") {\n contents[_DTec] = [];\n } else if (output[_DTec] != null && output[_DTec][_m] != null) {\n contents[_DTec] = de_TransformsList((0, import_smithy_client.getArrayIfSingleItem)(output[_DTec][_m]), context);\n }\n return contents;\n}, \"de_ValidateTemplateOutput\");\nvar de_WarningDetail = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_T] != null) {\n contents[_T] = (0, import_smithy_client.expectString)(output[_T]);\n }\n if (output.Properties === \"\") {\n contents[_Pro] = [];\n } else if (output[_Pro] != null && output[_Pro][_m] != null) {\n contents[_Pro] = de_WarningProperties((0, import_smithy_client.getArrayIfSingleItem)(output[_Pro][_m]), context);\n }\n return contents;\n}, \"de_WarningDetail\");\nvar de_WarningDetails = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_WarningDetail(entry, context);\n });\n}, \"de_WarningDetails\");\nvar de_WarningProperties = /* @__PURE__ */ __name((output, context) => {\n return (output || []).filter((e) => e != null).map((entry) => {\n return de_WarningProperty(entry, context);\n });\n}, \"de_WarningProperties\");\nvar de_WarningProperty = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_PPr] != null) {\n contents[_PPr] = (0, import_smithy_client.expectString)(output[_PPr]);\n }\n if (output[_Req] != null) {\n contents[_Req] = (0, import_smithy_client.parseBoolean)(output[_Req]);\n }\n if (output[_D] != null) {\n contents[_D] = (0, import_smithy_client.expectString)(output[_D]);\n }\n return contents;\n}, \"de_WarningProperty\");\nvar de_Warnings = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output.UnrecognizedResourceTypes === \"\") {\n contents[_URT] = [];\n } else if (output[_URT] != null && output[_URT][_m] != null) {\n contents[_URT] = de_ResourceTypes((0, import_smithy_client.getArrayIfSingleItem)(output[_URT][_m]), context);\n }\n return contents;\n}, \"de_Warnings\");\nvar deserializeMetadata = /* @__PURE__ */ __name((output) => ({\n httpStatusCode: output.statusCode,\n requestId: output.headers[\"x-amzn-requestid\"] ?? output.headers[\"x-amzn-request-id\"] ?? output.headers[\"x-amz-request-id\"],\n extendedRequestId: output.headers[\"x-amz-id-2\"],\n cfId: output.headers[\"x-amz-cf-id\"]\n}), \"deserializeMetadata\");\nvar throwDefaultError = (0, import_smithy_client.withBaseException)(CloudFormationServiceException);\nvar buildHttpRpcRequest = /* @__PURE__ */ __name(async (context, headers, path, resolvedHostname, body) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const contents = {\n protocol,\n hostname,\n port,\n method: \"POST\",\n path: basePath.endsWith(\"/\") ? basePath.slice(0, -1) + path : basePath + path,\n headers\n };\n if (resolvedHostname !== void 0) {\n contents.hostname = resolvedHostname;\n }\n if (body !== void 0) {\n contents.body = body;\n }\n return new import_protocol_http.HttpRequest(contents);\n}, \"buildHttpRpcRequest\");\nvar SHARED_HEADERS = {\n \"content-type\": \"application/x-www-form-urlencoded\"\n};\nvar _ = \"2010-05-15\";\nvar _A = \"Action\";\nvar _AC = \"AfterContext\";\nvar _ACT = \"AttributeChangeType\";\nvar _AD = \"AutoDeployment\";\nvar _AFT = \"AccountFilterType\";\nvar _AGR = \"AccountGateResult\";\nvar _AL = \"AccountLimits\";\nvar _AOA = \"ActivateOrganizationsAccess\";\nvar _AP = \"ActualProperties\";\nvar _AR = \"AddResources\";\nvar _ARARN = \"AdministrationRoleARN\";\nvar _AT = \"ActivateType\";\nvar _ATAC = \"AcceptTermsAndConditions\";\nvar _AU = \"AutoUpdate\";\nvar _AUc = \"AccountsUrl\";\nvar _AV = \"AllowedValues\";\nvar _AVc = \"ActualValue\";\nvar _AVf = \"AfterValue\";\nvar _Ac = \"Accounts\";\nvar _Acc = \"Account\";\nvar _Act = \"Active\";\nvar _Al = \"Alias\";\nvar _Ar = \"Arn\";\nvar _At = \"Attribute\";\nvar _BC = \"BeforeContext\";\nvar _BDTC = \"BatchDescribeTypeConfigurations\";\nvar _BT = \"BearerToken\";\nvar _BV = \"BeforeValue\";\nvar _C = \"Capabilities\";\nvar _CA = \"CallAs\";\nvar _CAo = \"ConnectionArn\";\nvar _CAon = \"ConfigurationAlias\";\nvar _CAonf = \"ConfigurationArn\";\nvar _CCS = \"CreateChangeSet\";\nvar _CE = \"CausingEntity\";\nvar _CGT = \"CreateGeneratedTemplate\";\nvar _CM = \"ConcurrencyMode\";\nvar _COS = \"CurrentOperationStatus\";\nvar _CR = \"CapabilitiesReason\";\nvar _CRT = \"ClientRequestToken\";\nvar _CS = \"CreateStack\";\nvar _CSI = \"CreateStackInstances\";\nvar _CSIh = \"ChangeSetId\";\nvar _CSN = \"ChangeSetName\";\nvar _CSR = \"CreateStackRefactor\";\nvar _CSS = \"CreateStackSet\";\nvar _CST = \"ChangeSetType\";\nvar _CSh = \"ChangeSource\";\nvar _CSo = \"ConfigurationSchema\";\nvar _CT = \"ClientToken\";\nvar _CTr = \"CreationTime\";\nvar _CTre = \"CreationTimestamp\";\nvar _CUR = \"ContinueUpdateRollback\";\nvar _CUS = \"CancelUpdateStack\";\nvar _Ca = \"Category\";\nvar _Ch = \"Changes\";\nvar _Co = \"Configuration\";\nvar _D = \"Description\";\nvar _DAL = \"DescribeAccountLimits\";\nvar _DCS = \"DeleteChangeSet\";\nvar _DCSH = \"DescribeChangeSetHooks\";\nvar _DCSe = \"DescribeChangeSet\";\nvar _DDS = \"DriftDetectionStatus\";\nvar _DGT = \"DeleteGeneratedTemplate\";\nvar _DGTe = \"DescribeGeneratedTemplate\";\nvar _DI = \"DriftInformation\";\nvar _DM = \"DeletionMode\";\nvar _DOA = \"DeactivateOrganizationsAccess\";\nvar _DOAe = \"DescribeOrganizationsAccess\";\nvar _DP = \"DescribePublisher\";\nvar _DPe = \"DeletionPolicy\";\nvar _DR = \"DisableRollback\";\nvar _DRS = \"DescribeResourceScan\";\nvar _DRe = \"DetectionReason\";\nvar _DS = \"DeleteStack\";\nvar _DSD = \"DetectStackDrift\";\nvar _DSDDS = \"DescribeStackDriftDetectionStatus\";\nvar _DSE = \"DescribeStackEvents\";\nvar _DSI = \"DeleteStackInstances\";\nvar _DSIC = \"DriftedStackInstancesCount\";\nvar _DSIe = \"DescribeStackInstance\";\nvar _DSR = \"DescribeStackRefactor\";\nvar _DSRC = \"DriftedStackResourceCount\";\nvar _DSRD = \"DescribeStackResourceDrifts\";\nvar _DSRDe = \"DetectStackResourceDrift\";\nvar _DSRe = \"DescribeStackResource\";\nvar _DSRes = \"DescribeStackResources\";\nvar _DSRet = \"DetectionStatusReason\";\nvar _DSS = \"DeleteStackSet\";\nvar _DSSD = \"DetectStackSetDrift\";\nvar _DSSO = \"DescribeStackSetOperation\";\nvar _DSSe = \"DescribeStackSet\";\nvar _DSe = \"DescribeStacks\";\nvar _DSep = \"DeprecatedStatus\";\nvar _DSet = \"DetectionStatus\";\nvar _DSeta = \"DetailedStatus\";\nvar _DSr = \"DriftStatus\";\nvar _DT = \"DeactivateType\";\nvar _DTR = \"DescribeTypeRegistration\";\nvar _DTe = \"DeregisterType\";\nvar _DTec = \"DeclaredTransforms\";\nvar _DTel = \"DeletionTime\";\nvar _DTep = \"DeploymentTargets\";\nvar _DTes = \"DescribeType\";\nvar _DTi = \"DifferenceType\";\nvar _DU = \"DocumentationUrl\";\nvar _DV = \"DefaultValue\";\nvar _DVI = \"DefaultVersionId\";\nvar _De = \"Destination\";\nvar _Det = \"Details\";\nvar _Dete = \"Detection\";\nvar _E = \"Enabled\";\nvar _EC = \"ErrorCode\";\nvar _ECS = \"ExecuteChangeSet\";\nvar _EI = \"EventId\";\nvar _EM = \"ErrorMessage\";\nvar _EN = \"ExportName\";\nvar _EP = \"ExpectedProperties\";\nvar _ERA = \"ExecutionRoleArn\";\nvar _ERN = \"ExecutionRoleName\";\nvar _ES = \"ExecutionStatus\";\nvar _ESC = \"EnableStackCreation\";\nvar _ESF = \"ExecutionStatusFilter\";\nvar _ESI = \"ExportingStackId\";\nvar _ESR = \"ExecuteStackRefactor\";\nvar _ESRx = \"ExecutionStatusReason\";\nvar _ET = \"EndTime\";\nvar _ETC = \"EstimateTemplateCost\";\nvar _ETP = \"EnableTerminationProtection\";\nvar _ETn = \"EndTimestamp\";\nvar _EV = \"ExpectedValue\";\nvar _En = \"Entity\";\nvar _Er = \"Errors\";\nvar _Ev = \"Evaluation\";\nvar _Ex = \"Exports\";\nvar _F = \"Format\";\nvar _FM = \"FailureMode\";\nvar _FSIC = \"FailedStackInstancesCount\";\nvar _FTC = \"FailureToleranceCount\";\nvar _FTP = \"FailureTolerancePercentage\";\nvar _Fi = \"Filters\";\nvar _GGT = \"GetGeneratedTemplate\";\nvar _GSP = \"GetStackPolicy\";\nvar _GT = \"GetTemplate\";\nvar _GTI = \"GeneratedTemplateId\";\nvar _GTN = \"GeneratedTemplateName\";\nvar _GTS = \"GetTemplateSummary\";\nvar _H = \"Hooks\";\nvar _HFM = \"HookFailureMode\";\nvar _HIC = \"HookInvocationCount\";\nvar _HIP = \"HookInvocationPoint\";\nvar _HR = \"HookResults\";\nvar _HS = \"HookStatus\";\nvar _HSR = \"HookStatusReason\";\nvar _HT = \"HookType\";\nvar _I = \"Id\";\nvar _IA = \"IsActivated\";\nvar _IDC = \"IsDefaultConfiguration\";\nvar _IDV = \"IsDefaultVersion\";\nvar _IER = \"ImportExistingResources\";\nvar _INS = \"IncludeNestedStacks\";\nvar _IP = \"InvocationPoint\";\nvar _IPSIC = \"InProgressStackInstancesCount\";\nvar _IPV = \"IncludePropertyValues\";\nvar _IPd = \"IdentityProvider\";\nvar _ISSIC = \"InSyncStackInstancesCount\";\nvar _ISTSS = \"ImportStacksToStackSet\";\nvar _Im = \"Imports\";\nvar _K = \"Key\";\nvar _LC = \"LoggingConfig\";\nvar _LCS = \"ListChangeSets\";\nvar _LCT = \"LastCheckTimestamp\";\nvar _LDB = \"LogDeliveryBucket\";\nvar _LDCT = \"LastDriftCheckTimestamp\";\nvar _LE = \"ListExports\";\nvar _LGN = \"LogGroupName\";\nvar _LGT = \"ListGeneratedTemplates\";\nvar _LHR = \"ListHookResults\";\nvar _LI = \"ListImports\";\nvar _LIH = \"LogicalIdHierarchy\";\nvar _LOI = \"LastOperationId\";\nvar _LPV = \"LatestPublicVersion\";\nvar _LRA = \"LogRoleArn\";\nvar _LRI = \"LogicalResourceId\";\nvar _LRIo = \"LogicalResourceIds\";\nvar _LRS = \"ListResourceScans\";\nvar _LRSR = \"ListResourceScanResources\";\nvar _LRSRR = \"ListResourceScanRelatedResources\";\nvar _LS = \"ListStacks\";\nvar _LSI = \"ListStackInstances\";\nvar _LSIRD = \"ListStackInstanceResourceDrifts\";\nvar _LSR = \"ListStackRefactors\";\nvar _LSRA = \"ListStackRefactorActions\";\nvar _LSRi = \"ListStackResources\";\nvar _LSS = \"ListStackSets\";\nvar _LSSADT = \"ListStackSetAutoDeploymentTargets\";\nvar _LSSO = \"ListStackSetOperations\";\nvar _LSSOR = \"ListStackSetOperationResults\";\nvar _LT = \"ListTypes\";\nvar _LTR = \"ListTypeRegistrations\";\nvar _LTV = \"ListTypeVersions\";\nvar _LU = \"LastUpdated\";\nvar _LUT = \"LastUpdatedTime\";\nvar _LUTa = \"LastUpdatedTimestamp\";\nvar _M = \"Message\";\nvar _MBS = \"ManagedByStack\";\nvar _MCC = \"MaxConcurrentCount\";\nvar _MCP = \"MaxConcurrentPercentage\";\nvar _ME = \"ManagedExecution\";\nvar _MI = \"ModuleInfo\";\nvar _MR = \"MaxResults\";\nvar _MTIM = \"MonitoringTimeInMinutes\";\nvar _MV = \"MajorVersion\";\nvar _Me = \"Metadata\";\nvar _N = \"Name\";\nvar _NARN = \"NotificationARNs\";\nvar _NE = \"NoEcho\";\nvar _NGTN = \"NewGeneratedTemplateName\";\nvar _NOR = \"NumberOfResources\";\nvar _NT = \"NextToken\";\nvar _O = \"Outputs\";\nvar _OF = \"OnFailure\";\nvar _OI = \"OperationId\";\nvar _OK = \"OutputKey\";\nvar _OP = \"OperationPreferences\";\nvar _OS = \"OperationStatus\";\nvar _OSF = \"OnStackFailure\";\nvar _OTA = \"OriginalTypeArn\";\nvar _OTN = \"OriginalTypeName\";\nvar _OUI = \"OrganizationalUnitIds\";\nvar _OUIr = \"OrganizationalUnitId\";\nvar _OV = \"OutputValue\";\nvar _P = \"Parameters\";\nvar _PA = \"PolicyAction\";\nvar _PC = \"PercentageCompleted\";\nvar _PCSI = \"ParentChangeSetId\";\nvar _PCa = \"ParameterConstraints\";\nvar _PD = \"PropertyDifferences\";\nvar _PI = \"PublisherId\";\nvar _PIa = \"ParentId\";\nvar _PIu = \"PublisherIdentity\";\nvar _PK = \"ParameterKey\";\nvar _PM = \"PermissionModel\";\nvar _PN = \"PublisherName\";\nvar _PO = \"ParameterOverrides\";\nvar _PP = \"PublisherProfile\";\nvar _PPr = \"PropertyPath\";\nvar _PRI = \"PhysicalResourceId\";\nvar _PRIC = \"PhysicalResourceIdContext\";\nvar _PS = \"PublisherStatus\";\nvar _PSr = \"ProgressStatus\";\nvar _PT = \"PublishType\";\nvar _PTA = \"PublicTypeArn\";\nvar _PTa = \"ParameterType\";\nvar _PTr = \"ProvisioningType\";\nvar _PV = \"ParameterValue\";\nvar _PVN = \"PublicVersionNumber\";\nvar _Pa = \"Path\";\nvar _Pr = \"Progress\";\nvar _Pro = \"Properties\";\nvar _R = \"Resources\";\nvar _RA = \"ResourceAction\";\nvar _RAR = \"RefreshAllResources\";\nvar _RARN = \"RoleARN\";\nvar _RAT = \"RequiredActivatedTypes\";\nvar _RC = \"RollbackConfiguration\";\nvar _RCSI = \"RootChangeSetId\";\nvar _RCT = \"RegionConcurrencyType\";\nvar _RCe = \"ResourceChange\";\nvar _REOC = \"RetainExceptOnCreate\";\nvar _RF = \"ResourcesFailed\";\nvar _RHP = \"RecordHandlerProgress\";\nvar _RI = \"ResourceIdentifier\";\nvar _RIS = \"ResourceIdentifierSummaries\";\nvar _RIe = \"ResourceIdentifiers\";\nvar _RIo = \"RootId\";\nvar _RM = \"ResourceMappings\";\nvar _RMe = \"ResourceModel\";\nvar _RMes = \"ResourceMapping\";\nvar _RO = \"RegionOrder\";\nvar _RP = \"RegisterPublisher\";\nvar _RPe = \"ResourceProperties\";\nvar _RPes = \"ResourcesProcessing\";\nvar _RPeso = \"ResourcesPending\";\nvar _RR = \"RetainResources\";\nvar _RRe = \"RemoveResources\";\nvar _RRel = \"RelatedResources\";\nvar _RReq = \"RequiresRecreation\";\nvar _RRes = \"ResourcesRead\";\nvar _RS = \"RollbackStack\";\nvar _RSF = \"RegistrationStatusFilter\";\nvar _RSI = \"ResourceScanId\";\nvar _RSOAR = \"RetainStacksOnAccountRemoval\";\nvar _RSR = \"ResourceStatusReason\";\nvar _RSS = \"ResourceScanSummaries\";\nvar _RSe = \"RetainStacks\";\nvar _RSes = \"ResourcesScanned\";\nvar _RSeso = \"ResourceStatus\";\nvar _RSesou = \"ResourcesSucceeded\";\nvar _RT = \"RegisterType\";\nvar _RTD = \"ResourceTargetDetails\";\nvar _RTI = \"ResourcesToImport\";\nvar _RTL = \"RegistrationTokenList\";\nvar _RTP = \"ResourceTypePrefix\";\nvar _RTS = \"ResourcesToSkip\";\nvar _RTe = \"ResourceTypes\";\nvar _RTeg = \"RegistrationToken\";\nvar _RTes = \"ResourceType\";\nvar _RTo = \"RollbackTriggers\";\nvar _RV = \"ResolvedValue\";\nvar _Re = \"Regions\";\nvar _Reg = \"Region\";\nvar _Rep = \"Replacement\";\nvar _Req = \"Required\";\nvar _S = \"Status\";\nvar _SA = \"StagesAvailable\";\nvar _SD = \"StackDefinitions\";\nvar _SDDI = \"StackDriftDetectionId\";\nvar _SDS = \"StackDriftStatus\";\nvar _SDt = \"StatusDetails\";\nvar _SE = \"StackEvents\";\nvar _SF = \"ScanFilters\";\nvar _SHP = \"SchemaHandlerPackage\";\nvar _SI = \"StackId\";\nvar _SIA = \"StackInstanceAccount\";\nvar _SIR = \"StackInstanceRegion\";\nvar _SIRDS = \"StackInstanceResourceDriftStatuses\";\nvar _SIS = \"StackInstanceStatus\";\nvar _SIU = \"StackIdsUrl\";\nvar _SIt = \"StackIds\";\nvar _SIta = \"StackInstance\";\nvar _SM = \"StatusMessage\";\nvar _SMV = \"SupportedMajorVersions\";\nvar _SN = \"StackName\";\nvar _SPB = \"StackPolicyBody\";\nvar _SPDUB = \"StackPolicyDuringUpdateBody\";\nvar _SPDUURL = \"StackPolicyDuringUpdateURL\";\nvar _SPURL = \"StackPolicyURL\";\nvar _SR = \"SignalResource\";\nvar _SRA = \"StackRefactorActions\";\nvar _SRD = \"StackResourceDrifts\";\nvar _SRDS = \"StackResourceDriftStatus\";\nvar _SRDSF = \"StackResourceDriftStatusFilters\";\nvar _SRDt = \"StackResourceDetail\";\nvar _SRDta = \"StackResourceDrift\";\nvar _SRI = \"StackRefactorId\";\nvar _SRS = \"StartResourceScan\";\nvar _SRSt = \"StackRefactorSummaries\";\nvar _SRSta = \"StackResourceSummaries\";\nvar _SRt = \"StatusReason\";\nvar _SRta = \"StackResources\";\nvar _SS = \"StackSet\";\nvar _SSARN = \"StackSetARN\";\nvar _SSDDD = \"StackSetDriftDetectionDetails\";\nvar _SSF = \"StackStatusFilter\";\nvar _SSI = \"StackSetId\";\nvar _SSN = \"StackSetName\";\nvar _SSO = \"StackSetOperation\";\nvar _SSP = \"SetStackPolicy\";\nvar _SSR = \"StackStatusReason\";\nvar _SSSO = \"StopStackSetOperation\";\nvar _SSt = \"StackSummaries\";\nvar _SSta = \"StackStatus\";\nvar _ST = \"StartTime\";\nvar _STC = \"SetTypeConfiguration\";\nvar _STDV = \"SetTypeDefaultVersion\";\nvar _STF = \"ScanTypeFilter\";\nvar _STc = \"ScanType\";\nvar _SU = \"SourceUrl\";\nvar _Sc = \"Schema\";\nvar _Sco = \"Scope\";\nvar _So = \"Source\";\nvar _St = \"Stacks\";\nvar _Su = \"Summaries\";\nvar _T = \"Type\";\nvar _TA = \"TypeArn\";\nvar _TB = \"TemplateBody\";\nvar _TC = \"TemplateConfiguration\";\nvar _TCA = \"TypeConfigurationAlias\";\nvar _TCAy = \"TypeConfigurationArn\";\nvar _TCI = \"TypeConfigurationIdentifiers\";\nvar _TCIy = \"TypeConfigurationIdentifier\";\nvar _TCVI = \"TypeConfigurationVersionId\";\nvar _TCi = \"TimeCreated\";\nvar _TCy = \"TypeConfigurations\";\nvar _TD = \"TargetDetails\";\nvar _TDe = \"TemplateDescription\";\nvar _TH = \"TypeHierarchy\";\nvar _TI = \"TargetId\";\nvar _TIM = \"TimeoutInMinutes\";\nvar _TK = \"TagKey\";\nvar _TN = \"TypeName\";\nvar _TNA = \"TypeNameAlias\";\nvar _TNP = \"TypeNamePrefix\";\nvar _TR = \"TagResources\";\nvar _TS = \"TemplateStage\";\nvar _TSC = \"TemplateSummaryConfig\";\nvar _TSIC = \"TotalStackInstancesCount\";\nvar _TSy = \"TypeSummaries\";\nvar _TT = \"TestType\";\nvar _TTS = \"TypeTestsStatus\";\nvar _TTSD = \"TypeTestsStatusDescription\";\nvar _TTa = \"TargetType\";\nvar _TURL = \"TemplateURL\";\nvar _TURTAW = \"TreatUnrecognizedResourceTypesAsWarnings\";\nvar _TV = \"TagValue\";\nvar _TVA = \"TypeVersionArn\";\nvar _TVI = \"TypeVersionId\";\nvar _TVS = \"TypeVersionSummaries\";\nvar _TW = \"TotalWarnings\";\nvar _Ta = \"Tags\";\nvar _Tar = \"Target\";\nvar _Ti = \"Timestamp\";\nvar _Ty = \"Types\";\nvar _U = \"Url\";\nvar _UGT = \"UpdateGeneratedTemplate\";\nvar _UI = \"UniqueId\";\nvar _UPT = \"UsePreviousTemplate\";\nvar _UPV = \"UsePreviousValue\";\nvar _UR = \"UntagResources\";\nvar _URP = \"UpdateReplacePolicy\";\nvar _URT = \"UnrecognizedResourceTypes\";\nvar _US = \"UpdateStack\";\nvar _USI = \"UpdateStackInstances\";\nvar _USS = \"UpdateStackSet\";\nvar _UTC = \"UnprocessedTypeConfigurations\";\nvar _UTP = \"UpdateTerminationProtection\";\nvar _V = \"Version\";\nvar _VB = \"VersionBump\";\nvar _VI = \"VersionId\";\nvar _VT = \"ValidateTemplate\";\nvar _Va = \"Values\";\nvar _Val = \"Value\";\nvar _Vi = \"Visibility\";\nvar _W = \"Warnings\";\nvar _e = \"entry\";\nvar _m = \"member\";\nvar buildFormUrlencodedString = /* @__PURE__ */ __name((formEntries) => Object.entries(formEntries).map(([key, value]) => (0, import_smithy_client.extendedEncodeURIComponent)(key) + \"=\" + (0, import_smithy_client.extendedEncodeURIComponent)(value)).join(\"&\"), \"buildFormUrlencodedString\");\nvar loadQueryErrorCode = /* @__PURE__ */ __name((output, data) => {\n if (data.Error?.Code !== void 0) {\n return data.Error.Code;\n }\n if (output.statusCode == 404) {\n return \"NotFound\";\n }\n}, \"loadQueryErrorCode\");\n\n// src/commands/ActivateOrganizationsAccessCommand.ts\nvar ActivateOrganizationsAccessCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"ActivateOrganizationsAccess\", {}).n(\"CloudFormationClient\", \"ActivateOrganizationsAccessCommand\").f(void 0, void 0).ser(se_ActivateOrganizationsAccessCommand).de(de_ActivateOrganizationsAccessCommand).build() {\n static {\n __name(this, \"ActivateOrganizationsAccessCommand\");\n }\n};\n\n// src/commands/ActivateTypeCommand.ts\n\n\n\nvar ActivateTypeCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"ActivateType\", {}).n(\"CloudFormationClient\", \"ActivateTypeCommand\").f(void 0, void 0).ser(se_ActivateTypeCommand).de(de_ActivateTypeCommand).build() {\n static {\n __name(this, \"ActivateTypeCommand\");\n }\n};\n\n// src/commands/BatchDescribeTypeConfigurationsCommand.ts\n\n\n\nvar BatchDescribeTypeConfigurationsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"BatchDescribeTypeConfigurations\", {}).n(\"CloudFormationClient\", \"BatchDescribeTypeConfigurationsCommand\").f(void 0, void 0).ser(se_BatchDescribeTypeConfigurationsCommand).de(de_BatchDescribeTypeConfigurationsCommand).build() {\n static {\n __name(this, \"BatchDescribeTypeConfigurationsCommand\");\n }\n};\n\n// src/commands/CancelUpdateStackCommand.ts\n\n\n\nvar CancelUpdateStackCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"CancelUpdateStack\", {}).n(\"CloudFormationClient\", \"CancelUpdateStackCommand\").f(void 0, void 0).ser(se_CancelUpdateStackCommand).de(de_CancelUpdateStackCommand).build() {\n static {\n __name(this, \"CancelUpdateStackCommand\");\n }\n};\n\n// src/commands/ContinueUpdateRollbackCommand.ts\n\n\n\nvar ContinueUpdateRollbackCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"ContinueUpdateRollback\", {}).n(\"CloudFormationClient\", \"ContinueUpdateRollbackCommand\").f(void 0, void 0).ser(se_ContinueUpdateRollbackCommand).de(de_ContinueUpdateRollbackCommand).build() {\n static {\n __name(this, \"ContinueUpdateRollbackCommand\");\n }\n};\n\n// src/commands/CreateChangeSetCommand.ts\n\n\n\nvar CreateChangeSetCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"CreateChangeSet\", {}).n(\"CloudFormationClient\", \"CreateChangeSetCommand\").f(void 0, void 0).ser(se_CreateChangeSetCommand).de(de_CreateChangeSetCommand).build() {\n static {\n __name(this, \"CreateChangeSetCommand\");\n }\n};\n\n// src/commands/CreateGeneratedTemplateCommand.ts\n\n\n\nvar CreateGeneratedTemplateCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"CreateGeneratedTemplate\", {}).n(\"CloudFormationClient\", \"CreateGeneratedTemplateCommand\").f(void 0, void 0).ser(se_CreateGeneratedTemplateCommand).de(de_CreateGeneratedTemplateCommand).build() {\n static {\n __name(this, \"CreateGeneratedTemplateCommand\");\n }\n};\n\n// src/commands/CreateStackCommand.ts\n\n\n\nvar CreateStackCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"CreateStack\", {}).n(\"CloudFormationClient\", \"CreateStackCommand\").f(void 0, void 0).ser(se_CreateStackCommand).de(de_CreateStackCommand).build() {\n static {\n __name(this, \"CreateStackCommand\");\n }\n};\n\n// src/commands/CreateStackInstancesCommand.ts\n\n\n\nvar CreateStackInstancesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"CreateStackInstances\", {}).n(\"CloudFormationClient\", \"CreateStackInstancesCommand\").f(void 0, void 0).ser(se_CreateStackInstancesCommand).de(de_CreateStackInstancesCommand).build() {\n static {\n __name(this, \"CreateStackInstancesCommand\");\n }\n};\n\n// src/commands/CreateStackRefactorCommand.ts\n\n\n\nvar CreateStackRefactorCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"CreateStackRefactor\", {}).n(\"CloudFormationClient\", \"CreateStackRefactorCommand\").f(void 0, void 0).ser(se_CreateStackRefactorCommand).de(de_CreateStackRefactorCommand).build() {\n static {\n __name(this, \"CreateStackRefactorCommand\");\n }\n};\n\n// src/commands/CreateStackSetCommand.ts\n\n\n\nvar CreateStackSetCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"CreateStackSet\", {}).n(\"CloudFormationClient\", \"CreateStackSetCommand\").f(void 0, void 0).ser(se_CreateStackSetCommand).de(de_CreateStackSetCommand).build() {\n static {\n __name(this, \"CreateStackSetCommand\");\n }\n};\n\n// src/commands/DeactivateOrganizationsAccessCommand.ts\n\n\n\nvar DeactivateOrganizationsAccessCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"DeactivateOrganizationsAccess\", {}).n(\"CloudFormationClient\", \"DeactivateOrganizationsAccessCommand\").f(void 0, void 0).ser(se_DeactivateOrganizationsAccessCommand).de(de_DeactivateOrganizationsAccessCommand).build() {\n static {\n __name(this, \"DeactivateOrganizationsAccessCommand\");\n }\n};\n\n// src/commands/DeactivateTypeCommand.ts\n\n\n\nvar DeactivateTypeCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"DeactivateType\", {}).n(\"CloudFormationClient\", \"DeactivateTypeCommand\").f(void 0, void 0).ser(se_DeactivateTypeCommand).de(de_DeactivateTypeCommand).build() {\n static {\n __name(this, \"DeactivateTypeCommand\");\n }\n};\n\n// src/commands/DeleteChangeSetCommand.ts\n\n\n\nvar DeleteChangeSetCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"DeleteChangeSet\", {}).n(\"CloudFormationClient\", \"DeleteChangeSetCommand\").f(void 0, void 0).ser(se_DeleteChangeSetCommand).de(de_DeleteChangeSetCommand).build() {\n static {\n __name(this, \"DeleteChangeSetCommand\");\n }\n};\n\n// src/commands/DeleteGeneratedTemplateCommand.ts\n\n\n\nvar DeleteGeneratedTemplateCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"DeleteGeneratedTemplate\", {}).n(\"CloudFormationClient\", \"DeleteGeneratedTemplateCommand\").f(void 0, void 0).ser(se_DeleteGeneratedTemplateCommand).de(de_DeleteGeneratedTemplateCommand).build() {\n static {\n __name(this, \"DeleteGeneratedTemplateCommand\");\n }\n};\n\n// src/commands/DeleteStackCommand.ts\n\n\n\nvar DeleteStackCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"DeleteStack\", {}).n(\"CloudFormationClient\", \"DeleteStackCommand\").f(void 0, void 0).ser(se_DeleteStackCommand).de(de_DeleteStackCommand).build() {\n static {\n __name(this, \"DeleteStackCommand\");\n }\n};\n\n// src/commands/DeleteStackInstancesCommand.ts\n\n\n\nvar DeleteStackInstancesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"DeleteStackInstances\", {}).n(\"CloudFormationClient\", \"DeleteStackInstancesCommand\").f(void 0, void 0).ser(se_DeleteStackInstancesCommand).de(de_DeleteStackInstancesCommand).build() {\n static {\n __name(this, \"DeleteStackInstancesCommand\");\n }\n};\n\n// src/commands/DeleteStackSetCommand.ts\n\n\n\nvar DeleteStackSetCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"DeleteStackSet\", {}).n(\"CloudFormationClient\", \"DeleteStackSetCommand\").f(void 0, void 0).ser(se_DeleteStackSetCommand).de(de_DeleteStackSetCommand).build() {\n static {\n __name(this, \"DeleteStackSetCommand\");\n }\n};\n\n// src/commands/DeregisterTypeCommand.ts\n\n\n\nvar DeregisterTypeCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"DeregisterType\", {}).n(\"CloudFormationClient\", \"DeregisterTypeCommand\").f(void 0, void 0).ser(se_DeregisterTypeCommand).de(de_DeregisterTypeCommand).build() {\n static {\n __name(this, \"DeregisterTypeCommand\");\n }\n};\n\n// src/commands/DescribeAccountLimitsCommand.ts\n\n\n\nvar DescribeAccountLimitsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"DescribeAccountLimits\", {}).n(\"CloudFormationClient\", \"DescribeAccountLimitsCommand\").f(void 0, void 0).ser(se_DescribeAccountLimitsCommand).de(de_DescribeAccountLimitsCommand).build() {\n static {\n __name(this, \"DescribeAccountLimitsCommand\");\n }\n};\n\n// src/commands/DescribeChangeSetCommand.ts\n\n\n\nvar DescribeChangeSetCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"DescribeChangeSet\", {}).n(\"CloudFormationClient\", \"DescribeChangeSetCommand\").f(void 0, void 0).ser(se_DescribeChangeSetCommand).de(de_DescribeChangeSetCommand).build() {\n static {\n __name(this, \"DescribeChangeSetCommand\");\n }\n};\n\n// src/commands/DescribeChangeSetHooksCommand.ts\n\n\n\nvar DescribeChangeSetHooksCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"DescribeChangeSetHooks\", {}).n(\"CloudFormationClient\", \"DescribeChangeSetHooksCommand\").f(void 0, void 0).ser(se_DescribeChangeSetHooksCommand).de(de_DescribeChangeSetHooksCommand).build() {\n static {\n __name(this, \"DescribeChangeSetHooksCommand\");\n }\n};\n\n// src/commands/DescribeGeneratedTemplateCommand.ts\n\n\n\nvar DescribeGeneratedTemplateCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"DescribeGeneratedTemplate\", {}).n(\"CloudFormationClient\", \"DescribeGeneratedTemplateCommand\").f(void 0, void 0).ser(se_DescribeGeneratedTemplateCommand).de(de_DescribeGeneratedTemplateCommand).build() {\n static {\n __name(this, \"DescribeGeneratedTemplateCommand\");\n }\n};\n\n// src/commands/DescribeOrganizationsAccessCommand.ts\n\n\n\nvar DescribeOrganizationsAccessCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"DescribeOrganizationsAccess\", {}).n(\"CloudFormationClient\", \"DescribeOrganizationsAccessCommand\").f(void 0, void 0).ser(se_DescribeOrganizationsAccessCommand).de(de_DescribeOrganizationsAccessCommand).build() {\n static {\n __name(this, \"DescribeOrganizationsAccessCommand\");\n }\n};\n\n// src/commands/DescribePublisherCommand.ts\n\n\n\nvar DescribePublisherCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"DescribePublisher\", {}).n(\"CloudFormationClient\", \"DescribePublisherCommand\").f(void 0, void 0).ser(se_DescribePublisherCommand).de(de_DescribePublisherCommand).build() {\n static {\n __name(this, \"DescribePublisherCommand\");\n }\n};\n\n// src/commands/DescribeResourceScanCommand.ts\n\n\n\nvar DescribeResourceScanCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"DescribeResourceScan\", {}).n(\"CloudFormationClient\", \"DescribeResourceScanCommand\").f(void 0, void 0).ser(se_DescribeResourceScanCommand).de(de_DescribeResourceScanCommand).build() {\n static {\n __name(this, \"DescribeResourceScanCommand\");\n }\n};\n\n// src/commands/DescribeStackDriftDetectionStatusCommand.ts\n\n\n\nvar DescribeStackDriftDetectionStatusCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"DescribeStackDriftDetectionStatus\", {}).n(\"CloudFormationClient\", \"DescribeStackDriftDetectionStatusCommand\").f(void 0, void 0).ser(se_DescribeStackDriftDetectionStatusCommand).de(de_DescribeStackDriftDetectionStatusCommand).build() {\n static {\n __name(this, \"DescribeStackDriftDetectionStatusCommand\");\n }\n};\n\n// src/commands/DescribeStackEventsCommand.ts\n\n\n\nvar DescribeStackEventsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"DescribeStackEvents\", {}).n(\"CloudFormationClient\", \"DescribeStackEventsCommand\").f(void 0, void 0).ser(se_DescribeStackEventsCommand).de(de_DescribeStackEventsCommand).build() {\n static {\n __name(this, \"DescribeStackEventsCommand\");\n }\n};\n\n// src/commands/DescribeStackInstanceCommand.ts\n\n\n\nvar DescribeStackInstanceCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"DescribeStackInstance\", {}).n(\"CloudFormationClient\", \"DescribeStackInstanceCommand\").f(void 0, void 0).ser(se_DescribeStackInstanceCommand).de(de_DescribeStackInstanceCommand).build() {\n static {\n __name(this, \"DescribeStackInstanceCommand\");\n }\n};\n\n// src/commands/DescribeStackRefactorCommand.ts\n\n\n\nvar DescribeStackRefactorCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"DescribeStackRefactor\", {}).n(\"CloudFormationClient\", \"DescribeStackRefactorCommand\").f(void 0, void 0).ser(se_DescribeStackRefactorCommand).de(de_DescribeStackRefactorCommand).build() {\n static {\n __name(this, \"DescribeStackRefactorCommand\");\n }\n};\n\n// src/commands/DescribeStackResourceCommand.ts\n\n\n\nvar DescribeStackResourceCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"DescribeStackResource\", {}).n(\"CloudFormationClient\", \"DescribeStackResourceCommand\").f(void 0, void 0).ser(se_DescribeStackResourceCommand).de(de_DescribeStackResourceCommand).build() {\n static {\n __name(this, \"DescribeStackResourceCommand\");\n }\n};\n\n// src/commands/DescribeStackResourceDriftsCommand.ts\n\n\n\nvar DescribeStackResourceDriftsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"DescribeStackResourceDrifts\", {}).n(\"CloudFormationClient\", \"DescribeStackResourceDriftsCommand\").f(void 0, void 0).ser(se_DescribeStackResourceDriftsCommand).de(de_DescribeStackResourceDriftsCommand).build() {\n static {\n __name(this, \"DescribeStackResourceDriftsCommand\");\n }\n};\n\n// src/commands/DescribeStackResourcesCommand.ts\n\n\n\nvar DescribeStackResourcesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"DescribeStackResources\", {}).n(\"CloudFormationClient\", \"DescribeStackResourcesCommand\").f(void 0, void 0).ser(se_DescribeStackResourcesCommand).de(de_DescribeStackResourcesCommand).build() {\n static {\n __name(this, \"DescribeStackResourcesCommand\");\n }\n};\n\n// src/commands/DescribeStacksCommand.ts\n\n\n\nvar DescribeStacksCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"DescribeStacks\", {}).n(\"CloudFormationClient\", \"DescribeStacksCommand\").f(void 0, void 0).ser(se_DescribeStacksCommand).de(de_DescribeStacksCommand).build() {\n static {\n __name(this, \"DescribeStacksCommand\");\n }\n};\n\n// src/commands/DescribeStackSetCommand.ts\n\n\n\nvar DescribeStackSetCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"DescribeStackSet\", {}).n(\"CloudFormationClient\", \"DescribeStackSetCommand\").f(void 0, void 0).ser(se_DescribeStackSetCommand).de(de_DescribeStackSetCommand).build() {\n static {\n __name(this, \"DescribeStackSetCommand\");\n }\n};\n\n// src/commands/DescribeStackSetOperationCommand.ts\n\n\n\nvar DescribeStackSetOperationCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"DescribeStackSetOperation\", {}).n(\"CloudFormationClient\", \"DescribeStackSetOperationCommand\").f(void 0, void 0).ser(se_DescribeStackSetOperationCommand).de(de_DescribeStackSetOperationCommand).build() {\n static {\n __name(this, \"DescribeStackSetOperationCommand\");\n }\n};\n\n// src/commands/DescribeTypeCommand.ts\n\n\n\nvar DescribeTypeCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"DescribeType\", {}).n(\"CloudFormationClient\", \"DescribeTypeCommand\").f(void 0, void 0).ser(se_DescribeTypeCommand).de(de_DescribeTypeCommand).build() {\n static {\n __name(this, \"DescribeTypeCommand\");\n }\n};\n\n// src/commands/DescribeTypeRegistrationCommand.ts\n\n\n\nvar DescribeTypeRegistrationCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"DescribeTypeRegistration\", {}).n(\"CloudFormationClient\", \"DescribeTypeRegistrationCommand\").f(void 0, void 0).ser(se_DescribeTypeRegistrationCommand).de(de_DescribeTypeRegistrationCommand).build() {\n static {\n __name(this, \"DescribeTypeRegistrationCommand\");\n }\n};\n\n// src/commands/DetectStackDriftCommand.ts\n\n\n\nvar DetectStackDriftCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"DetectStackDrift\", {}).n(\"CloudFormationClient\", \"DetectStackDriftCommand\").f(void 0, void 0).ser(se_DetectStackDriftCommand).de(de_DetectStackDriftCommand).build() {\n static {\n __name(this, \"DetectStackDriftCommand\");\n }\n};\n\n// src/commands/DetectStackResourceDriftCommand.ts\n\n\n\nvar DetectStackResourceDriftCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"DetectStackResourceDrift\", {}).n(\"CloudFormationClient\", \"DetectStackResourceDriftCommand\").f(void 0, void 0).ser(se_DetectStackResourceDriftCommand).de(de_DetectStackResourceDriftCommand).build() {\n static {\n __name(this, \"DetectStackResourceDriftCommand\");\n }\n};\n\n// src/commands/DetectStackSetDriftCommand.ts\n\n\n\nvar DetectStackSetDriftCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"DetectStackSetDrift\", {}).n(\"CloudFormationClient\", \"DetectStackSetDriftCommand\").f(void 0, void 0).ser(se_DetectStackSetDriftCommand).de(de_DetectStackSetDriftCommand).build() {\n static {\n __name(this, \"DetectStackSetDriftCommand\");\n }\n};\n\n// src/commands/EstimateTemplateCostCommand.ts\n\n\n\nvar EstimateTemplateCostCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"EstimateTemplateCost\", {}).n(\"CloudFormationClient\", \"EstimateTemplateCostCommand\").f(void 0, void 0).ser(se_EstimateTemplateCostCommand).de(de_EstimateTemplateCostCommand).build() {\n static {\n __name(this, \"EstimateTemplateCostCommand\");\n }\n};\n\n// src/commands/ExecuteChangeSetCommand.ts\n\n\n\nvar ExecuteChangeSetCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"ExecuteChangeSet\", {}).n(\"CloudFormationClient\", \"ExecuteChangeSetCommand\").f(void 0, void 0).ser(se_ExecuteChangeSetCommand).de(de_ExecuteChangeSetCommand).build() {\n static {\n __name(this, \"ExecuteChangeSetCommand\");\n }\n};\n\n// src/commands/ExecuteStackRefactorCommand.ts\n\n\n\nvar ExecuteStackRefactorCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"ExecuteStackRefactor\", {}).n(\"CloudFormationClient\", \"ExecuteStackRefactorCommand\").f(void 0, void 0).ser(se_ExecuteStackRefactorCommand).de(de_ExecuteStackRefactorCommand).build() {\n static {\n __name(this, \"ExecuteStackRefactorCommand\");\n }\n};\n\n// src/commands/GetGeneratedTemplateCommand.ts\n\n\n\nvar GetGeneratedTemplateCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"GetGeneratedTemplate\", {}).n(\"CloudFormationClient\", \"GetGeneratedTemplateCommand\").f(void 0, void 0).ser(se_GetGeneratedTemplateCommand).de(de_GetGeneratedTemplateCommand).build() {\n static {\n __name(this, \"GetGeneratedTemplateCommand\");\n }\n};\n\n// src/commands/GetStackPolicyCommand.ts\n\n\n\nvar GetStackPolicyCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"GetStackPolicy\", {}).n(\"CloudFormationClient\", \"GetStackPolicyCommand\").f(void 0, void 0).ser(se_GetStackPolicyCommand).de(de_GetStackPolicyCommand).build() {\n static {\n __name(this, \"GetStackPolicyCommand\");\n }\n};\n\n// src/commands/GetTemplateCommand.ts\n\n\n\nvar GetTemplateCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"GetTemplate\", {}).n(\"CloudFormationClient\", \"GetTemplateCommand\").f(void 0, void 0).ser(se_GetTemplateCommand).de(de_GetTemplateCommand).build() {\n static {\n __name(this, \"GetTemplateCommand\");\n }\n};\n\n// src/commands/GetTemplateSummaryCommand.ts\n\n\n\nvar GetTemplateSummaryCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"GetTemplateSummary\", {}).n(\"CloudFormationClient\", \"GetTemplateSummaryCommand\").f(void 0, void 0).ser(se_GetTemplateSummaryCommand).de(de_GetTemplateSummaryCommand).build() {\n static {\n __name(this, \"GetTemplateSummaryCommand\");\n }\n};\n\n// src/commands/ImportStacksToStackSetCommand.ts\n\n\n\nvar ImportStacksToStackSetCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"ImportStacksToStackSet\", {}).n(\"CloudFormationClient\", \"ImportStacksToStackSetCommand\").f(void 0, void 0).ser(se_ImportStacksToStackSetCommand).de(de_ImportStacksToStackSetCommand).build() {\n static {\n __name(this, \"ImportStacksToStackSetCommand\");\n }\n};\n\n// src/commands/ListChangeSetsCommand.ts\n\n\n\nvar ListChangeSetsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"ListChangeSets\", {}).n(\"CloudFormationClient\", \"ListChangeSetsCommand\").f(void 0, void 0).ser(se_ListChangeSetsCommand).de(de_ListChangeSetsCommand).build() {\n static {\n __name(this, \"ListChangeSetsCommand\");\n }\n};\n\n// src/commands/ListExportsCommand.ts\n\n\n\nvar ListExportsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"ListExports\", {}).n(\"CloudFormationClient\", \"ListExportsCommand\").f(void 0, void 0).ser(se_ListExportsCommand).de(de_ListExportsCommand).build() {\n static {\n __name(this, \"ListExportsCommand\");\n }\n};\n\n// src/commands/ListGeneratedTemplatesCommand.ts\n\n\n\nvar ListGeneratedTemplatesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"ListGeneratedTemplates\", {}).n(\"CloudFormationClient\", \"ListGeneratedTemplatesCommand\").f(void 0, void 0).ser(se_ListGeneratedTemplatesCommand).de(de_ListGeneratedTemplatesCommand).build() {\n static {\n __name(this, \"ListGeneratedTemplatesCommand\");\n }\n};\n\n// src/commands/ListHookResultsCommand.ts\n\n\n\nvar ListHookResultsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"ListHookResults\", {}).n(\"CloudFormationClient\", \"ListHookResultsCommand\").f(void 0, void 0).ser(se_ListHookResultsCommand).de(de_ListHookResultsCommand).build() {\n static {\n __name(this, \"ListHookResultsCommand\");\n }\n};\n\n// src/commands/ListImportsCommand.ts\n\n\n\nvar ListImportsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"ListImports\", {}).n(\"CloudFormationClient\", \"ListImportsCommand\").f(void 0, void 0).ser(se_ListImportsCommand).de(de_ListImportsCommand).build() {\n static {\n __name(this, \"ListImportsCommand\");\n }\n};\n\n// src/commands/ListResourceScanRelatedResourcesCommand.ts\n\n\n\nvar ListResourceScanRelatedResourcesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"ListResourceScanRelatedResources\", {}).n(\"CloudFormationClient\", \"ListResourceScanRelatedResourcesCommand\").f(void 0, void 0).ser(se_ListResourceScanRelatedResourcesCommand).de(de_ListResourceScanRelatedResourcesCommand).build() {\n static {\n __name(this, \"ListResourceScanRelatedResourcesCommand\");\n }\n};\n\n// src/commands/ListResourceScanResourcesCommand.ts\n\n\n\nvar ListResourceScanResourcesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"ListResourceScanResources\", {}).n(\"CloudFormationClient\", \"ListResourceScanResourcesCommand\").f(void 0, void 0).ser(se_ListResourceScanResourcesCommand).de(de_ListResourceScanResourcesCommand).build() {\n static {\n __name(this, \"ListResourceScanResourcesCommand\");\n }\n};\n\n// src/commands/ListResourceScansCommand.ts\n\n\n\nvar ListResourceScansCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"ListResourceScans\", {}).n(\"CloudFormationClient\", \"ListResourceScansCommand\").f(void 0, void 0).ser(se_ListResourceScansCommand).de(de_ListResourceScansCommand).build() {\n static {\n __name(this, \"ListResourceScansCommand\");\n }\n};\n\n// src/commands/ListStackInstanceResourceDriftsCommand.ts\n\n\n\nvar ListStackInstanceResourceDriftsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"ListStackInstanceResourceDrifts\", {}).n(\"CloudFormationClient\", \"ListStackInstanceResourceDriftsCommand\").f(void 0, void 0).ser(se_ListStackInstanceResourceDriftsCommand).de(de_ListStackInstanceResourceDriftsCommand).build() {\n static {\n __name(this, \"ListStackInstanceResourceDriftsCommand\");\n }\n};\n\n// src/commands/ListStackInstancesCommand.ts\n\n\n\nvar ListStackInstancesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"ListStackInstances\", {}).n(\"CloudFormationClient\", \"ListStackInstancesCommand\").f(void 0, void 0).ser(se_ListStackInstancesCommand).de(de_ListStackInstancesCommand).build() {\n static {\n __name(this, \"ListStackInstancesCommand\");\n }\n};\n\n// src/commands/ListStackRefactorActionsCommand.ts\n\n\n\nvar ListStackRefactorActionsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"ListStackRefactorActions\", {}).n(\"CloudFormationClient\", \"ListStackRefactorActionsCommand\").f(void 0, void 0).ser(se_ListStackRefactorActionsCommand).de(de_ListStackRefactorActionsCommand).build() {\n static {\n __name(this, \"ListStackRefactorActionsCommand\");\n }\n};\n\n// src/commands/ListStackRefactorsCommand.ts\n\n\n\nvar ListStackRefactorsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"ListStackRefactors\", {}).n(\"CloudFormationClient\", \"ListStackRefactorsCommand\").f(void 0, void 0).ser(se_ListStackRefactorsCommand).de(de_ListStackRefactorsCommand).build() {\n static {\n __name(this, \"ListStackRefactorsCommand\");\n }\n};\n\n// src/commands/ListStackResourcesCommand.ts\n\n\n\nvar ListStackResourcesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"ListStackResources\", {}).n(\"CloudFormationClient\", \"ListStackResourcesCommand\").f(void 0, void 0).ser(se_ListStackResourcesCommand).de(de_ListStackResourcesCommand).build() {\n static {\n __name(this, \"ListStackResourcesCommand\");\n }\n};\n\n// src/commands/ListStacksCommand.ts\n\n\n\nvar ListStacksCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"ListStacks\", {}).n(\"CloudFormationClient\", \"ListStacksCommand\").f(void 0, void 0).ser(se_ListStacksCommand).de(de_ListStacksCommand).build() {\n static {\n __name(this, \"ListStacksCommand\");\n }\n};\n\n// src/commands/ListStackSetAutoDeploymentTargetsCommand.ts\n\n\n\nvar ListStackSetAutoDeploymentTargetsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"ListStackSetAutoDeploymentTargets\", {}).n(\"CloudFormationClient\", \"ListStackSetAutoDeploymentTargetsCommand\").f(void 0, void 0).ser(se_ListStackSetAutoDeploymentTargetsCommand).de(de_ListStackSetAutoDeploymentTargetsCommand).build() {\n static {\n __name(this, \"ListStackSetAutoDeploymentTargetsCommand\");\n }\n};\n\n// src/commands/ListStackSetOperationResultsCommand.ts\n\n\n\nvar ListStackSetOperationResultsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"ListStackSetOperationResults\", {}).n(\"CloudFormationClient\", \"ListStackSetOperationResultsCommand\").f(void 0, void 0).ser(se_ListStackSetOperationResultsCommand).de(de_ListStackSetOperationResultsCommand).build() {\n static {\n __name(this, \"ListStackSetOperationResultsCommand\");\n }\n};\n\n// src/commands/ListStackSetOperationsCommand.ts\n\n\n\nvar ListStackSetOperationsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"ListStackSetOperations\", {}).n(\"CloudFormationClient\", \"ListStackSetOperationsCommand\").f(void 0, void 0).ser(se_ListStackSetOperationsCommand).de(de_ListStackSetOperationsCommand).build() {\n static {\n __name(this, \"ListStackSetOperationsCommand\");\n }\n};\n\n// src/commands/ListStackSetsCommand.ts\n\n\n\nvar ListStackSetsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"ListStackSets\", {}).n(\"CloudFormationClient\", \"ListStackSetsCommand\").f(void 0, void 0).ser(se_ListStackSetsCommand).de(de_ListStackSetsCommand).build() {\n static {\n __name(this, \"ListStackSetsCommand\");\n }\n};\n\n// src/commands/ListTypeRegistrationsCommand.ts\n\n\n\nvar ListTypeRegistrationsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"ListTypeRegistrations\", {}).n(\"CloudFormationClient\", \"ListTypeRegistrationsCommand\").f(void 0, void 0).ser(se_ListTypeRegistrationsCommand).de(de_ListTypeRegistrationsCommand).build() {\n static {\n __name(this, \"ListTypeRegistrationsCommand\");\n }\n};\n\n// src/commands/ListTypesCommand.ts\n\n\n\nvar ListTypesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"ListTypes\", {}).n(\"CloudFormationClient\", \"ListTypesCommand\").f(void 0, void 0).ser(se_ListTypesCommand).de(de_ListTypesCommand).build() {\n static {\n __name(this, \"ListTypesCommand\");\n }\n};\n\n// src/commands/ListTypeVersionsCommand.ts\n\n\n\nvar ListTypeVersionsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"ListTypeVersions\", {}).n(\"CloudFormationClient\", \"ListTypeVersionsCommand\").f(void 0, void 0).ser(se_ListTypeVersionsCommand).de(de_ListTypeVersionsCommand).build() {\n static {\n __name(this, \"ListTypeVersionsCommand\");\n }\n};\n\n// src/commands/PublishTypeCommand.ts\n\n\n\nvar PublishTypeCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"PublishType\", {}).n(\"CloudFormationClient\", \"PublishTypeCommand\").f(void 0, void 0).ser(se_PublishTypeCommand).de(de_PublishTypeCommand).build() {\n static {\n __name(this, \"PublishTypeCommand\");\n }\n};\n\n// src/commands/RecordHandlerProgressCommand.ts\n\n\n\nvar RecordHandlerProgressCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"RecordHandlerProgress\", {}).n(\"CloudFormationClient\", \"RecordHandlerProgressCommand\").f(void 0, void 0).ser(se_RecordHandlerProgressCommand).de(de_RecordHandlerProgressCommand).build() {\n static {\n __name(this, \"RecordHandlerProgressCommand\");\n }\n};\n\n// src/commands/RegisterPublisherCommand.ts\n\n\n\nvar RegisterPublisherCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"RegisterPublisher\", {}).n(\"CloudFormationClient\", \"RegisterPublisherCommand\").f(void 0, void 0).ser(se_RegisterPublisherCommand).de(de_RegisterPublisherCommand).build() {\n static {\n __name(this, \"RegisterPublisherCommand\");\n }\n};\n\n// src/commands/RegisterTypeCommand.ts\n\n\n\nvar RegisterTypeCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"RegisterType\", {}).n(\"CloudFormationClient\", \"RegisterTypeCommand\").f(void 0, void 0).ser(se_RegisterTypeCommand).de(de_RegisterTypeCommand).build() {\n static {\n __name(this, \"RegisterTypeCommand\");\n }\n};\n\n// src/commands/RollbackStackCommand.ts\n\n\n\nvar RollbackStackCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"RollbackStack\", {}).n(\"CloudFormationClient\", \"RollbackStackCommand\").f(void 0, void 0).ser(se_RollbackStackCommand).de(de_RollbackStackCommand).build() {\n static {\n __name(this, \"RollbackStackCommand\");\n }\n};\n\n// src/commands/SetStackPolicyCommand.ts\n\n\n\nvar SetStackPolicyCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"SetStackPolicy\", {}).n(\"CloudFormationClient\", \"SetStackPolicyCommand\").f(void 0, void 0).ser(se_SetStackPolicyCommand).de(de_SetStackPolicyCommand).build() {\n static {\n __name(this, \"SetStackPolicyCommand\");\n }\n};\n\n// src/commands/SetTypeConfigurationCommand.ts\n\n\n\nvar SetTypeConfigurationCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"SetTypeConfiguration\", {}).n(\"CloudFormationClient\", \"SetTypeConfigurationCommand\").f(void 0, void 0).ser(se_SetTypeConfigurationCommand).de(de_SetTypeConfigurationCommand).build() {\n static {\n __name(this, \"SetTypeConfigurationCommand\");\n }\n};\n\n// src/commands/SetTypeDefaultVersionCommand.ts\n\n\n\nvar SetTypeDefaultVersionCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"SetTypeDefaultVersion\", {}).n(\"CloudFormationClient\", \"SetTypeDefaultVersionCommand\").f(void 0, void 0).ser(se_SetTypeDefaultVersionCommand).de(de_SetTypeDefaultVersionCommand).build() {\n static {\n __name(this, \"SetTypeDefaultVersionCommand\");\n }\n};\n\n// src/commands/SignalResourceCommand.ts\n\n\n\nvar SignalResourceCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"SignalResource\", {}).n(\"CloudFormationClient\", \"SignalResourceCommand\").f(void 0, void 0).ser(se_SignalResourceCommand).de(de_SignalResourceCommand).build() {\n static {\n __name(this, \"SignalResourceCommand\");\n }\n};\n\n// src/commands/StartResourceScanCommand.ts\n\n\n\nvar StartResourceScanCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"StartResourceScan\", {}).n(\"CloudFormationClient\", \"StartResourceScanCommand\").f(void 0, void 0).ser(se_StartResourceScanCommand).de(de_StartResourceScanCommand).build() {\n static {\n __name(this, \"StartResourceScanCommand\");\n }\n};\n\n// src/commands/StopStackSetOperationCommand.ts\n\n\n\nvar StopStackSetOperationCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"StopStackSetOperation\", {}).n(\"CloudFormationClient\", \"StopStackSetOperationCommand\").f(void 0, void 0).ser(se_StopStackSetOperationCommand).de(de_StopStackSetOperationCommand).build() {\n static {\n __name(this, \"StopStackSetOperationCommand\");\n }\n};\n\n// src/commands/TestTypeCommand.ts\n\n\n\nvar TestTypeCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"TestType\", {}).n(\"CloudFormationClient\", \"TestTypeCommand\").f(void 0, void 0).ser(se_TestTypeCommand).de(de_TestTypeCommand).build() {\n static {\n __name(this, \"TestTypeCommand\");\n }\n};\n\n// src/commands/UpdateGeneratedTemplateCommand.ts\n\n\n\nvar UpdateGeneratedTemplateCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"UpdateGeneratedTemplate\", {}).n(\"CloudFormationClient\", \"UpdateGeneratedTemplateCommand\").f(void 0, void 0).ser(se_UpdateGeneratedTemplateCommand).de(de_UpdateGeneratedTemplateCommand).build() {\n static {\n __name(this, \"UpdateGeneratedTemplateCommand\");\n }\n};\n\n// src/commands/UpdateStackCommand.ts\n\n\n\nvar UpdateStackCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"UpdateStack\", {}).n(\"CloudFormationClient\", \"UpdateStackCommand\").f(void 0, void 0).ser(se_UpdateStackCommand).de(de_UpdateStackCommand).build() {\n static {\n __name(this, \"UpdateStackCommand\");\n }\n};\n\n// src/commands/UpdateStackInstancesCommand.ts\n\n\n\nvar UpdateStackInstancesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"UpdateStackInstances\", {}).n(\"CloudFormationClient\", \"UpdateStackInstancesCommand\").f(void 0, void 0).ser(se_UpdateStackInstancesCommand).de(de_UpdateStackInstancesCommand).build() {\n static {\n __name(this, \"UpdateStackInstancesCommand\");\n }\n};\n\n// src/commands/UpdateStackSetCommand.ts\n\n\n\nvar UpdateStackSetCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"UpdateStackSet\", {}).n(\"CloudFormationClient\", \"UpdateStackSetCommand\").f(void 0, void 0).ser(se_UpdateStackSetCommand).de(de_UpdateStackSetCommand).build() {\n static {\n __name(this, \"UpdateStackSetCommand\");\n }\n};\n\n// src/commands/UpdateTerminationProtectionCommand.ts\n\n\n\nvar UpdateTerminationProtectionCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"UpdateTerminationProtection\", {}).n(\"CloudFormationClient\", \"UpdateTerminationProtectionCommand\").f(void 0, void 0).ser(se_UpdateTerminationProtectionCommand).de(de_UpdateTerminationProtectionCommand).build() {\n static {\n __name(this, \"UpdateTerminationProtectionCommand\");\n }\n};\n\n// src/commands/ValidateTemplateCommand.ts\n\n\n\nvar ValidateTemplateCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"CloudFormation\", \"ValidateTemplate\", {}).n(\"CloudFormationClient\", \"ValidateTemplateCommand\").f(void 0, void 0).ser(se_ValidateTemplateCommand).de(de_ValidateTemplateCommand).build() {\n static {\n __name(this, \"ValidateTemplateCommand\");\n }\n};\n\n// src/CloudFormation.ts\nvar commands = {\n ActivateOrganizationsAccessCommand,\n ActivateTypeCommand,\n BatchDescribeTypeConfigurationsCommand,\n CancelUpdateStackCommand,\n ContinueUpdateRollbackCommand,\n CreateChangeSetCommand,\n CreateGeneratedTemplateCommand,\n CreateStackCommand,\n CreateStackInstancesCommand,\n CreateStackRefactorCommand,\n CreateStackSetCommand,\n DeactivateOrganizationsAccessCommand,\n DeactivateTypeCommand,\n DeleteChangeSetCommand,\n DeleteGeneratedTemplateCommand,\n DeleteStackCommand,\n DeleteStackInstancesCommand,\n DeleteStackSetCommand,\n DeregisterTypeCommand,\n DescribeAccountLimitsCommand,\n DescribeChangeSetCommand,\n DescribeChangeSetHooksCommand,\n DescribeGeneratedTemplateCommand,\n DescribeOrganizationsAccessCommand,\n DescribePublisherCommand,\n DescribeResourceScanCommand,\n DescribeStackDriftDetectionStatusCommand,\n DescribeStackEventsCommand,\n DescribeStackInstanceCommand,\n DescribeStackRefactorCommand,\n DescribeStackResourceCommand,\n DescribeStackResourceDriftsCommand,\n DescribeStackResourcesCommand,\n DescribeStacksCommand,\n DescribeStackSetCommand,\n DescribeStackSetOperationCommand,\n DescribeTypeCommand,\n DescribeTypeRegistrationCommand,\n DetectStackDriftCommand,\n DetectStackResourceDriftCommand,\n DetectStackSetDriftCommand,\n EstimateTemplateCostCommand,\n ExecuteChangeSetCommand,\n ExecuteStackRefactorCommand,\n GetGeneratedTemplateCommand,\n GetStackPolicyCommand,\n GetTemplateCommand,\n GetTemplateSummaryCommand,\n ImportStacksToStackSetCommand,\n ListChangeSetsCommand,\n ListExportsCommand,\n ListGeneratedTemplatesCommand,\n ListHookResultsCommand,\n ListImportsCommand,\n ListResourceScanRelatedResourcesCommand,\n ListResourceScanResourcesCommand,\n ListResourceScansCommand,\n ListStackInstanceResourceDriftsCommand,\n ListStackInstancesCommand,\n ListStackRefactorActionsCommand,\n ListStackRefactorsCommand,\n ListStackResourcesCommand,\n ListStacksCommand,\n ListStackSetAutoDeploymentTargetsCommand,\n ListStackSetOperationResultsCommand,\n ListStackSetOperationsCommand,\n ListStackSetsCommand,\n ListTypeRegistrationsCommand,\n ListTypesCommand,\n ListTypeVersionsCommand,\n PublishTypeCommand,\n RecordHandlerProgressCommand,\n RegisterPublisherCommand,\n RegisterTypeCommand,\n RollbackStackCommand,\n SetStackPolicyCommand,\n SetTypeConfigurationCommand,\n SetTypeDefaultVersionCommand,\n SignalResourceCommand,\n StartResourceScanCommand,\n StopStackSetOperationCommand,\n TestTypeCommand,\n UpdateGeneratedTemplateCommand,\n UpdateStackCommand,\n UpdateStackInstancesCommand,\n UpdateStackSetCommand,\n UpdateTerminationProtectionCommand,\n ValidateTemplateCommand\n};\nvar CloudFormation = class extends CloudFormationClient {\n static {\n __name(this, \"CloudFormation\");\n }\n};\n(0, import_smithy_client.createAggregatedClient)(commands, CloudFormation);\n\n// src/pagination/DescribeAccountLimitsPaginator.ts\n\nvar paginateDescribeAccountLimits = (0, import_core.createPaginator)(CloudFormationClient, DescribeAccountLimitsCommand, \"NextToken\", \"NextToken\", \"\");\n\n// src/pagination/DescribeStackEventsPaginator.ts\n\nvar paginateDescribeStackEvents = (0, import_core.createPaginator)(CloudFormationClient, DescribeStackEventsCommand, \"NextToken\", \"NextToken\", \"\");\n\n// src/pagination/DescribeStackResourceDriftsPaginator.ts\n\nvar paginateDescribeStackResourceDrifts = (0, import_core.createPaginator)(CloudFormationClient, DescribeStackResourceDriftsCommand, \"NextToken\", \"NextToken\", \"MaxResults\");\n\n// src/pagination/DescribeStacksPaginator.ts\n\nvar paginateDescribeStacks = (0, import_core.createPaginator)(CloudFormationClient, DescribeStacksCommand, \"NextToken\", \"NextToken\", \"\");\n\n// src/pagination/ListChangeSetsPaginator.ts\n\nvar paginateListChangeSets = (0, import_core.createPaginator)(CloudFormationClient, ListChangeSetsCommand, \"NextToken\", \"NextToken\", \"\");\n\n// src/pagination/ListExportsPaginator.ts\n\nvar paginateListExports = (0, import_core.createPaginator)(CloudFormationClient, ListExportsCommand, \"NextToken\", \"NextToken\", \"\");\n\n// src/pagination/ListGeneratedTemplatesPaginator.ts\n\nvar paginateListGeneratedTemplates = (0, import_core.createPaginator)(CloudFormationClient, ListGeneratedTemplatesCommand, \"NextToken\", \"NextToken\", \"MaxResults\");\n\n// src/pagination/ListImportsPaginator.ts\n\nvar paginateListImports = (0, import_core.createPaginator)(CloudFormationClient, ListImportsCommand, \"NextToken\", \"NextToken\", \"\");\n\n// src/pagination/ListResourceScanRelatedResourcesPaginator.ts\n\nvar paginateListResourceScanRelatedResources = (0, import_core.createPaginator)(CloudFormationClient, ListResourceScanRelatedResourcesCommand, \"NextToken\", \"NextToken\", \"MaxResults\");\n\n// src/pagination/ListResourceScanResourcesPaginator.ts\n\nvar paginateListResourceScanResources = (0, import_core.createPaginator)(CloudFormationClient, ListResourceScanResourcesCommand, \"NextToken\", \"NextToken\", \"MaxResults\");\n\n// src/pagination/ListResourceScansPaginator.ts\n\nvar paginateListResourceScans = (0, import_core.createPaginator)(CloudFormationClient, ListResourceScansCommand, \"NextToken\", \"NextToken\", \"MaxResults\");\n\n// src/pagination/ListStackInstancesPaginator.ts\n\nvar paginateListStackInstances = (0, import_core.createPaginator)(CloudFormationClient, ListStackInstancesCommand, \"NextToken\", \"NextToken\", \"MaxResults\");\n\n// src/pagination/ListStackRefactorActionsPaginator.ts\n\nvar paginateListStackRefactorActions = (0, import_core.createPaginator)(CloudFormationClient, ListStackRefactorActionsCommand, \"NextToken\", \"NextToken\", \"MaxResults\");\n\n// src/pagination/ListStackRefactorsPaginator.ts\n\nvar paginateListStackRefactors = (0, import_core.createPaginator)(CloudFormationClient, ListStackRefactorsCommand, \"NextToken\", \"NextToken\", \"MaxResults\");\n\n// src/pagination/ListStackResourcesPaginator.ts\n\nvar paginateListStackResources = (0, import_core.createPaginator)(CloudFormationClient, ListStackResourcesCommand, \"NextToken\", \"NextToken\", \"\");\n\n// src/pagination/ListStackSetOperationResultsPaginator.ts\n\nvar paginateListStackSetOperationResults = (0, import_core.createPaginator)(CloudFormationClient, ListStackSetOperationResultsCommand, \"NextToken\", \"NextToken\", \"MaxResults\");\n\n// src/pagination/ListStackSetOperationsPaginator.ts\n\nvar paginateListStackSetOperations = (0, import_core.createPaginator)(CloudFormationClient, ListStackSetOperationsCommand, \"NextToken\", \"NextToken\", \"MaxResults\");\n\n// src/pagination/ListStackSetsPaginator.ts\n\nvar paginateListStackSets = (0, import_core.createPaginator)(CloudFormationClient, ListStackSetsCommand, \"NextToken\", \"NextToken\", \"MaxResults\");\n\n// src/pagination/ListStacksPaginator.ts\n\nvar paginateListStacks = (0, import_core.createPaginator)(CloudFormationClient, ListStacksCommand, \"NextToken\", \"NextToken\", \"\");\n\n// src/pagination/ListTypeRegistrationsPaginator.ts\n\nvar paginateListTypeRegistrations = (0, import_core.createPaginator)(CloudFormationClient, ListTypeRegistrationsCommand, \"NextToken\", \"NextToken\", \"MaxResults\");\n\n// src/pagination/ListTypeVersionsPaginator.ts\n\nvar paginateListTypeVersions = (0, import_core.createPaginator)(CloudFormationClient, ListTypeVersionsCommand, \"NextToken\", \"NextToken\", \"MaxResults\");\n\n// src/pagination/ListTypesPaginator.ts\n\nvar paginateListTypes = (0, import_core.createPaginator)(CloudFormationClient, ListTypesCommand, \"NextToken\", \"NextToken\", \"MaxResults\");\n\n// src/waiters/waitForChangeSetCreateComplete.ts\nvar import_util_waiter = require(\"@smithy/util-waiter\");\nvar checkState = /* @__PURE__ */ __name(async (client, input) => {\n let reason;\n try {\n const result = await client.send(new DescribeChangeSetCommand(input));\n reason = result;\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n return result.Status;\n }, \"returnComparator\");\n if (returnComparator() === \"CREATE_COMPLETE\") {\n return { state: import_util_waiter.WaiterState.SUCCESS, reason };\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n return result.Status;\n }, \"returnComparator\");\n if (returnComparator() === \"FAILED\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n } catch (e) {\n }\n } catch (exception) {\n reason = exception;\n if (exception.name && exception.name == \"ValidationError\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n }\n return { state: import_util_waiter.WaiterState.RETRY, reason };\n}, \"checkState\");\nvar waitForChangeSetCreateComplete = /* @__PURE__ */ __name(async (params, input) => {\n const serviceDefaults = { minDelay: 30, maxDelay: 120 };\n return (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState);\n}, \"waitForChangeSetCreateComplete\");\nvar waitUntilChangeSetCreateComplete = /* @__PURE__ */ __name(async (params, input) => {\n const serviceDefaults = { minDelay: 30, maxDelay: 120 };\n const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState);\n return (0, import_util_waiter.checkExceptions)(result);\n}, \"waitUntilChangeSetCreateComplete\");\n\n// src/waiters/waitForStackCreateComplete.ts\n\nvar checkState2 = /* @__PURE__ */ __name(async (client, input) => {\n let reason;\n try {\n const result = await client.send(new DescribeStacksCommand(input));\n reason = result;\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n let allStringEq_5 = returnComparator().length > 0;\n for (const element_4 of returnComparator()) {\n allStringEq_5 = allStringEq_5 && element_4 == \"CREATE_COMPLETE\";\n }\n if (allStringEq_5) {\n return { state: import_util_waiter.WaiterState.SUCCESS, reason };\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n let allStringEq_5 = returnComparator().length > 0;\n for (const element_4 of returnComparator()) {\n allStringEq_5 = allStringEq_5 && element_4 == \"UPDATE_COMPLETE\";\n }\n if (allStringEq_5) {\n return { state: import_util_waiter.WaiterState.SUCCESS, reason };\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n let allStringEq_5 = returnComparator().length > 0;\n for (const element_4 of returnComparator()) {\n allStringEq_5 = allStringEq_5 && element_4 == \"UPDATE_IN_PROGRESS\";\n }\n if (allStringEq_5) {\n return { state: import_util_waiter.WaiterState.SUCCESS, reason };\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n let allStringEq_5 = returnComparator().length > 0;\n for (const element_4 of returnComparator()) {\n allStringEq_5 = allStringEq_5 && element_4 == \"UPDATE_COMPLETE_CLEANUP_IN_PROGRESS\";\n }\n if (allStringEq_5) {\n return { state: import_util_waiter.WaiterState.SUCCESS, reason };\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n let allStringEq_5 = returnComparator().length > 0;\n for (const element_4 of returnComparator()) {\n allStringEq_5 = allStringEq_5 && element_4 == \"UPDATE_FAILED\";\n }\n if (allStringEq_5) {\n return { state: import_util_waiter.WaiterState.SUCCESS, reason };\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n let allStringEq_5 = returnComparator().length > 0;\n for (const element_4 of returnComparator()) {\n allStringEq_5 = allStringEq_5 && element_4 == \"UPDATE_ROLLBACK_IN_PROGRESS\";\n }\n if (allStringEq_5) {\n return { state: import_util_waiter.WaiterState.SUCCESS, reason };\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n let allStringEq_5 = returnComparator().length > 0;\n for (const element_4 of returnComparator()) {\n allStringEq_5 = allStringEq_5 && element_4 == \"UPDATE_ROLLBACK_FAILED\";\n }\n if (allStringEq_5) {\n return { state: import_util_waiter.WaiterState.SUCCESS, reason };\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n let allStringEq_5 = returnComparator().length > 0;\n for (const element_4 of returnComparator()) {\n allStringEq_5 = allStringEq_5 && element_4 == \"UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS\";\n }\n if (allStringEq_5) {\n return { state: import_util_waiter.WaiterState.SUCCESS, reason };\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n let allStringEq_5 = returnComparator().length > 0;\n for (const element_4 of returnComparator()) {\n allStringEq_5 = allStringEq_5 && element_4 == \"UPDATE_ROLLBACK_COMPLETE\";\n }\n if (allStringEq_5) {\n return { state: import_util_waiter.WaiterState.SUCCESS, reason };\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n for (const anyStringEq_4 of returnComparator()) {\n if (anyStringEq_4 == \"CREATE_FAILED\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n for (const anyStringEq_4 of returnComparator()) {\n if (anyStringEq_4 == \"DELETE_COMPLETE\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n for (const anyStringEq_4 of returnComparator()) {\n if (anyStringEq_4 == \"DELETE_FAILED\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n for (const anyStringEq_4 of returnComparator()) {\n if (anyStringEq_4 == \"ROLLBACK_FAILED\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n for (const anyStringEq_4 of returnComparator()) {\n if (anyStringEq_4 == \"ROLLBACK_COMPLETE\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n }\n } catch (e) {\n }\n } catch (exception) {\n reason = exception;\n if (exception.name && exception.name == \"ValidationError\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n }\n return { state: import_util_waiter.WaiterState.RETRY, reason };\n}, \"checkState\");\nvar waitForStackCreateComplete = /* @__PURE__ */ __name(async (params, input) => {\n const serviceDefaults = { minDelay: 30, maxDelay: 120 };\n return (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState2);\n}, \"waitForStackCreateComplete\");\nvar waitUntilStackCreateComplete = /* @__PURE__ */ __name(async (params, input) => {\n const serviceDefaults = { minDelay: 30, maxDelay: 120 };\n const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState2);\n return (0, import_util_waiter.checkExceptions)(result);\n}, \"waitUntilStackCreateComplete\");\n\n// src/waiters/waitForStackDeleteComplete.ts\n\nvar checkState3 = /* @__PURE__ */ __name(async (client, input) => {\n let reason;\n try {\n const result = await client.send(new DescribeStacksCommand(input));\n reason = result;\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n let allStringEq_5 = returnComparator().length > 0;\n for (const element_4 of returnComparator()) {\n allStringEq_5 = allStringEq_5 && element_4 == \"DELETE_COMPLETE\";\n }\n if (allStringEq_5) {\n return { state: import_util_waiter.WaiterState.SUCCESS, reason };\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n for (const anyStringEq_4 of returnComparator()) {\n if (anyStringEq_4 == \"DELETE_FAILED\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n for (const anyStringEq_4 of returnComparator()) {\n if (anyStringEq_4 == \"CREATE_FAILED\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n for (const anyStringEq_4 of returnComparator()) {\n if (anyStringEq_4 == \"ROLLBACK_FAILED\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n for (const anyStringEq_4 of returnComparator()) {\n if (anyStringEq_4 == \"UPDATE_ROLLBACK_IN_PROGRESS\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n for (const anyStringEq_4 of returnComparator()) {\n if (anyStringEq_4 == \"UPDATE_ROLLBACK_FAILED\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n for (const anyStringEq_4 of returnComparator()) {\n if (anyStringEq_4 == \"UPDATE_ROLLBACK_COMPLETE\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n for (const anyStringEq_4 of returnComparator()) {\n if (anyStringEq_4 == \"UPDATE_COMPLETE\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n }\n } catch (e) {\n }\n } catch (exception) {\n reason = exception;\n if (exception.name && exception.name == \"ValidationError\") {\n return { state: import_util_waiter.WaiterState.SUCCESS, reason };\n }\n }\n return { state: import_util_waiter.WaiterState.RETRY, reason };\n}, \"checkState\");\nvar waitForStackDeleteComplete = /* @__PURE__ */ __name(async (params, input) => {\n const serviceDefaults = { minDelay: 30, maxDelay: 120 };\n return (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState3);\n}, \"waitForStackDeleteComplete\");\nvar waitUntilStackDeleteComplete = /* @__PURE__ */ __name(async (params, input) => {\n const serviceDefaults = { minDelay: 30, maxDelay: 120 };\n const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState3);\n return (0, import_util_waiter.checkExceptions)(result);\n}, \"waitUntilStackDeleteComplete\");\n\n// src/waiters/waitForStackExists.ts\n\nvar checkState4 = /* @__PURE__ */ __name(async (client, input) => {\n let reason;\n try {\n const result = await client.send(new DescribeStacksCommand(input));\n reason = result;\n return { state: import_util_waiter.WaiterState.SUCCESS, reason };\n } catch (exception) {\n reason = exception;\n if (exception.name && exception.name == \"ValidationError\") {\n return { state: import_util_waiter.WaiterState.RETRY, reason };\n }\n }\n return { state: import_util_waiter.WaiterState.RETRY, reason };\n}, \"checkState\");\nvar waitForStackExists = /* @__PURE__ */ __name(async (params, input) => {\n const serviceDefaults = { minDelay: 5, maxDelay: 120 };\n return (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState4);\n}, \"waitForStackExists\");\nvar waitUntilStackExists = /* @__PURE__ */ __name(async (params, input) => {\n const serviceDefaults = { minDelay: 5, maxDelay: 120 };\n const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState4);\n return (0, import_util_waiter.checkExceptions)(result);\n}, \"waitUntilStackExists\");\n\n// src/waiters/waitForStackImportComplete.ts\n\nvar checkState5 = /* @__PURE__ */ __name(async (client, input) => {\n let reason;\n try {\n const result = await client.send(new DescribeStacksCommand(input));\n reason = result;\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n let allStringEq_5 = returnComparator().length > 0;\n for (const element_4 of returnComparator()) {\n allStringEq_5 = allStringEq_5 && element_4 == \"IMPORT_COMPLETE\";\n }\n if (allStringEq_5) {\n return { state: import_util_waiter.WaiterState.SUCCESS, reason };\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n for (const anyStringEq_4 of returnComparator()) {\n if (anyStringEq_4 == \"ROLLBACK_COMPLETE\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n for (const anyStringEq_4 of returnComparator()) {\n if (anyStringEq_4 == \"ROLLBACK_FAILED\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n for (const anyStringEq_4 of returnComparator()) {\n if (anyStringEq_4 == \"IMPORT_ROLLBACK_IN_PROGRESS\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n for (const anyStringEq_4 of returnComparator()) {\n if (anyStringEq_4 == \"IMPORT_ROLLBACK_FAILED\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n for (const anyStringEq_4 of returnComparator()) {\n if (anyStringEq_4 == \"IMPORT_ROLLBACK_COMPLETE\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n }\n } catch (e) {\n }\n } catch (exception) {\n reason = exception;\n if (exception.name && exception.name == \"ValidationError\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n }\n return { state: import_util_waiter.WaiterState.RETRY, reason };\n}, \"checkState\");\nvar waitForStackImportComplete = /* @__PURE__ */ __name(async (params, input) => {\n const serviceDefaults = { minDelay: 30, maxDelay: 120 };\n return (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState5);\n}, \"waitForStackImportComplete\");\nvar waitUntilStackImportComplete = /* @__PURE__ */ __name(async (params, input) => {\n const serviceDefaults = { minDelay: 30, maxDelay: 120 };\n const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState5);\n return (0, import_util_waiter.checkExceptions)(result);\n}, \"waitUntilStackImportComplete\");\n\n// src/waiters/waitForStackRefactorCreateComplete.ts\n\nvar checkState6 = /* @__PURE__ */ __name(async (client, input) => {\n let reason;\n try {\n const result = await client.send(new DescribeStackRefactorCommand(input));\n reason = result;\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n return result.Status;\n }, \"returnComparator\");\n if (returnComparator() === \"CREATE_COMPLETE\") {\n return { state: import_util_waiter.WaiterState.SUCCESS, reason };\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n return result.Status;\n }, \"returnComparator\");\n if (returnComparator() === \"CREATE_FAILED\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n } catch (e) {\n }\n } catch (exception) {\n reason = exception;\n if (exception.name && exception.name == \"ValidationError\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n }\n return { state: import_util_waiter.WaiterState.RETRY, reason };\n}, \"checkState\");\nvar waitForStackRefactorCreateComplete = /* @__PURE__ */ __name(async (params, input) => {\n const serviceDefaults = { minDelay: 5, maxDelay: 120 };\n return (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState6);\n}, \"waitForStackRefactorCreateComplete\");\nvar waitUntilStackRefactorCreateComplete = /* @__PURE__ */ __name(async (params, input) => {\n const serviceDefaults = { minDelay: 5, maxDelay: 120 };\n const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState6);\n return (0, import_util_waiter.checkExceptions)(result);\n}, \"waitUntilStackRefactorCreateComplete\");\n\n// src/waiters/waitForStackRefactorExecuteComplete.ts\n\nvar checkState7 = /* @__PURE__ */ __name(async (client, input) => {\n let reason;\n try {\n const result = await client.send(new DescribeStackRefactorCommand(input));\n reason = result;\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n return result.ExecutionStatus;\n }, \"returnComparator\");\n if (returnComparator() === \"EXECUTE_COMPLETE\") {\n return { state: import_util_waiter.WaiterState.SUCCESS, reason };\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n return result.ExecutionStatus;\n }, \"returnComparator\");\n if (returnComparator() === \"EXECUTE_FAILED\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n return result.ExecutionStatus;\n }, \"returnComparator\");\n if (returnComparator() === \"ROLLBACK_COMPLETE\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n } catch (e) {\n }\n } catch (exception) {\n reason = exception;\n if (exception.name && exception.name == \"ValidationError\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n }\n return { state: import_util_waiter.WaiterState.RETRY, reason };\n}, \"checkState\");\nvar waitForStackRefactorExecuteComplete = /* @__PURE__ */ __name(async (params, input) => {\n const serviceDefaults = { minDelay: 15, maxDelay: 120 };\n return (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState7);\n}, \"waitForStackRefactorExecuteComplete\");\nvar waitUntilStackRefactorExecuteComplete = /* @__PURE__ */ __name(async (params, input) => {\n const serviceDefaults = { minDelay: 15, maxDelay: 120 };\n const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState7);\n return (0, import_util_waiter.checkExceptions)(result);\n}, \"waitUntilStackRefactorExecuteComplete\");\n\n// src/waiters/waitForStackRollbackComplete.ts\n\nvar checkState8 = /* @__PURE__ */ __name(async (client, input) => {\n let reason;\n try {\n const result = await client.send(new DescribeStacksCommand(input));\n reason = result;\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n let allStringEq_5 = returnComparator().length > 0;\n for (const element_4 of returnComparator()) {\n allStringEq_5 = allStringEq_5 && element_4 == \"UPDATE_ROLLBACK_COMPLETE\";\n }\n if (allStringEq_5) {\n return { state: import_util_waiter.WaiterState.SUCCESS, reason };\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n for (const anyStringEq_4 of returnComparator()) {\n if (anyStringEq_4 == \"UPDATE_FAILED\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n for (const anyStringEq_4 of returnComparator()) {\n if (anyStringEq_4 == \"UPDATE_ROLLBACK_FAILED\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n for (const anyStringEq_4 of returnComparator()) {\n if (anyStringEq_4 == \"DELETE_FAILED\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n }\n } catch (e) {\n }\n } catch (exception) {\n reason = exception;\n if (exception.name && exception.name == \"ValidationError\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n }\n return { state: import_util_waiter.WaiterState.RETRY, reason };\n}, \"checkState\");\nvar waitForStackRollbackComplete = /* @__PURE__ */ __name(async (params, input) => {\n const serviceDefaults = { minDelay: 30, maxDelay: 120 };\n return (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState8);\n}, \"waitForStackRollbackComplete\");\nvar waitUntilStackRollbackComplete = /* @__PURE__ */ __name(async (params, input) => {\n const serviceDefaults = { minDelay: 30, maxDelay: 120 };\n const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState8);\n return (0, import_util_waiter.checkExceptions)(result);\n}, \"waitUntilStackRollbackComplete\");\n\n// src/waiters/waitForStackUpdateComplete.ts\n\nvar checkState9 = /* @__PURE__ */ __name(async (client, input) => {\n let reason;\n try {\n const result = await client.send(new DescribeStacksCommand(input));\n reason = result;\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n let allStringEq_5 = returnComparator().length > 0;\n for (const element_4 of returnComparator()) {\n allStringEq_5 = allStringEq_5 && element_4 == \"UPDATE_COMPLETE\";\n }\n if (allStringEq_5) {\n return { state: import_util_waiter.WaiterState.SUCCESS, reason };\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n for (const anyStringEq_4 of returnComparator()) {\n if (anyStringEq_4 == \"UPDATE_FAILED\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n for (const anyStringEq_4 of returnComparator()) {\n if (anyStringEq_4 == \"UPDATE_ROLLBACK_FAILED\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n const flat_1 = [].concat(...result.Stacks);\n const projection_3 = flat_1.map((element_2) => {\n return element_2.StackStatus;\n });\n return projection_3;\n }, \"returnComparator\");\n for (const anyStringEq_4 of returnComparator()) {\n if (anyStringEq_4 == \"UPDATE_ROLLBACK_COMPLETE\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n }\n } catch (e) {\n }\n } catch (exception) {\n reason = exception;\n if (exception.name && exception.name == \"ValidationError\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n }\n return { state: import_util_waiter.WaiterState.RETRY, reason };\n}, \"checkState\");\nvar waitForStackUpdateComplete = /* @__PURE__ */ __name(async (params, input) => {\n const serviceDefaults = { minDelay: 30, maxDelay: 120 };\n return (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState9);\n}, \"waitForStackUpdateComplete\");\nvar waitUntilStackUpdateComplete = /* @__PURE__ */ __name(async (params, input) => {\n const serviceDefaults = { minDelay: 30, maxDelay: 120 };\n const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState9);\n return (0, import_util_waiter.checkExceptions)(result);\n}, \"waitUntilStackUpdateComplete\");\n\n// src/waiters/waitForTypeRegistrationComplete.ts\n\nvar checkState10 = /* @__PURE__ */ __name(async (client, input) => {\n let reason;\n try {\n const result = await client.send(new DescribeTypeRegistrationCommand(input));\n reason = result;\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n return result.ProgressStatus;\n }, \"returnComparator\");\n if (returnComparator() === \"COMPLETE\") {\n return { state: import_util_waiter.WaiterState.SUCCESS, reason };\n }\n } catch (e) {\n }\n try {\n const returnComparator = /* @__PURE__ */ __name(() => {\n return result.ProgressStatus;\n }, \"returnComparator\");\n if (returnComparator() === \"FAILED\") {\n return { state: import_util_waiter.WaiterState.FAILURE, reason };\n }\n } catch (e) {\n }\n } catch (exception) {\n reason = exception;\n }\n return { state: import_util_waiter.WaiterState.RETRY, reason };\n}, \"checkState\");\nvar waitForTypeRegistrationComplete = /* @__PURE__ */ __name(async (params, input) => {\n const serviceDefaults = { minDelay: 30, maxDelay: 120 };\n return (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState10);\n}, \"waitForTypeRegistrationComplete\");\nvar waitUntilTypeRegistrationComplete = /* @__PURE__ */ __name(async (params, input) => {\n const serviceDefaults = { minDelay: 30, maxDelay: 120 };\n const result = await (0, import_util_waiter.createWaiter)({ ...serviceDefaults, ...params }, input, checkState10);\n return (0, import_util_waiter.checkExceptions)(result);\n}, \"waitUntilTypeRegistrationComplete\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n CloudFormationServiceException,\n __Client,\n CloudFormationClient,\n CloudFormation,\n $Command,\n ActivateOrganizationsAccessCommand,\n ActivateTypeCommand,\n BatchDescribeTypeConfigurationsCommand,\n CancelUpdateStackCommand,\n ContinueUpdateRollbackCommand,\n CreateChangeSetCommand,\n CreateGeneratedTemplateCommand,\n CreateStackCommand,\n CreateStackInstancesCommand,\n CreateStackRefactorCommand,\n CreateStackSetCommand,\n DeactivateOrganizationsAccessCommand,\n DeactivateTypeCommand,\n DeleteChangeSetCommand,\n DeleteGeneratedTemplateCommand,\n DeleteStackCommand,\n DeleteStackInstancesCommand,\n DeleteStackSetCommand,\n DeregisterTypeCommand,\n DescribeAccountLimitsCommand,\n DescribeChangeSetCommand,\n DescribeChangeSetHooksCommand,\n DescribeGeneratedTemplateCommand,\n DescribeOrganizationsAccessCommand,\n DescribePublisherCommand,\n DescribeResourceScanCommand,\n DescribeStackDriftDetectionStatusCommand,\n DescribeStackEventsCommand,\n DescribeStackInstanceCommand,\n DescribeStackRefactorCommand,\n DescribeStackResourceCommand,\n DescribeStackResourceDriftsCommand,\n DescribeStackResourcesCommand,\n DescribeStackSetCommand,\n DescribeStackSetOperationCommand,\n DescribeStacksCommand,\n DescribeTypeCommand,\n DescribeTypeRegistrationCommand,\n DetectStackDriftCommand,\n DetectStackResourceDriftCommand,\n DetectStackSetDriftCommand,\n EstimateTemplateCostCommand,\n ExecuteChangeSetCommand,\n ExecuteStackRefactorCommand,\n GetGeneratedTemplateCommand,\n GetStackPolicyCommand,\n GetTemplateCommand,\n GetTemplateSummaryCommand,\n ImportStacksToStackSetCommand,\n ListChangeSetsCommand,\n ListExportsCommand,\n ListGeneratedTemplatesCommand,\n ListHookResultsCommand,\n ListImportsCommand,\n ListResourceScanRelatedResourcesCommand,\n ListResourceScanResourcesCommand,\n ListResourceScansCommand,\n ListStackInstanceResourceDriftsCommand,\n ListStackInstancesCommand,\n ListStackRefactorActionsCommand,\n ListStackRefactorsCommand,\n ListStackResourcesCommand,\n ListStackSetAutoDeploymentTargetsCommand,\n ListStackSetOperationResultsCommand,\n ListStackSetOperationsCommand,\n ListStackSetsCommand,\n ListStacksCommand,\n ListTypeRegistrationsCommand,\n ListTypeVersionsCommand,\n ListTypesCommand,\n PublishTypeCommand,\n RecordHandlerProgressCommand,\n RegisterPublisherCommand,\n RegisterTypeCommand,\n RollbackStackCommand,\n SetStackPolicyCommand,\n SetTypeConfigurationCommand,\n SetTypeDefaultVersionCommand,\n SignalResourceCommand,\n StartResourceScanCommand,\n StopStackSetOperationCommand,\n TestTypeCommand,\n UpdateGeneratedTemplateCommand,\n UpdateStackCommand,\n UpdateStackInstancesCommand,\n UpdateStackSetCommand,\n UpdateTerminationProtectionCommand,\n ValidateTemplateCommand,\n paginateDescribeAccountLimits,\n paginateDescribeStackEvents,\n paginateDescribeStackResourceDrifts,\n paginateDescribeStacks,\n paginateListChangeSets,\n paginateListExports,\n paginateListGeneratedTemplates,\n paginateListImports,\n paginateListResourceScanRelatedResources,\n paginateListResourceScanResources,\n paginateListResourceScans,\n paginateListStackInstances,\n paginateListStackRefactorActions,\n paginateListStackRefactors,\n paginateListStackResources,\n paginateListStackSetOperationResults,\n paginateListStackSetOperations,\n paginateListStackSets,\n paginateListStacks,\n paginateListTypeRegistrations,\n paginateListTypeVersions,\n paginateListTypes,\n waitForChangeSetCreateComplete,\n waitUntilChangeSetCreateComplete,\n waitForStackCreateComplete,\n waitUntilStackCreateComplete,\n waitForStackDeleteComplete,\n waitUntilStackDeleteComplete,\n waitForStackExists,\n waitUntilStackExists,\n waitForStackImportComplete,\n waitUntilStackImportComplete,\n waitForStackRefactorCreateComplete,\n waitUntilStackRefactorCreateComplete,\n waitForStackRefactorExecuteComplete,\n waitUntilStackRefactorExecuteComplete,\n waitForStackRollbackComplete,\n waitUntilStackRollbackComplete,\n waitForStackUpdateComplete,\n waitUntilStackUpdateComplete,\n waitForTypeRegistrationComplete,\n waitUntilTypeRegistrationComplete,\n AccountFilterType,\n AccountGateStatus,\n InvalidOperationException,\n OperationNotFoundException,\n ThirdPartyType,\n VersionBump,\n CFNRegistryException,\n TypeNotFoundException,\n AlreadyExistsException,\n AttributeChangeType,\n TypeConfigurationNotFoundException,\n CallAs,\n TokenAlreadyExistsException,\n Capability,\n Category,\n ChangeAction,\n ChangeSource,\n EvaluationType,\n ResourceAttribute,\n RequiresRecreation,\n PolicyAction,\n Replacement,\n ChangeType,\n HookFailureMode,\n HookInvocationPoint,\n HookTargetType,\n ChangeSetHooksStatus,\n ChangeSetNotFoundException,\n ChangeSetStatus,\n ExecutionStatus,\n ChangeSetType,\n OnStackFailure,\n InsufficientCapabilitiesException,\n LimitExceededException,\n ConcurrentResourcesLimitExceededException,\n GeneratedTemplateDeletionPolicy,\n GeneratedTemplateUpdateReplacePolicy,\n OnFailure,\n ConcurrencyMode,\n RegionConcurrencyType,\n OperationIdAlreadyExistsException,\n OperationInProgressException,\n StackSetNotFoundException,\n StaleRequestException,\n CreatedButModifiedException,\n PermissionModels,\n NameAlreadyExistsException,\n InvalidChangeSetStatusException,\n GeneratedTemplateNotFoundException,\n DeletionMode,\n StackSetNotEmptyException,\n RegistryType,\n GeneratedTemplateResourceStatus,\n WarningType,\n GeneratedTemplateStatus,\n OrganizationStatus,\n IdentityProvider,\n PublisherStatus,\n ResourceScanStatus,\n ResourceScanNotFoundException,\n StackDriftDetectionStatus,\n StackDriftStatus,\n DetailedStatus,\n HookStatus,\n ResourceStatus,\n StackInstanceDetailedStatus,\n StackInstanceStatus,\n StackInstanceNotFoundException,\n StackRefactorExecutionStatus,\n StackRefactorStatus,\n StackRefactorNotFoundException,\n StackResourceDriftStatus,\n DifferenceType,\n StackStatus,\n StackSetDriftDetectionStatus,\n StackSetDriftStatus,\n StackSetStatus,\n StackSetOperationAction,\n StackSetOperationStatus,\n DeprecatedStatus,\n ProvisioningType,\n TypeTestsStatus,\n Visibility,\n RegistrationStatus,\n TemplateFormat,\n TemplateStage,\n StackNotFoundException,\n HookResultNotFoundException,\n ListHookResultsTargetType,\n ResourceScanInProgressException,\n ScanType,\n StackInstanceFilterName,\n StackRefactorActionType,\n StackRefactorDetection,\n StackRefactorActionEntity,\n OperationResultFilterName,\n StackSetOperationResultStatus,\n InvalidStateTransitionException,\n OperationStatusCheckFailedException,\n OperationStatus,\n HandlerErrorCode,\n ResourceSignalStatus,\n ResourceScanLimitExceededException\n});\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getRuntimeConfig = void 0;\nconst tslib_1 = require(\"tslib\");\nconst package_json_1 = tslib_1.__importDefault(require(\"../package.json\"));\nconst core_1 = require(\"@aws-sdk/core\");\nconst credential_provider_node_1 = require(\"@aws-sdk/credential-provider-node\");\nconst util_user_agent_node_1 = require(\"@aws-sdk/util-user-agent-node\");\nconst config_resolver_1 = require(\"@smithy/config-resolver\");\nconst hash_node_1 = require(\"@smithy/hash-node\");\nconst middleware_retry_1 = require(\"@smithy/middleware-retry\");\nconst node_config_provider_1 = require(\"@smithy/node-config-provider\");\nconst node_http_handler_1 = require(\"@smithy/node-http-handler\");\nconst util_body_length_node_1 = require(\"@smithy/util-body-length-node\");\nconst util_retry_1 = require(\"@smithy/util-retry\");\nconst runtimeConfig_shared_1 = require(\"./runtimeConfig.shared\");\nconst smithy_client_1 = require(\"@smithy/smithy-client\");\nconst util_defaults_mode_node_1 = require(\"@smithy/util-defaults-mode-node\");\nconst smithy_client_2 = require(\"@smithy/smithy-client\");\nconst getRuntimeConfig = (config) => {\n (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);\n const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);\n const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);\n const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);\n (0, core_1.emitWarningIfUnsupportedVersion)(process.version);\n const loaderConfig = {\n profile: config?.profile,\n logger: clientSharedValues.logger,\n };\n return {\n ...clientSharedValues,\n ...config,\n runtime: \"node\",\n defaultsMode,\n authSchemePreference: config?.authSchemePreference ?? (0, node_config_provider_1.loadConfig)(core_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),\n bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,\n credentialDefaultProvider: config?.credentialDefaultProvider ?? credential_provider_node_1.defaultProvider,\n defaultUserAgentProvider: config?.defaultUserAgentProvider ??\n (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),\n maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),\n region: config?.region ??\n (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),\n requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),\n retryMode: config?.retryMode ??\n (0, node_config_provider_1.loadConfig)({\n ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,\n default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE,\n }, config),\n sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, \"sha256\"),\n streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,\n useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),\n };\n};\nexports.getRuntimeConfig = getRuntimeConfig;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getRuntimeConfig = void 0;\nconst core_1 = require(\"@aws-sdk/core\");\nconst smithy_client_1 = require(\"@smithy/smithy-client\");\nconst url_parser_1 = require(\"@smithy/url-parser\");\nconst util_base64_1 = require(\"@smithy/util-base64\");\nconst util_utf8_1 = require(\"@smithy/util-utf8\");\nconst httpAuthSchemeProvider_1 = require(\"./auth/httpAuthSchemeProvider\");\nconst endpointResolver_1 = require(\"./endpoint/endpointResolver\");\nconst getRuntimeConfig = (config) => {\n return {\n apiVersion: \"2010-05-15\",\n base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64,\n base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,\n disableHostPrefix: config?.disableHostPrefix ?? false,\n endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,\n extensions: config?.extensions ?? [],\n httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultCloudFormationHttpAuthSchemeProvider,\n httpAuthSchemes: config?.httpAuthSchemes ?? [\n {\n schemeId: \"aws.auth#sigv4\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"aws.auth#sigv4\"),\n signer: new core_1.AwsSdkSigV4Signer(),\n },\n ],\n logger: config?.logger ?? new smithy_client_1.NoOpLogger(),\n serviceId: config?.serviceId ?? \"CloudFormation\",\n urlParser: config?.urlParser ?? url_parser_1.parseUrl,\n utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,\n utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8,\n };\n};\nexports.getRuntimeConfig = getRuntimeConfig;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resolveHttpAuthSchemeConfig = exports.defaultCognitoIdentityHttpAuthSchemeProvider = exports.defaultCognitoIdentityHttpAuthSchemeParametersProvider = void 0;\nconst core_1 = require(\"@aws-sdk/core\");\nconst util_middleware_1 = require(\"@smithy/util-middleware\");\nconst defaultCognitoIdentityHttpAuthSchemeParametersProvider = async (config, context, input) => {\n return {\n operation: (0, util_middleware_1.getSmithyContext)(context).operation,\n region: (await (0, util_middleware_1.normalizeProvider)(config.region)()) ||\n (() => {\n throw new Error(\"expected `region` to be configured for `aws.auth#sigv4`\");\n })(),\n };\n};\nexports.defaultCognitoIdentityHttpAuthSchemeParametersProvider = defaultCognitoIdentityHttpAuthSchemeParametersProvider;\nfunction createAwsAuthSigv4HttpAuthOption(authParameters) {\n return {\n schemeId: \"aws.auth#sigv4\",\n signingProperties: {\n name: \"cognito-identity\",\n region: authParameters.region,\n },\n propertiesExtractor: (config, context) => ({\n signingProperties: {\n config,\n context,\n },\n }),\n };\n}\nfunction createSmithyApiNoAuthHttpAuthOption(authParameters) {\n return {\n schemeId: \"smithy.api#noAuth\",\n };\n}\nconst defaultCognitoIdentityHttpAuthSchemeProvider = (authParameters) => {\n const options = [];\n switch (authParameters.operation) {\n case \"GetCredentialsForIdentity\": {\n options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));\n break;\n }\n case \"GetId\": {\n options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));\n break;\n }\n case \"GetOpenIdToken\": {\n options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));\n break;\n }\n case \"UnlinkIdentity\": {\n options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));\n break;\n }\n default: {\n options.push(createAwsAuthSigv4HttpAuthOption(authParameters));\n }\n }\n return options;\n};\nexports.defaultCognitoIdentityHttpAuthSchemeProvider = defaultCognitoIdentityHttpAuthSchemeProvider;\nconst resolveHttpAuthSchemeConfig = (config) => {\n const config_0 = (0, core_1.resolveAwsSdkSigV4Config)(config);\n return Object.assign(config_0, {\n authSchemePreference: (0, util_middleware_1.normalizeProvider)(config.authSchemePreference ?? []),\n });\n};\nexports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.defaultEndpointResolver = void 0;\nconst util_endpoints_1 = require(\"@aws-sdk/util-endpoints\");\nconst util_endpoints_2 = require(\"@smithy/util-endpoints\");\nconst ruleset_1 = require(\"./ruleset\");\nconst cache = new util_endpoints_2.EndpointCache({\n size: 50,\n params: [\"Endpoint\", \"Region\", \"UseDualStack\", \"UseFIPS\"],\n});\nconst defaultEndpointResolver = (endpointParams, context = {}) => {\n return cache.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, {\n endpointParams: endpointParams,\n logger: context.logger,\n }));\n};\nexports.defaultEndpointResolver = defaultEndpointResolver;\nutil_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ruleSet = void 0;\nconst w = \"required\", x = \"fn\", y = \"argv\", z = \"ref\";\nconst a = true, b = \"isSet\", c = \"booleanEquals\", d = \"error\", e = \"endpoint\", f = \"tree\", g = \"PartitionResult\", h = \"getAttr\", i = \"stringEquals\", j = { [w]: false, \"type\": \"String\" }, k = { [w]: true, \"default\": false, \"type\": \"Boolean\" }, l = { [z]: \"Endpoint\" }, m = { [x]: c, [y]: [{ [z]: \"UseFIPS\" }, true] }, n = { [x]: c, [y]: [{ [z]: \"UseDualStack\" }, true] }, o = {}, p = { [z]: \"Region\" }, q = { [x]: h, [y]: [{ [z]: g }, \"supportsFIPS\"] }, r = { [z]: g }, s = { [x]: c, [y]: [true, { [x]: h, [y]: [r, \"supportsDualStack\"] }] }, t = [m], u = [n], v = [p];\nconst _data = { version: \"1.0\", parameters: { Region: j, UseDualStack: k, UseFIPS: k, Endpoint: j }, rules: [{ conditions: [{ [x]: b, [y]: [l] }], rules: [{ conditions: t, error: \"Invalid Configuration: FIPS and custom endpoint are not supported\", type: d }, { conditions: u, error: \"Invalid Configuration: Dualstack and custom endpoint are not supported\", type: d }, { endpoint: { url: l, properties: o, headers: o }, type: e }], type: f }, { conditions: [{ [x]: b, [y]: v }], rules: [{ conditions: [{ [x]: \"aws.partition\", [y]: v, assign: g }], rules: [{ conditions: [m, n], rules: [{ conditions: [{ [x]: c, [y]: [a, q] }, s], rules: [{ conditions: [{ [x]: i, [y]: [p, \"us-east-1\"] }], endpoint: { url: \"https://cognito-identity-fips.us-east-1.amazonaws.com\", properties: o, headers: o }, type: e }, { conditions: [{ [x]: i, [y]: [p, \"us-east-2\"] }], endpoint: { url: \"https://cognito-identity-fips.us-east-2.amazonaws.com\", properties: o, headers: o }, type: e }, { conditions: [{ [x]: i, [y]: [p, \"us-west-1\"] }], endpoint: { url: \"https://cognito-identity-fips.us-west-1.amazonaws.com\", properties: o, headers: o }, type: e }, { conditions: [{ [x]: i, [y]: [p, \"us-west-2\"] }], endpoint: { url: \"https://cognito-identity-fips.us-west-2.amazonaws.com\", properties: o, headers: o }, type: e }, { endpoint: { url: \"https://cognito-identity-fips.{Region}.{PartitionResult#dualStackDnsSuffix}\", properties: o, headers: o }, type: e }], type: f }, { error: \"FIPS and DualStack are enabled, but this partition does not support one or both\", type: d }], type: f }, { conditions: t, rules: [{ conditions: [{ [x]: c, [y]: [q, a] }], rules: [{ endpoint: { url: \"https://cognito-identity-fips.{Region}.{PartitionResult#dnsSuffix}\", properties: o, headers: o }, type: e }], type: f }, { error: \"FIPS is enabled but this partition does not support FIPS\", type: d }], type: f }, { conditions: u, rules: [{ conditions: [s], rules: [{ conditions: [{ [x]: i, [y]: [\"aws\", { [x]: h, [y]: [r, \"name\"] }] }], endpoint: { url: \"https://cognito-identity.{Region}.amazonaws.com\", properties: o, headers: o }, type: e }, { endpoint: { url: \"https://cognito-identity.{Region}.{PartitionResult#dualStackDnsSuffix}\", properties: o, headers: o }, type: e }], type: f }, { error: \"DualStack is enabled but this partition does not support DualStack\", type: d }], type: f }, { endpoint: { url: \"https://cognito-identity.{Region}.{PartitionResult#dnsSuffix}\", properties: o, headers: o }, type: e }], type: f }], type: f }, { error: \"Invalid Configuration: Missing Region\", type: d }] };\nexports.ruleSet = _data;\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar index_exports = {};\n__export(index_exports, {\n AmbiguousRoleResolutionType: () => AmbiguousRoleResolutionType,\n CognitoIdentity: () => CognitoIdentity,\n CognitoIdentityClient: () => CognitoIdentityClient,\n CognitoIdentityServiceException: () => CognitoIdentityServiceException,\n ConcurrentModificationException: () => ConcurrentModificationException,\n CreateIdentityPoolCommand: () => CreateIdentityPoolCommand,\n CredentialsFilterSensitiveLog: () => CredentialsFilterSensitiveLog,\n DeleteIdentitiesCommand: () => DeleteIdentitiesCommand,\n DeleteIdentityPoolCommand: () => DeleteIdentityPoolCommand,\n DescribeIdentityCommand: () => DescribeIdentityCommand,\n DescribeIdentityPoolCommand: () => DescribeIdentityPoolCommand,\n DeveloperUserAlreadyRegisteredException: () => DeveloperUserAlreadyRegisteredException,\n ErrorCode: () => ErrorCode,\n ExternalServiceException: () => ExternalServiceException,\n GetCredentialsForIdentityCommand: () => GetCredentialsForIdentityCommand,\n GetCredentialsForIdentityInputFilterSensitiveLog: () => GetCredentialsForIdentityInputFilterSensitiveLog,\n GetCredentialsForIdentityResponseFilterSensitiveLog: () => GetCredentialsForIdentityResponseFilterSensitiveLog,\n GetIdCommand: () => GetIdCommand,\n GetIdInputFilterSensitiveLog: () => GetIdInputFilterSensitiveLog,\n GetIdentityPoolRolesCommand: () => GetIdentityPoolRolesCommand,\n GetOpenIdTokenCommand: () => GetOpenIdTokenCommand,\n GetOpenIdTokenForDeveloperIdentityCommand: () => GetOpenIdTokenForDeveloperIdentityCommand,\n GetOpenIdTokenForDeveloperIdentityInputFilterSensitiveLog: () => GetOpenIdTokenForDeveloperIdentityInputFilterSensitiveLog,\n GetOpenIdTokenForDeveloperIdentityResponseFilterSensitiveLog: () => GetOpenIdTokenForDeveloperIdentityResponseFilterSensitiveLog,\n GetOpenIdTokenInputFilterSensitiveLog: () => GetOpenIdTokenInputFilterSensitiveLog,\n GetOpenIdTokenResponseFilterSensitiveLog: () => GetOpenIdTokenResponseFilterSensitiveLog,\n GetPrincipalTagAttributeMapCommand: () => GetPrincipalTagAttributeMapCommand,\n InternalErrorException: () => InternalErrorException,\n InvalidIdentityPoolConfigurationException: () => InvalidIdentityPoolConfigurationException,\n InvalidParameterException: () => InvalidParameterException,\n LimitExceededException: () => LimitExceededException,\n ListIdentitiesCommand: () => ListIdentitiesCommand,\n ListIdentityPoolsCommand: () => ListIdentityPoolsCommand,\n ListTagsForResourceCommand: () => ListTagsForResourceCommand,\n LookupDeveloperIdentityCommand: () => LookupDeveloperIdentityCommand,\n MappingRuleMatchType: () => MappingRuleMatchType,\n MergeDeveloperIdentitiesCommand: () => MergeDeveloperIdentitiesCommand,\n NotAuthorizedException: () => NotAuthorizedException,\n ResourceConflictException: () => ResourceConflictException,\n ResourceNotFoundException: () => ResourceNotFoundException,\n RoleMappingType: () => RoleMappingType,\n SetIdentityPoolRolesCommand: () => SetIdentityPoolRolesCommand,\n SetPrincipalTagAttributeMapCommand: () => SetPrincipalTagAttributeMapCommand,\n TagResourceCommand: () => TagResourceCommand,\n TooManyRequestsException: () => TooManyRequestsException,\n UnlinkDeveloperIdentityCommand: () => UnlinkDeveloperIdentityCommand,\n UnlinkIdentityCommand: () => UnlinkIdentityCommand,\n UnlinkIdentityInputFilterSensitiveLog: () => UnlinkIdentityInputFilterSensitiveLog,\n UntagResourceCommand: () => UntagResourceCommand,\n UpdateIdentityPoolCommand: () => UpdateIdentityPoolCommand,\n __Client: () => import_smithy_client.Client,\n paginateListIdentityPools: () => paginateListIdentityPools\n});\nmodule.exports = __toCommonJS(index_exports);\n\n// src/CognitoIdentityClient.ts\nvar import_middleware_host_header = require(\"@aws-sdk/middleware-host-header\");\nvar import_middleware_logger = require(\"@aws-sdk/middleware-logger\");\nvar import_middleware_recursion_detection = require(\"@aws-sdk/middleware-recursion-detection\");\nvar import_middleware_user_agent = require(\"@aws-sdk/middleware-user-agent\");\nvar import_config_resolver = require(\"@smithy/config-resolver\");\nvar import_core = require(\"@smithy/core\");\nvar import_middleware_content_length = require(\"@smithy/middleware-content-length\");\nvar import_middleware_endpoint = require(\"@smithy/middleware-endpoint\");\nvar import_middleware_retry = require(\"@smithy/middleware-retry\");\n\nvar import_httpAuthSchemeProvider = require(\"./auth/httpAuthSchemeProvider\");\n\n// src/endpoint/EndpointParameters.ts\nvar resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {\n return Object.assign(options, {\n useDualstackEndpoint: options.useDualstackEndpoint ?? false,\n useFipsEndpoint: options.useFipsEndpoint ?? false,\n defaultSigningName: \"cognito-identity\"\n });\n}, \"resolveClientEndpointParameters\");\nvar commonParams = {\n UseFIPS: { type: \"builtInParams\", name: \"useFipsEndpoint\" },\n Endpoint: { type: \"builtInParams\", name: \"endpoint\" },\n Region: { type: \"builtInParams\", name: \"region\" },\n UseDualStack: { type: \"builtInParams\", name: \"useDualstackEndpoint\" }\n};\n\n// src/CognitoIdentityClient.ts\nvar import_runtimeConfig = require(\"././runtimeConfig\");\n\n// src/runtimeExtensions.ts\nvar import_region_config_resolver = require(\"@aws-sdk/region-config-resolver\");\nvar import_protocol_http = require(\"@smithy/protocol-http\");\nvar import_smithy_client = require(\"@smithy/smithy-client\");\n\n// src/auth/httpAuthExtensionConfiguration.ts\nvar getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {\n const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;\n let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;\n let _credentials = runtimeConfig.credentials;\n return {\n setHttpAuthScheme(httpAuthScheme) {\n const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);\n if (index === -1) {\n _httpAuthSchemes.push(httpAuthScheme);\n } else {\n _httpAuthSchemes.splice(index, 1, httpAuthScheme);\n }\n },\n httpAuthSchemes() {\n return _httpAuthSchemes;\n },\n setHttpAuthSchemeProvider(httpAuthSchemeProvider) {\n _httpAuthSchemeProvider = httpAuthSchemeProvider;\n },\n httpAuthSchemeProvider() {\n return _httpAuthSchemeProvider;\n },\n setCredentials(credentials) {\n _credentials = credentials;\n },\n credentials() {\n return _credentials;\n }\n };\n}, \"getHttpAuthExtensionConfiguration\");\nvar resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => {\n return {\n httpAuthSchemes: config.httpAuthSchemes(),\n httpAuthSchemeProvider: config.httpAuthSchemeProvider(),\n credentials: config.credentials()\n };\n}, \"resolveHttpAuthRuntimeConfig\");\n\n// src/runtimeExtensions.ts\nvar resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {\n const extensionConfiguration = Object.assign(\n (0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig),\n (0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig),\n (0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig),\n getHttpAuthExtensionConfiguration(runtimeConfig)\n );\n extensions.forEach((extension) => extension.configure(extensionConfiguration));\n return Object.assign(\n runtimeConfig,\n (0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),\n (0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),\n (0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),\n resolveHttpAuthRuntimeConfig(extensionConfiguration)\n );\n}, \"resolveRuntimeExtensions\");\n\n// src/CognitoIdentityClient.ts\nvar CognitoIdentityClient = class extends import_smithy_client.Client {\n static {\n __name(this, \"CognitoIdentityClient\");\n }\n /**\n * The resolved configuration of CognitoIdentityClient class. This is resolved and normalized from the {@link CognitoIdentityClientConfig | constructor configuration interface}.\n */\n config;\n constructor(...[configuration]) {\n const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});\n super(_config_0);\n this.initConfig = _config_0;\n const _config_1 = resolveClientEndpointParameters(_config_0);\n const _config_2 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_1);\n const _config_3 = (0, import_middleware_retry.resolveRetryConfig)(_config_2);\n const _config_4 = (0, import_config_resolver.resolveRegionConfig)(_config_3);\n const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);\n const _config_6 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_5);\n const _config_7 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_6);\n const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);\n this.config = _config_8;\n this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));\n this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));\n this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));\n this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));\n this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));\n this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));\n this.middlewareStack.use(\n (0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {\n httpAuthSchemeParametersProvider: import_httpAuthSchemeProvider.defaultCognitoIdentityHttpAuthSchemeParametersProvider,\n identityProviderConfigProvider: /* @__PURE__ */ __name(async (config) => new import_core.DefaultIdentityProviderConfig({\n \"aws.auth#sigv4\": config.credentials\n }), \"identityProviderConfigProvider\")\n })\n );\n this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config));\n }\n /**\n * Destroy underlying resources, like sockets. It's usually not necessary to do this.\n * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.\n * Otherwise, sockets might stay open for quite a long time before the server terminates them.\n */\n destroy() {\n super.destroy();\n }\n};\n\n// src/CognitoIdentity.ts\n\n\n// src/commands/CreateIdentityPoolCommand.ts\n\nvar import_middleware_serde = require(\"@smithy/middleware-serde\");\n\n\n// src/protocols/Aws_json1_1.ts\nvar import_core2 = require(\"@aws-sdk/core\");\n\n\n\n// src/models/CognitoIdentityServiceException.ts\n\nvar CognitoIdentityServiceException = class _CognitoIdentityServiceException extends import_smithy_client.ServiceException {\n static {\n __name(this, \"CognitoIdentityServiceException\");\n }\n /**\n * @internal\n */\n constructor(options) {\n super(options);\n Object.setPrototypeOf(this, _CognitoIdentityServiceException.prototype);\n }\n};\n\n// src/models/models_0.ts\n\nvar AmbiguousRoleResolutionType = {\n AUTHENTICATED_ROLE: \"AuthenticatedRole\",\n DENY: \"Deny\"\n};\nvar InternalErrorException = class _InternalErrorException extends CognitoIdentityServiceException {\n static {\n __name(this, \"InternalErrorException\");\n }\n name = \"InternalErrorException\";\n $fault = \"server\";\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"InternalErrorException\",\n $fault: \"server\",\n ...opts\n });\n Object.setPrototypeOf(this, _InternalErrorException.prototype);\n }\n};\nvar InvalidParameterException = class _InvalidParameterException extends CognitoIdentityServiceException {\n static {\n __name(this, \"InvalidParameterException\");\n }\n name = \"InvalidParameterException\";\n $fault = \"client\";\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"InvalidParameterException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _InvalidParameterException.prototype);\n }\n};\nvar LimitExceededException = class _LimitExceededException extends CognitoIdentityServiceException {\n static {\n __name(this, \"LimitExceededException\");\n }\n name = \"LimitExceededException\";\n $fault = \"client\";\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"LimitExceededException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _LimitExceededException.prototype);\n }\n};\nvar NotAuthorizedException = class _NotAuthorizedException extends CognitoIdentityServiceException {\n static {\n __name(this, \"NotAuthorizedException\");\n }\n name = \"NotAuthorizedException\";\n $fault = \"client\";\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"NotAuthorizedException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _NotAuthorizedException.prototype);\n }\n};\nvar ResourceConflictException = class _ResourceConflictException extends CognitoIdentityServiceException {\n static {\n __name(this, \"ResourceConflictException\");\n }\n name = \"ResourceConflictException\";\n $fault = \"client\";\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"ResourceConflictException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _ResourceConflictException.prototype);\n }\n};\nvar TooManyRequestsException = class _TooManyRequestsException extends CognitoIdentityServiceException {\n static {\n __name(this, \"TooManyRequestsException\");\n }\n name = \"TooManyRequestsException\";\n $fault = \"client\";\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"TooManyRequestsException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _TooManyRequestsException.prototype);\n }\n};\nvar ErrorCode = {\n ACCESS_DENIED: \"AccessDenied\",\n INTERNAL_SERVER_ERROR: \"InternalServerError\"\n};\nvar ResourceNotFoundException = class _ResourceNotFoundException extends CognitoIdentityServiceException {\n static {\n __name(this, \"ResourceNotFoundException\");\n }\n name = \"ResourceNotFoundException\";\n $fault = \"client\";\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"ResourceNotFoundException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _ResourceNotFoundException.prototype);\n }\n};\nvar ExternalServiceException = class _ExternalServiceException extends CognitoIdentityServiceException {\n static {\n __name(this, \"ExternalServiceException\");\n }\n name = \"ExternalServiceException\";\n $fault = \"client\";\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"ExternalServiceException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _ExternalServiceException.prototype);\n }\n};\nvar InvalidIdentityPoolConfigurationException = class _InvalidIdentityPoolConfigurationException extends CognitoIdentityServiceException {\n static {\n __name(this, \"InvalidIdentityPoolConfigurationException\");\n }\n name = \"InvalidIdentityPoolConfigurationException\";\n $fault = \"client\";\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"InvalidIdentityPoolConfigurationException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _InvalidIdentityPoolConfigurationException.prototype);\n }\n};\nvar MappingRuleMatchType = {\n CONTAINS: \"Contains\",\n EQUALS: \"Equals\",\n NOT_EQUAL: \"NotEqual\",\n STARTS_WITH: \"StartsWith\"\n};\nvar RoleMappingType = {\n RULES: \"Rules\",\n TOKEN: \"Token\"\n};\nvar DeveloperUserAlreadyRegisteredException = class _DeveloperUserAlreadyRegisteredException extends CognitoIdentityServiceException {\n static {\n __name(this, \"DeveloperUserAlreadyRegisteredException\");\n }\n name = \"DeveloperUserAlreadyRegisteredException\";\n $fault = \"client\";\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"DeveloperUserAlreadyRegisteredException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _DeveloperUserAlreadyRegisteredException.prototype);\n }\n};\nvar ConcurrentModificationException = class _ConcurrentModificationException extends CognitoIdentityServiceException {\n static {\n __name(this, \"ConcurrentModificationException\");\n }\n name = \"ConcurrentModificationException\";\n $fault = \"client\";\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"ConcurrentModificationException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _ConcurrentModificationException.prototype);\n }\n};\nvar GetCredentialsForIdentityInputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.Logins && { Logins: import_smithy_client.SENSITIVE_STRING }\n}), \"GetCredentialsForIdentityInputFilterSensitiveLog\");\nvar CredentialsFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.SecretKey && { SecretKey: import_smithy_client.SENSITIVE_STRING }\n}), \"CredentialsFilterSensitiveLog\");\nvar GetCredentialsForIdentityResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) }\n}), \"GetCredentialsForIdentityResponseFilterSensitiveLog\");\nvar GetIdInputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.Logins && { Logins: import_smithy_client.SENSITIVE_STRING }\n}), \"GetIdInputFilterSensitiveLog\");\nvar GetOpenIdTokenInputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.Logins && { Logins: import_smithy_client.SENSITIVE_STRING }\n}), \"GetOpenIdTokenInputFilterSensitiveLog\");\nvar GetOpenIdTokenResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.Token && { Token: import_smithy_client.SENSITIVE_STRING }\n}), \"GetOpenIdTokenResponseFilterSensitiveLog\");\nvar GetOpenIdTokenForDeveloperIdentityInputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.Logins && { Logins: import_smithy_client.SENSITIVE_STRING }\n}), \"GetOpenIdTokenForDeveloperIdentityInputFilterSensitiveLog\");\nvar GetOpenIdTokenForDeveloperIdentityResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.Token && { Token: import_smithy_client.SENSITIVE_STRING }\n}), \"GetOpenIdTokenForDeveloperIdentityResponseFilterSensitiveLog\");\nvar UnlinkIdentityInputFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.Logins && { Logins: import_smithy_client.SENSITIVE_STRING }\n}), \"UnlinkIdentityInputFilterSensitiveLog\");\n\n// src/protocols/Aws_json1_1.ts\nvar se_CreateIdentityPoolCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = sharedHeaders(\"CreateIdentityPool\");\n let body;\n body = JSON.stringify((0, import_smithy_client._json)(input));\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_CreateIdentityPoolCommand\");\nvar se_DeleteIdentitiesCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = sharedHeaders(\"DeleteIdentities\");\n let body;\n body = JSON.stringify((0, import_smithy_client._json)(input));\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DeleteIdentitiesCommand\");\nvar se_DeleteIdentityPoolCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = sharedHeaders(\"DeleteIdentityPool\");\n let body;\n body = JSON.stringify((0, import_smithy_client._json)(input));\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DeleteIdentityPoolCommand\");\nvar se_DescribeIdentityCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = sharedHeaders(\"DescribeIdentity\");\n let body;\n body = JSON.stringify((0, import_smithy_client._json)(input));\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DescribeIdentityCommand\");\nvar se_DescribeIdentityPoolCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = sharedHeaders(\"DescribeIdentityPool\");\n let body;\n body = JSON.stringify((0, import_smithy_client._json)(input));\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DescribeIdentityPoolCommand\");\nvar se_GetCredentialsForIdentityCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = sharedHeaders(\"GetCredentialsForIdentity\");\n let body;\n body = JSON.stringify((0, import_smithy_client._json)(input));\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_GetCredentialsForIdentityCommand\");\nvar se_GetIdCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = sharedHeaders(\"GetId\");\n let body;\n body = JSON.stringify((0, import_smithy_client._json)(input));\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_GetIdCommand\");\nvar se_GetIdentityPoolRolesCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = sharedHeaders(\"GetIdentityPoolRoles\");\n let body;\n body = JSON.stringify((0, import_smithy_client._json)(input));\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_GetIdentityPoolRolesCommand\");\nvar se_GetOpenIdTokenCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = sharedHeaders(\"GetOpenIdToken\");\n let body;\n body = JSON.stringify((0, import_smithy_client._json)(input));\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_GetOpenIdTokenCommand\");\nvar se_GetOpenIdTokenForDeveloperIdentityCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = sharedHeaders(\"GetOpenIdTokenForDeveloperIdentity\");\n let body;\n body = JSON.stringify((0, import_smithy_client._json)(input));\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_GetOpenIdTokenForDeveloperIdentityCommand\");\nvar se_GetPrincipalTagAttributeMapCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = sharedHeaders(\"GetPrincipalTagAttributeMap\");\n let body;\n body = JSON.stringify((0, import_smithy_client._json)(input));\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_GetPrincipalTagAttributeMapCommand\");\nvar se_ListIdentitiesCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = sharedHeaders(\"ListIdentities\");\n let body;\n body = JSON.stringify((0, import_smithy_client._json)(input));\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_ListIdentitiesCommand\");\nvar se_ListIdentityPoolsCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = sharedHeaders(\"ListIdentityPools\");\n let body;\n body = JSON.stringify((0, import_smithy_client._json)(input));\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_ListIdentityPoolsCommand\");\nvar se_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = sharedHeaders(\"ListTagsForResource\");\n let body;\n body = JSON.stringify((0, import_smithy_client._json)(input));\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_ListTagsForResourceCommand\");\nvar se_LookupDeveloperIdentityCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = sharedHeaders(\"LookupDeveloperIdentity\");\n let body;\n body = JSON.stringify((0, import_smithy_client._json)(input));\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_LookupDeveloperIdentityCommand\");\nvar se_MergeDeveloperIdentitiesCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = sharedHeaders(\"MergeDeveloperIdentities\");\n let body;\n body = JSON.stringify((0, import_smithy_client._json)(input));\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_MergeDeveloperIdentitiesCommand\");\nvar se_SetIdentityPoolRolesCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = sharedHeaders(\"SetIdentityPoolRoles\");\n let body;\n body = JSON.stringify((0, import_smithy_client._json)(input));\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_SetIdentityPoolRolesCommand\");\nvar se_SetPrincipalTagAttributeMapCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = sharedHeaders(\"SetPrincipalTagAttributeMap\");\n let body;\n body = JSON.stringify((0, import_smithy_client._json)(input));\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_SetPrincipalTagAttributeMapCommand\");\nvar se_TagResourceCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = sharedHeaders(\"TagResource\");\n let body;\n body = JSON.stringify((0, import_smithy_client._json)(input));\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_TagResourceCommand\");\nvar se_UnlinkDeveloperIdentityCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = sharedHeaders(\"UnlinkDeveloperIdentity\");\n let body;\n body = JSON.stringify((0, import_smithy_client._json)(input));\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_UnlinkDeveloperIdentityCommand\");\nvar se_UnlinkIdentityCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = sharedHeaders(\"UnlinkIdentity\");\n let body;\n body = JSON.stringify((0, import_smithy_client._json)(input));\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_UnlinkIdentityCommand\");\nvar se_UntagResourceCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = sharedHeaders(\"UntagResource\");\n let body;\n body = JSON.stringify((0, import_smithy_client._json)(input));\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_UntagResourceCommand\");\nvar se_UpdateIdentityPoolCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = sharedHeaders(\"UpdateIdentityPool\");\n let body;\n body = JSON.stringify((0, import_smithy_client._json)(input));\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_UpdateIdentityPoolCommand\");\nvar de_CreateIdentityPoolCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseJsonBody)(output.body, context);\n let contents = {};\n contents = (0, import_smithy_client._json)(data);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_CreateIdentityPoolCommand\");\nvar de_DeleteIdentitiesCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseJsonBody)(output.body, context);\n let contents = {};\n contents = (0, import_smithy_client._json)(data);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_DeleteIdentitiesCommand\");\nvar de_DeleteIdentityPoolCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n await (0, import_smithy_client.collectBody)(output.body, context);\n const response = {\n $metadata: deserializeMetadata(output)\n };\n return response;\n}, \"de_DeleteIdentityPoolCommand\");\nvar de_DescribeIdentityCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseJsonBody)(output.body, context);\n let contents = {};\n contents = de_IdentityDescription(data, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_DescribeIdentityCommand\");\nvar de_DescribeIdentityPoolCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseJsonBody)(output.body, context);\n let contents = {};\n contents = (0, import_smithy_client._json)(data);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_DescribeIdentityPoolCommand\");\nvar de_GetCredentialsForIdentityCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseJsonBody)(output.body, context);\n let contents = {};\n contents = de_GetCredentialsForIdentityResponse(data, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_GetCredentialsForIdentityCommand\");\nvar de_GetIdCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseJsonBody)(output.body, context);\n let contents = {};\n contents = (0, import_smithy_client._json)(data);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_GetIdCommand\");\nvar de_GetIdentityPoolRolesCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseJsonBody)(output.body, context);\n let contents = {};\n contents = (0, import_smithy_client._json)(data);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_GetIdentityPoolRolesCommand\");\nvar de_GetOpenIdTokenCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseJsonBody)(output.body, context);\n let contents = {};\n contents = (0, import_smithy_client._json)(data);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_GetOpenIdTokenCommand\");\nvar de_GetOpenIdTokenForDeveloperIdentityCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseJsonBody)(output.body, context);\n let contents = {};\n contents = (0, import_smithy_client._json)(data);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_GetOpenIdTokenForDeveloperIdentityCommand\");\nvar de_GetPrincipalTagAttributeMapCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseJsonBody)(output.body, context);\n let contents = {};\n contents = (0, import_smithy_client._json)(data);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_GetPrincipalTagAttributeMapCommand\");\nvar de_ListIdentitiesCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseJsonBody)(output.body, context);\n let contents = {};\n contents = de_ListIdentitiesResponse(data, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_ListIdentitiesCommand\");\nvar de_ListIdentityPoolsCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseJsonBody)(output.body, context);\n let contents = {};\n contents = (0, import_smithy_client._json)(data);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_ListIdentityPoolsCommand\");\nvar de_ListTagsForResourceCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseJsonBody)(output.body, context);\n let contents = {};\n contents = (0, import_smithy_client._json)(data);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_ListTagsForResourceCommand\");\nvar de_LookupDeveloperIdentityCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseJsonBody)(output.body, context);\n let contents = {};\n contents = (0, import_smithy_client._json)(data);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_LookupDeveloperIdentityCommand\");\nvar de_MergeDeveloperIdentitiesCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseJsonBody)(output.body, context);\n let contents = {};\n contents = (0, import_smithy_client._json)(data);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_MergeDeveloperIdentitiesCommand\");\nvar de_SetIdentityPoolRolesCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n await (0, import_smithy_client.collectBody)(output.body, context);\n const response = {\n $metadata: deserializeMetadata(output)\n };\n return response;\n}, \"de_SetIdentityPoolRolesCommand\");\nvar de_SetPrincipalTagAttributeMapCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseJsonBody)(output.body, context);\n let contents = {};\n contents = (0, import_smithy_client._json)(data);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_SetPrincipalTagAttributeMapCommand\");\nvar de_TagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseJsonBody)(output.body, context);\n let contents = {};\n contents = (0, import_smithy_client._json)(data);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_TagResourceCommand\");\nvar de_UnlinkDeveloperIdentityCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n await (0, import_smithy_client.collectBody)(output.body, context);\n const response = {\n $metadata: deserializeMetadata(output)\n };\n return response;\n}, \"de_UnlinkDeveloperIdentityCommand\");\nvar de_UnlinkIdentityCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n await (0, import_smithy_client.collectBody)(output.body, context);\n const response = {\n $metadata: deserializeMetadata(output)\n };\n return response;\n}, \"de_UnlinkIdentityCommand\");\nvar de_UntagResourceCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseJsonBody)(output.body, context);\n let contents = {};\n contents = (0, import_smithy_client._json)(data);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_UntagResourceCommand\");\nvar de_UpdateIdentityPoolCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core2.parseJsonBody)(output.body, context);\n let contents = {};\n contents = (0, import_smithy_client._json)(data);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_UpdateIdentityPoolCommand\");\nvar de_CommandError = /* @__PURE__ */ __name(async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await (0, import_core2.parseJsonErrorBody)(output.body, context)\n };\n const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);\n switch (errorCode) {\n case \"InternalErrorException\":\n case \"com.amazonaws.cognitoidentity#InternalErrorException\":\n throw await de_InternalErrorExceptionRes(parsedOutput, context);\n case \"InvalidParameterException\":\n case \"com.amazonaws.cognitoidentity#InvalidParameterException\":\n throw await de_InvalidParameterExceptionRes(parsedOutput, context);\n case \"LimitExceededException\":\n case \"com.amazonaws.cognitoidentity#LimitExceededException\":\n throw await de_LimitExceededExceptionRes(parsedOutput, context);\n case \"NotAuthorizedException\":\n case \"com.amazonaws.cognitoidentity#NotAuthorizedException\":\n throw await de_NotAuthorizedExceptionRes(parsedOutput, context);\n case \"ResourceConflictException\":\n case \"com.amazonaws.cognitoidentity#ResourceConflictException\":\n throw await de_ResourceConflictExceptionRes(parsedOutput, context);\n case \"TooManyRequestsException\":\n case \"com.amazonaws.cognitoidentity#TooManyRequestsException\":\n throw await de_TooManyRequestsExceptionRes(parsedOutput, context);\n case \"ResourceNotFoundException\":\n case \"com.amazonaws.cognitoidentity#ResourceNotFoundException\":\n throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);\n case \"ExternalServiceException\":\n case \"com.amazonaws.cognitoidentity#ExternalServiceException\":\n throw await de_ExternalServiceExceptionRes(parsedOutput, context);\n case \"InvalidIdentityPoolConfigurationException\":\n case \"com.amazonaws.cognitoidentity#InvalidIdentityPoolConfigurationException\":\n throw await de_InvalidIdentityPoolConfigurationExceptionRes(parsedOutput, context);\n case \"DeveloperUserAlreadyRegisteredException\":\n case \"com.amazonaws.cognitoidentity#DeveloperUserAlreadyRegisteredException\":\n throw await de_DeveloperUserAlreadyRegisteredExceptionRes(parsedOutput, context);\n case \"ConcurrentModificationException\":\n case \"com.amazonaws.cognitoidentity#ConcurrentModificationException\":\n throw await de_ConcurrentModificationExceptionRes(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n return throwDefaultError({\n output,\n parsedBody,\n errorCode\n });\n }\n}, \"de_CommandError\");\nvar de_ConcurrentModificationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = (0, import_smithy_client._json)(body);\n const exception = new ConcurrentModificationException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_ConcurrentModificationExceptionRes\");\nvar de_DeveloperUserAlreadyRegisteredExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = (0, import_smithy_client._json)(body);\n const exception = new DeveloperUserAlreadyRegisteredException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_DeveloperUserAlreadyRegisteredExceptionRes\");\nvar de_ExternalServiceExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = (0, import_smithy_client._json)(body);\n const exception = new ExternalServiceException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_ExternalServiceExceptionRes\");\nvar de_InternalErrorExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = (0, import_smithy_client._json)(body);\n const exception = new InternalErrorException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_InternalErrorExceptionRes\");\nvar de_InvalidIdentityPoolConfigurationExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = (0, import_smithy_client._json)(body);\n const exception = new InvalidIdentityPoolConfigurationException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_InvalidIdentityPoolConfigurationExceptionRes\");\nvar de_InvalidParameterExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = (0, import_smithy_client._json)(body);\n const exception = new InvalidParameterException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_InvalidParameterExceptionRes\");\nvar de_LimitExceededExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = (0, import_smithy_client._json)(body);\n const exception = new LimitExceededException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_LimitExceededExceptionRes\");\nvar de_NotAuthorizedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = (0, import_smithy_client._json)(body);\n const exception = new NotAuthorizedException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_NotAuthorizedExceptionRes\");\nvar de_ResourceConflictExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = (0, import_smithy_client._json)(body);\n const exception = new ResourceConflictException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_ResourceConflictExceptionRes\");\nvar de_ResourceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = (0, import_smithy_client._json)(body);\n const exception = new ResourceNotFoundException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_ResourceNotFoundExceptionRes\");\nvar de_TooManyRequestsExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = (0, import_smithy_client._json)(body);\n const exception = new TooManyRequestsException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_TooManyRequestsExceptionRes\");\nvar de_Credentials = /* @__PURE__ */ __name((output, context) => {\n return (0, import_smithy_client.take)(output, {\n AccessKeyId: import_smithy_client.expectString,\n Expiration: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), \"Expiration\"),\n SecretKey: import_smithy_client.expectString,\n SessionToken: import_smithy_client.expectString\n });\n}, \"de_Credentials\");\nvar de_GetCredentialsForIdentityResponse = /* @__PURE__ */ __name((output, context) => {\n return (0, import_smithy_client.take)(output, {\n Credentials: /* @__PURE__ */ __name((_) => de_Credentials(_, context), \"Credentials\"),\n IdentityId: import_smithy_client.expectString\n });\n}, \"de_GetCredentialsForIdentityResponse\");\nvar de_IdentitiesList = /* @__PURE__ */ __name((output, context) => {\n const retVal = (output || []).filter((e) => e != null).map((entry) => {\n return de_IdentityDescription(entry, context);\n });\n return retVal;\n}, \"de_IdentitiesList\");\nvar de_IdentityDescription = /* @__PURE__ */ __name((output, context) => {\n return (0, import_smithy_client.take)(output, {\n CreationDate: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), \"CreationDate\"),\n IdentityId: import_smithy_client.expectString,\n LastModifiedDate: /* @__PURE__ */ __name((_) => (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseEpochTimestamp)((0, import_smithy_client.expectNumber)(_))), \"LastModifiedDate\"),\n Logins: import_smithy_client._json\n });\n}, \"de_IdentityDescription\");\nvar de_ListIdentitiesResponse = /* @__PURE__ */ __name((output, context) => {\n return (0, import_smithy_client.take)(output, {\n Identities: /* @__PURE__ */ __name((_) => de_IdentitiesList(_, context), \"Identities\"),\n IdentityPoolId: import_smithy_client.expectString,\n NextToken: import_smithy_client.expectString\n });\n}, \"de_ListIdentitiesResponse\");\nvar deserializeMetadata = /* @__PURE__ */ __name((output) => ({\n httpStatusCode: output.statusCode,\n requestId: output.headers[\"x-amzn-requestid\"] ?? output.headers[\"x-amzn-request-id\"] ?? output.headers[\"x-amz-request-id\"],\n extendedRequestId: output.headers[\"x-amz-id-2\"],\n cfId: output.headers[\"x-amz-cf-id\"]\n}), \"deserializeMetadata\");\nvar throwDefaultError = (0, import_smithy_client.withBaseException)(CognitoIdentityServiceException);\nvar buildHttpRpcRequest = /* @__PURE__ */ __name(async (context, headers, path, resolvedHostname, body) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const contents = {\n protocol,\n hostname,\n port,\n method: \"POST\",\n path: basePath.endsWith(\"/\") ? basePath.slice(0, -1) + path : basePath + path,\n headers\n };\n if (resolvedHostname !== void 0) {\n contents.hostname = resolvedHostname;\n }\n if (body !== void 0) {\n contents.body = body;\n }\n return new import_protocol_http.HttpRequest(contents);\n}, \"buildHttpRpcRequest\");\nfunction sharedHeaders(operation) {\n return {\n \"content-type\": \"application/x-amz-json-1.1\",\n \"x-amz-target\": `AWSCognitoIdentityService.${operation}`\n };\n}\n__name(sharedHeaders, \"sharedHeaders\");\n\n// src/commands/CreateIdentityPoolCommand.ts\nvar CreateIdentityPoolCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSCognitoIdentityService\", \"CreateIdentityPool\", {}).n(\"CognitoIdentityClient\", \"CreateIdentityPoolCommand\").f(void 0, void 0).ser(se_CreateIdentityPoolCommand).de(de_CreateIdentityPoolCommand).build() {\n static {\n __name(this, \"CreateIdentityPoolCommand\");\n }\n};\n\n// src/commands/DeleteIdentitiesCommand.ts\n\n\n\nvar DeleteIdentitiesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSCognitoIdentityService\", \"DeleteIdentities\", {}).n(\"CognitoIdentityClient\", \"DeleteIdentitiesCommand\").f(void 0, void 0).ser(se_DeleteIdentitiesCommand).de(de_DeleteIdentitiesCommand).build() {\n static {\n __name(this, \"DeleteIdentitiesCommand\");\n }\n};\n\n// src/commands/DeleteIdentityPoolCommand.ts\n\n\n\nvar DeleteIdentityPoolCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSCognitoIdentityService\", \"DeleteIdentityPool\", {}).n(\"CognitoIdentityClient\", \"DeleteIdentityPoolCommand\").f(void 0, void 0).ser(se_DeleteIdentityPoolCommand).de(de_DeleteIdentityPoolCommand).build() {\n static {\n __name(this, \"DeleteIdentityPoolCommand\");\n }\n};\n\n// src/commands/DescribeIdentityCommand.ts\n\n\n\nvar DescribeIdentityCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSCognitoIdentityService\", \"DescribeIdentity\", {}).n(\"CognitoIdentityClient\", \"DescribeIdentityCommand\").f(void 0, void 0).ser(se_DescribeIdentityCommand).de(de_DescribeIdentityCommand).build() {\n static {\n __name(this, \"DescribeIdentityCommand\");\n }\n};\n\n// src/commands/DescribeIdentityPoolCommand.ts\n\n\n\nvar DescribeIdentityPoolCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSCognitoIdentityService\", \"DescribeIdentityPool\", {}).n(\"CognitoIdentityClient\", \"DescribeIdentityPoolCommand\").f(void 0, void 0).ser(se_DescribeIdentityPoolCommand).de(de_DescribeIdentityPoolCommand).build() {\n static {\n __name(this, \"DescribeIdentityPoolCommand\");\n }\n};\n\n// src/commands/GetCredentialsForIdentityCommand.ts\n\n\n\nvar GetCredentialsForIdentityCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSCognitoIdentityService\", \"GetCredentialsForIdentity\", {}).n(\"CognitoIdentityClient\", \"GetCredentialsForIdentityCommand\").f(GetCredentialsForIdentityInputFilterSensitiveLog, GetCredentialsForIdentityResponseFilterSensitiveLog).ser(se_GetCredentialsForIdentityCommand).de(de_GetCredentialsForIdentityCommand).build() {\n static {\n __name(this, \"GetCredentialsForIdentityCommand\");\n }\n};\n\n// src/commands/GetIdCommand.ts\n\n\n\nvar GetIdCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSCognitoIdentityService\", \"GetId\", {}).n(\"CognitoIdentityClient\", \"GetIdCommand\").f(GetIdInputFilterSensitiveLog, void 0).ser(se_GetIdCommand).de(de_GetIdCommand).build() {\n static {\n __name(this, \"GetIdCommand\");\n }\n};\n\n// src/commands/GetIdentityPoolRolesCommand.ts\n\n\n\nvar GetIdentityPoolRolesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSCognitoIdentityService\", \"GetIdentityPoolRoles\", {}).n(\"CognitoIdentityClient\", \"GetIdentityPoolRolesCommand\").f(void 0, void 0).ser(se_GetIdentityPoolRolesCommand).de(de_GetIdentityPoolRolesCommand).build() {\n static {\n __name(this, \"GetIdentityPoolRolesCommand\");\n }\n};\n\n// src/commands/GetOpenIdTokenCommand.ts\n\n\n\nvar GetOpenIdTokenCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSCognitoIdentityService\", \"GetOpenIdToken\", {}).n(\"CognitoIdentityClient\", \"GetOpenIdTokenCommand\").f(GetOpenIdTokenInputFilterSensitiveLog, GetOpenIdTokenResponseFilterSensitiveLog).ser(se_GetOpenIdTokenCommand).de(de_GetOpenIdTokenCommand).build() {\n static {\n __name(this, \"GetOpenIdTokenCommand\");\n }\n};\n\n// src/commands/GetOpenIdTokenForDeveloperIdentityCommand.ts\n\n\n\nvar GetOpenIdTokenForDeveloperIdentityCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSCognitoIdentityService\", \"GetOpenIdTokenForDeveloperIdentity\", {}).n(\"CognitoIdentityClient\", \"GetOpenIdTokenForDeveloperIdentityCommand\").f(\n GetOpenIdTokenForDeveloperIdentityInputFilterSensitiveLog,\n GetOpenIdTokenForDeveloperIdentityResponseFilterSensitiveLog\n).ser(se_GetOpenIdTokenForDeveloperIdentityCommand).de(de_GetOpenIdTokenForDeveloperIdentityCommand).build() {\n static {\n __name(this, \"GetOpenIdTokenForDeveloperIdentityCommand\");\n }\n};\n\n// src/commands/GetPrincipalTagAttributeMapCommand.ts\n\n\n\nvar GetPrincipalTagAttributeMapCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSCognitoIdentityService\", \"GetPrincipalTagAttributeMap\", {}).n(\"CognitoIdentityClient\", \"GetPrincipalTagAttributeMapCommand\").f(void 0, void 0).ser(se_GetPrincipalTagAttributeMapCommand).de(de_GetPrincipalTagAttributeMapCommand).build() {\n static {\n __name(this, \"GetPrincipalTagAttributeMapCommand\");\n }\n};\n\n// src/commands/ListIdentitiesCommand.ts\n\n\n\nvar ListIdentitiesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSCognitoIdentityService\", \"ListIdentities\", {}).n(\"CognitoIdentityClient\", \"ListIdentitiesCommand\").f(void 0, void 0).ser(se_ListIdentitiesCommand).de(de_ListIdentitiesCommand).build() {\n static {\n __name(this, \"ListIdentitiesCommand\");\n }\n};\n\n// src/commands/ListIdentityPoolsCommand.ts\n\n\n\nvar ListIdentityPoolsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSCognitoIdentityService\", \"ListIdentityPools\", {}).n(\"CognitoIdentityClient\", \"ListIdentityPoolsCommand\").f(void 0, void 0).ser(se_ListIdentityPoolsCommand).de(de_ListIdentityPoolsCommand).build() {\n static {\n __name(this, \"ListIdentityPoolsCommand\");\n }\n};\n\n// src/commands/ListTagsForResourceCommand.ts\n\n\n\nvar ListTagsForResourceCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSCognitoIdentityService\", \"ListTagsForResource\", {}).n(\"CognitoIdentityClient\", \"ListTagsForResourceCommand\").f(void 0, void 0).ser(se_ListTagsForResourceCommand).de(de_ListTagsForResourceCommand).build() {\n static {\n __name(this, \"ListTagsForResourceCommand\");\n }\n};\n\n// src/commands/LookupDeveloperIdentityCommand.ts\n\n\n\nvar LookupDeveloperIdentityCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSCognitoIdentityService\", \"LookupDeveloperIdentity\", {}).n(\"CognitoIdentityClient\", \"LookupDeveloperIdentityCommand\").f(void 0, void 0).ser(se_LookupDeveloperIdentityCommand).de(de_LookupDeveloperIdentityCommand).build() {\n static {\n __name(this, \"LookupDeveloperIdentityCommand\");\n }\n};\n\n// src/commands/MergeDeveloperIdentitiesCommand.ts\n\n\n\nvar MergeDeveloperIdentitiesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSCognitoIdentityService\", \"MergeDeveloperIdentities\", {}).n(\"CognitoIdentityClient\", \"MergeDeveloperIdentitiesCommand\").f(void 0, void 0).ser(se_MergeDeveloperIdentitiesCommand).de(de_MergeDeveloperIdentitiesCommand).build() {\n static {\n __name(this, \"MergeDeveloperIdentitiesCommand\");\n }\n};\n\n// src/commands/SetIdentityPoolRolesCommand.ts\n\n\n\nvar SetIdentityPoolRolesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSCognitoIdentityService\", \"SetIdentityPoolRoles\", {}).n(\"CognitoIdentityClient\", \"SetIdentityPoolRolesCommand\").f(void 0, void 0).ser(se_SetIdentityPoolRolesCommand).de(de_SetIdentityPoolRolesCommand).build() {\n static {\n __name(this, \"SetIdentityPoolRolesCommand\");\n }\n};\n\n// src/commands/SetPrincipalTagAttributeMapCommand.ts\n\n\n\nvar SetPrincipalTagAttributeMapCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSCognitoIdentityService\", \"SetPrincipalTagAttributeMap\", {}).n(\"CognitoIdentityClient\", \"SetPrincipalTagAttributeMapCommand\").f(void 0, void 0).ser(se_SetPrincipalTagAttributeMapCommand).de(de_SetPrincipalTagAttributeMapCommand).build() {\n static {\n __name(this, \"SetPrincipalTagAttributeMapCommand\");\n }\n};\n\n// src/commands/TagResourceCommand.ts\n\n\n\nvar TagResourceCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSCognitoIdentityService\", \"TagResource\", {}).n(\"CognitoIdentityClient\", \"TagResourceCommand\").f(void 0, void 0).ser(se_TagResourceCommand).de(de_TagResourceCommand).build() {\n static {\n __name(this, \"TagResourceCommand\");\n }\n};\n\n// src/commands/UnlinkDeveloperIdentityCommand.ts\n\n\n\nvar UnlinkDeveloperIdentityCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSCognitoIdentityService\", \"UnlinkDeveloperIdentity\", {}).n(\"CognitoIdentityClient\", \"UnlinkDeveloperIdentityCommand\").f(void 0, void 0).ser(se_UnlinkDeveloperIdentityCommand).de(de_UnlinkDeveloperIdentityCommand).build() {\n static {\n __name(this, \"UnlinkDeveloperIdentityCommand\");\n }\n};\n\n// src/commands/UnlinkIdentityCommand.ts\n\n\n\nvar UnlinkIdentityCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSCognitoIdentityService\", \"UnlinkIdentity\", {}).n(\"CognitoIdentityClient\", \"UnlinkIdentityCommand\").f(UnlinkIdentityInputFilterSensitiveLog, void 0).ser(se_UnlinkIdentityCommand).de(de_UnlinkIdentityCommand).build() {\n static {\n __name(this, \"UnlinkIdentityCommand\");\n }\n};\n\n// src/commands/UntagResourceCommand.ts\n\n\n\nvar UntagResourceCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSCognitoIdentityService\", \"UntagResource\", {}).n(\"CognitoIdentityClient\", \"UntagResourceCommand\").f(void 0, void 0).ser(se_UntagResourceCommand).de(de_UntagResourceCommand).build() {\n static {\n __name(this, \"UntagResourceCommand\");\n }\n};\n\n// src/commands/UpdateIdentityPoolCommand.ts\n\n\n\nvar UpdateIdentityPoolCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSCognitoIdentityService\", \"UpdateIdentityPool\", {}).n(\"CognitoIdentityClient\", \"UpdateIdentityPoolCommand\").f(void 0, void 0).ser(se_UpdateIdentityPoolCommand).de(de_UpdateIdentityPoolCommand).build() {\n static {\n __name(this, \"UpdateIdentityPoolCommand\");\n }\n};\n\n// src/CognitoIdentity.ts\nvar commands = {\n CreateIdentityPoolCommand,\n DeleteIdentitiesCommand,\n DeleteIdentityPoolCommand,\n DescribeIdentityCommand,\n DescribeIdentityPoolCommand,\n GetCredentialsForIdentityCommand,\n GetIdCommand,\n GetIdentityPoolRolesCommand,\n GetOpenIdTokenCommand,\n GetOpenIdTokenForDeveloperIdentityCommand,\n GetPrincipalTagAttributeMapCommand,\n ListIdentitiesCommand,\n ListIdentityPoolsCommand,\n ListTagsForResourceCommand,\n LookupDeveloperIdentityCommand,\n MergeDeveloperIdentitiesCommand,\n SetIdentityPoolRolesCommand,\n SetPrincipalTagAttributeMapCommand,\n TagResourceCommand,\n UnlinkDeveloperIdentityCommand,\n UnlinkIdentityCommand,\n UntagResourceCommand,\n UpdateIdentityPoolCommand\n};\nvar CognitoIdentity = class extends CognitoIdentityClient {\n static {\n __name(this, \"CognitoIdentity\");\n }\n};\n(0, import_smithy_client.createAggregatedClient)(commands, CognitoIdentity);\n\n// src/pagination/ListIdentityPoolsPaginator.ts\n\nvar paginateListIdentityPools = (0, import_core.createPaginator)(CognitoIdentityClient, ListIdentityPoolsCommand, \"NextToken\", \"NextToken\", \"MaxResults\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n CognitoIdentityServiceException,\n __Client,\n CognitoIdentityClient,\n CognitoIdentity,\n $Command,\n CreateIdentityPoolCommand,\n DeleteIdentitiesCommand,\n DeleteIdentityPoolCommand,\n DescribeIdentityCommand,\n DescribeIdentityPoolCommand,\n GetCredentialsForIdentityCommand,\n GetIdCommand,\n GetIdentityPoolRolesCommand,\n GetOpenIdTokenCommand,\n GetOpenIdTokenForDeveloperIdentityCommand,\n GetPrincipalTagAttributeMapCommand,\n ListIdentitiesCommand,\n ListIdentityPoolsCommand,\n ListTagsForResourceCommand,\n LookupDeveloperIdentityCommand,\n MergeDeveloperIdentitiesCommand,\n SetIdentityPoolRolesCommand,\n SetPrincipalTagAttributeMapCommand,\n TagResourceCommand,\n UnlinkDeveloperIdentityCommand,\n UnlinkIdentityCommand,\n UntagResourceCommand,\n UpdateIdentityPoolCommand,\n paginateListIdentityPools,\n AmbiguousRoleResolutionType,\n InternalErrorException,\n InvalidParameterException,\n LimitExceededException,\n NotAuthorizedException,\n ResourceConflictException,\n TooManyRequestsException,\n ErrorCode,\n ResourceNotFoundException,\n ExternalServiceException,\n InvalidIdentityPoolConfigurationException,\n MappingRuleMatchType,\n RoleMappingType,\n DeveloperUserAlreadyRegisteredException,\n ConcurrentModificationException,\n GetCredentialsForIdentityInputFilterSensitiveLog,\n CredentialsFilterSensitiveLog,\n GetCredentialsForIdentityResponseFilterSensitiveLog,\n GetIdInputFilterSensitiveLog,\n GetOpenIdTokenInputFilterSensitiveLog,\n GetOpenIdTokenResponseFilterSensitiveLog,\n GetOpenIdTokenForDeveloperIdentityInputFilterSensitiveLog,\n GetOpenIdTokenForDeveloperIdentityResponseFilterSensitiveLog,\n UnlinkIdentityInputFilterSensitiveLog\n});\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getRuntimeConfig = void 0;\nconst tslib_1 = require(\"tslib\");\nconst package_json_1 = tslib_1.__importDefault(require(\"../package.json\"));\nconst core_1 = require(\"@aws-sdk/core\");\nconst credential_provider_node_1 = require(\"@aws-sdk/credential-provider-node\");\nconst util_user_agent_node_1 = require(\"@aws-sdk/util-user-agent-node\");\nconst config_resolver_1 = require(\"@smithy/config-resolver\");\nconst hash_node_1 = require(\"@smithy/hash-node\");\nconst middleware_retry_1 = require(\"@smithy/middleware-retry\");\nconst node_config_provider_1 = require(\"@smithy/node-config-provider\");\nconst node_http_handler_1 = require(\"@smithy/node-http-handler\");\nconst util_body_length_node_1 = require(\"@smithy/util-body-length-node\");\nconst util_retry_1 = require(\"@smithy/util-retry\");\nconst runtimeConfig_shared_1 = require(\"./runtimeConfig.shared\");\nconst smithy_client_1 = require(\"@smithy/smithy-client\");\nconst util_defaults_mode_node_1 = require(\"@smithy/util-defaults-mode-node\");\nconst smithy_client_2 = require(\"@smithy/smithy-client\");\nconst getRuntimeConfig = (config) => {\n (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);\n const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);\n const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);\n const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);\n (0, core_1.emitWarningIfUnsupportedVersion)(process.version);\n const loaderConfig = {\n profile: config?.profile,\n logger: clientSharedValues.logger,\n };\n return {\n ...clientSharedValues,\n ...config,\n runtime: \"node\",\n defaultsMode,\n authSchemePreference: config?.authSchemePreference ?? (0, node_config_provider_1.loadConfig)(core_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),\n bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,\n credentialDefaultProvider: config?.credentialDefaultProvider ?? credential_provider_node_1.defaultProvider,\n defaultUserAgentProvider: config?.defaultUserAgentProvider ??\n (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),\n maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),\n region: config?.region ??\n (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),\n requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),\n retryMode: config?.retryMode ??\n (0, node_config_provider_1.loadConfig)({\n ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,\n default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE,\n }, config),\n sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, \"sha256\"),\n streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,\n useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),\n };\n};\nexports.getRuntimeConfig = getRuntimeConfig;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getRuntimeConfig = void 0;\nconst core_1 = require(\"@aws-sdk/core\");\nconst core_2 = require(\"@smithy/core\");\nconst smithy_client_1 = require(\"@smithy/smithy-client\");\nconst url_parser_1 = require(\"@smithy/url-parser\");\nconst util_base64_1 = require(\"@smithy/util-base64\");\nconst util_utf8_1 = require(\"@smithy/util-utf8\");\nconst httpAuthSchemeProvider_1 = require(\"./auth/httpAuthSchemeProvider\");\nconst endpointResolver_1 = require(\"./endpoint/endpointResolver\");\nconst getRuntimeConfig = (config) => {\n return {\n apiVersion: \"2014-06-30\",\n base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64,\n base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,\n disableHostPrefix: config?.disableHostPrefix ?? false,\n endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,\n extensions: config?.extensions ?? [],\n httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultCognitoIdentityHttpAuthSchemeProvider,\n httpAuthSchemes: config?.httpAuthSchemes ?? [\n {\n schemeId: \"aws.auth#sigv4\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"aws.auth#sigv4\"),\n signer: new core_1.AwsSdkSigV4Signer(),\n },\n {\n schemeId: \"smithy.api#noAuth\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"smithy.api#noAuth\") || (async () => ({})),\n signer: new core_2.NoAuthSigner(),\n },\n ],\n logger: config?.logger ?? new smithy_client_1.NoOpLogger(),\n serviceId: config?.serviceId ?? \"Cognito Identity\",\n urlParser: config?.urlParser ?? url_parser_1.parseUrl,\n utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,\n utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8,\n };\n};\nexports.getRuntimeConfig = getRuntimeConfig;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resolveHttpAuthSchemeConfig = exports.defaultSSOHttpAuthSchemeProvider = exports.defaultSSOHttpAuthSchemeParametersProvider = void 0;\nconst core_1 = require(\"@aws-sdk/core\");\nconst util_middleware_1 = require(\"@smithy/util-middleware\");\nconst defaultSSOHttpAuthSchemeParametersProvider = async (config, context, input) => {\n return {\n operation: (0, util_middleware_1.getSmithyContext)(context).operation,\n region: (await (0, util_middleware_1.normalizeProvider)(config.region)()) ||\n (() => {\n throw new Error(\"expected `region` to be configured for `aws.auth#sigv4`\");\n })(),\n };\n};\nexports.defaultSSOHttpAuthSchemeParametersProvider = defaultSSOHttpAuthSchemeParametersProvider;\nfunction createAwsAuthSigv4HttpAuthOption(authParameters) {\n return {\n schemeId: \"aws.auth#sigv4\",\n signingProperties: {\n name: \"awsssoportal\",\n region: authParameters.region,\n },\n propertiesExtractor: (config, context) => ({\n signingProperties: {\n config,\n context,\n },\n }),\n };\n}\nfunction createSmithyApiNoAuthHttpAuthOption(authParameters) {\n return {\n schemeId: \"smithy.api#noAuth\",\n };\n}\nconst defaultSSOHttpAuthSchemeProvider = (authParameters) => {\n const options = [];\n switch (authParameters.operation) {\n case \"GetRoleCredentials\": {\n options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));\n break;\n }\n case \"ListAccountRoles\": {\n options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));\n break;\n }\n case \"ListAccounts\": {\n options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));\n break;\n }\n case \"Logout\": {\n options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));\n break;\n }\n default: {\n options.push(createAwsAuthSigv4HttpAuthOption(authParameters));\n }\n }\n return options;\n};\nexports.defaultSSOHttpAuthSchemeProvider = defaultSSOHttpAuthSchemeProvider;\nconst resolveHttpAuthSchemeConfig = (config) => {\n const config_0 = (0, core_1.resolveAwsSdkSigV4Config)(config);\n return Object.assign(config_0, {\n authSchemePreference: (0, util_middleware_1.normalizeProvider)(config.authSchemePreference ?? []),\n });\n};\nexports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.defaultEndpointResolver = void 0;\nconst util_endpoints_1 = require(\"@aws-sdk/util-endpoints\");\nconst util_endpoints_2 = require(\"@smithy/util-endpoints\");\nconst ruleset_1 = require(\"./ruleset\");\nconst cache = new util_endpoints_2.EndpointCache({\n size: 50,\n params: [\"Endpoint\", \"Region\", \"UseDualStack\", \"UseFIPS\"],\n});\nconst defaultEndpointResolver = (endpointParams, context = {}) => {\n return cache.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, {\n endpointParams: endpointParams,\n logger: context.logger,\n }));\n};\nexports.defaultEndpointResolver = defaultEndpointResolver;\nutil_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ruleSet = void 0;\nconst u = \"required\", v = \"fn\", w = \"argv\", x = \"ref\";\nconst a = true, b = \"isSet\", c = \"booleanEquals\", d = \"error\", e = \"endpoint\", f = \"tree\", g = \"PartitionResult\", h = \"getAttr\", i = { [u]: false, \"type\": \"String\" }, j = { [u]: true, \"default\": false, \"type\": \"Boolean\" }, k = { [x]: \"Endpoint\" }, l = { [v]: c, [w]: [{ [x]: \"UseFIPS\" }, true] }, m = { [v]: c, [w]: [{ [x]: \"UseDualStack\" }, true] }, n = {}, o = { [v]: h, [w]: [{ [x]: g }, \"supportsFIPS\"] }, p = { [x]: g }, q = { [v]: c, [w]: [true, { [v]: h, [w]: [p, \"supportsDualStack\"] }] }, r = [l], s = [m], t = [{ [x]: \"Region\" }];\nconst _data = { version: \"1.0\", parameters: { Region: i, UseDualStack: j, UseFIPS: j, Endpoint: i }, rules: [{ conditions: [{ [v]: b, [w]: [k] }], rules: [{ conditions: r, error: \"Invalid Configuration: FIPS and custom endpoint are not supported\", type: d }, { conditions: s, error: \"Invalid Configuration: Dualstack and custom endpoint are not supported\", type: d }, { endpoint: { url: k, properties: n, headers: n }, type: e }], type: f }, { conditions: [{ [v]: b, [w]: t }], rules: [{ conditions: [{ [v]: \"aws.partition\", [w]: t, assign: g }], rules: [{ conditions: [l, m], rules: [{ conditions: [{ [v]: c, [w]: [a, o] }, q], rules: [{ endpoint: { url: \"https://portal.sso-fips.{Region}.{PartitionResult#dualStackDnsSuffix}\", properties: n, headers: n }, type: e }], type: f }, { error: \"FIPS and DualStack are enabled, but this partition does not support one or both\", type: d }], type: f }, { conditions: r, rules: [{ conditions: [{ [v]: c, [w]: [o, a] }], rules: [{ conditions: [{ [v]: \"stringEquals\", [w]: [{ [v]: h, [w]: [p, \"name\"] }, \"aws-us-gov\"] }], endpoint: { url: \"https://portal.sso.{Region}.amazonaws.com\", properties: n, headers: n }, type: e }, { endpoint: { url: \"https://portal.sso-fips.{Region}.{PartitionResult#dnsSuffix}\", properties: n, headers: n }, type: e }], type: f }, { error: \"FIPS is enabled but this partition does not support FIPS\", type: d }], type: f }, { conditions: s, rules: [{ conditions: [q], rules: [{ endpoint: { url: \"https://portal.sso.{Region}.{PartitionResult#dualStackDnsSuffix}\", properties: n, headers: n }, type: e }], type: f }, { error: \"DualStack is enabled but this partition does not support DualStack\", type: d }], type: f }, { endpoint: { url: \"https://portal.sso.{Region}.{PartitionResult#dnsSuffix}\", properties: n, headers: n }, type: e }], type: f }], type: f }, { error: \"Invalid Configuration: Missing Region\", type: d }] };\nexports.ruleSet = _data;\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar index_exports = {};\n__export(index_exports, {\n GetRoleCredentialsCommand: () => GetRoleCredentialsCommand,\n GetRoleCredentialsRequestFilterSensitiveLog: () => GetRoleCredentialsRequestFilterSensitiveLog,\n GetRoleCredentialsResponseFilterSensitiveLog: () => GetRoleCredentialsResponseFilterSensitiveLog,\n InvalidRequestException: () => InvalidRequestException,\n ListAccountRolesCommand: () => ListAccountRolesCommand,\n ListAccountRolesRequestFilterSensitiveLog: () => ListAccountRolesRequestFilterSensitiveLog,\n ListAccountsCommand: () => ListAccountsCommand,\n ListAccountsRequestFilterSensitiveLog: () => ListAccountsRequestFilterSensitiveLog,\n LogoutCommand: () => LogoutCommand,\n LogoutRequestFilterSensitiveLog: () => LogoutRequestFilterSensitiveLog,\n ResourceNotFoundException: () => ResourceNotFoundException,\n RoleCredentialsFilterSensitiveLog: () => RoleCredentialsFilterSensitiveLog,\n SSO: () => SSO,\n SSOClient: () => SSOClient,\n SSOServiceException: () => SSOServiceException,\n TooManyRequestsException: () => TooManyRequestsException,\n UnauthorizedException: () => UnauthorizedException,\n __Client: () => import_smithy_client.Client,\n paginateListAccountRoles: () => paginateListAccountRoles,\n paginateListAccounts: () => paginateListAccounts\n});\nmodule.exports = __toCommonJS(index_exports);\n\n// src/SSOClient.ts\nvar import_middleware_host_header = require(\"@aws-sdk/middleware-host-header\");\nvar import_middleware_logger = require(\"@aws-sdk/middleware-logger\");\nvar import_middleware_recursion_detection = require(\"@aws-sdk/middleware-recursion-detection\");\nvar import_middleware_user_agent = require(\"@aws-sdk/middleware-user-agent\");\nvar import_config_resolver = require(\"@smithy/config-resolver\");\nvar import_core = require(\"@smithy/core\");\nvar import_middleware_content_length = require(\"@smithy/middleware-content-length\");\nvar import_middleware_endpoint = require(\"@smithy/middleware-endpoint\");\nvar import_middleware_retry = require(\"@smithy/middleware-retry\");\n\nvar import_httpAuthSchemeProvider = require(\"./auth/httpAuthSchemeProvider\");\n\n// src/endpoint/EndpointParameters.ts\nvar resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {\n return Object.assign(options, {\n useDualstackEndpoint: options.useDualstackEndpoint ?? false,\n useFipsEndpoint: options.useFipsEndpoint ?? false,\n defaultSigningName: \"awsssoportal\"\n });\n}, \"resolveClientEndpointParameters\");\nvar commonParams = {\n UseFIPS: { type: \"builtInParams\", name: \"useFipsEndpoint\" },\n Endpoint: { type: \"builtInParams\", name: \"endpoint\" },\n Region: { type: \"builtInParams\", name: \"region\" },\n UseDualStack: { type: \"builtInParams\", name: \"useDualstackEndpoint\" }\n};\n\n// src/SSOClient.ts\nvar import_runtimeConfig = require(\"././runtimeConfig\");\n\n// src/runtimeExtensions.ts\nvar import_region_config_resolver = require(\"@aws-sdk/region-config-resolver\");\nvar import_protocol_http = require(\"@smithy/protocol-http\");\nvar import_smithy_client = require(\"@smithy/smithy-client\");\n\n// src/auth/httpAuthExtensionConfiguration.ts\nvar getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {\n const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;\n let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;\n let _credentials = runtimeConfig.credentials;\n return {\n setHttpAuthScheme(httpAuthScheme) {\n const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);\n if (index === -1) {\n _httpAuthSchemes.push(httpAuthScheme);\n } else {\n _httpAuthSchemes.splice(index, 1, httpAuthScheme);\n }\n },\n httpAuthSchemes() {\n return _httpAuthSchemes;\n },\n setHttpAuthSchemeProvider(httpAuthSchemeProvider) {\n _httpAuthSchemeProvider = httpAuthSchemeProvider;\n },\n httpAuthSchemeProvider() {\n return _httpAuthSchemeProvider;\n },\n setCredentials(credentials) {\n _credentials = credentials;\n },\n credentials() {\n return _credentials;\n }\n };\n}, \"getHttpAuthExtensionConfiguration\");\nvar resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => {\n return {\n httpAuthSchemes: config.httpAuthSchemes(),\n httpAuthSchemeProvider: config.httpAuthSchemeProvider(),\n credentials: config.credentials()\n };\n}, \"resolveHttpAuthRuntimeConfig\");\n\n// src/runtimeExtensions.ts\nvar resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {\n const extensionConfiguration = Object.assign(\n (0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig),\n (0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig),\n (0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig),\n getHttpAuthExtensionConfiguration(runtimeConfig)\n );\n extensions.forEach((extension) => extension.configure(extensionConfiguration));\n return Object.assign(\n runtimeConfig,\n (0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),\n (0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),\n (0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),\n resolveHttpAuthRuntimeConfig(extensionConfiguration)\n );\n}, \"resolveRuntimeExtensions\");\n\n// src/SSOClient.ts\nvar SSOClient = class extends import_smithy_client.Client {\n static {\n __name(this, \"SSOClient\");\n }\n /**\n * The resolved configuration of SSOClient class. This is resolved and normalized from the {@link SSOClientConfig | constructor configuration interface}.\n */\n config;\n constructor(...[configuration]) {\n const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});\n super(_config_0);\n this.initConfig = _config_0;\n const _config_1 = resolveClientEndpointParameters(_config_0);\n const _config_2 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_1);\n const _config_3 = (0, import_middleware_retry.resolveRetryConfig)(_config_2);\n const _config_4 = (0, import_config_resolver.resolveRegionConfig)(_config_3);\n const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);\n const _config_6 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_5);\n const _config_7 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_6);\n const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);\n this.config = _config_8;\n this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));\n this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));\n this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));\n this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));\n this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));\n this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));\n this.middlewareStack.use(\n (0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {\n httpAuthSchemeParametersProvider: import_httpAuthSchemeProvider.defaultSSOHttpAuthSchemeParametersProvider,\n identityProviderConfigProvider: /* @__PURE__ */ __name(async (config) => new import_core.DefaultIdentityProviderConfig({\n \"aws.auth#sigv4\": config.credentials\n }), \"identityProviderConfigProvider\")\n })\n );\n this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config));\n }\n /**\n * Destroy underlying resources, like sockets. It's usually not necessary to do this.\n * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.\n * Otherwise, sockets might stay open for quite a long time before the server terminates them.\n */\n destroy() {\n super.destroy();\n }\n};\n\n// src/SSO.ts\n\n\n// src/commands/GetRoleCredentialsCommand.ts\n\nvar import_middleware_serde = require(\"@smithy/middleware-serde\");\n\n\n// src/models/models_0.ts\n\n\n// src/models/SSOServiceException.ts\n\nvar SSOServiceException = class _SSOServiceException extends import_smithy_client.ServiceException {\n static {\n __name(this, \"SSOServiceException\");\n }\n /**\n * @internal\n */\n constructor(options) {\n super(options);\n Object.setPrototypeOf(this, _SSOServiceException.prototype);\n }\n};\n\n// src/models/models_0.ts\nvar InvalidRequestException = class _InvalidRequestException extends SSOServiceException {\n static {\n __name(this, \"InvalidRequestException\");\n }\n name = \"InvalidRequestException\";\n $fault = \"client\";\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"InvalidRequestException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _InvalidRequestException.prototype);\n }\n};\nvar ResourceNotFoundException = class _ResourceNotFoundException extends SSOServiceException {\n static {\n __name(this, \"ResourceNotFoundException\");\n }\n name = \"ResourceNotFoundException\";\n $fault = \"client\";\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"ResourceNotFoundException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _ResourceNotFoundException.prototype);\n }\n};\nvar TooManyRequestsException = class _TooManyRequestsException extends SSOServiceException {\n static {\n __name(this, \"TooManyRequestsException\");\n }\n name = \"TooManyRequestsException\";\n $fault = \"client\";\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"TooManyRequestsException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _TooManyRequestsException.prototype);\n }\n};\nvar UnauthorizedException = class _UnauthorizedException extends SSOServiceException {\n static {\n __name(this, \"UnauthorizedException\");\n }\n name = \"UnauthorizedException\";\n $fault = \"client\";\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"UnauthorizedException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _UnauthorizedException.prototype);\n }\n};\nvar GetRoleCredentialsRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.accessToken && { accessToken: import_smithy_client.SENSITIVE_STRING }\n}), \"GetRoleCredentialsRequestFilterSensitiveLog\");\nvar RoleCredentialsFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.secretAccessKey && { secretAccessKey: import_smithy_client.SENSITIVE_STRING },\n ...obj.sessionToken && { sessionToken: import_smithy_client.SENSITIVE_STRING }\n}), \"RoleCredentialsFilterSensitiveLog\");\nvar GetRoleCredentialsResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.roleCredentials && { roleCredentials: RoleCredentialsFilterSensitiveLog(obj.roleCredentials) }\n}), \"GetRoleCredentialsResponseFilterSensitiveLog\");\nvar ListAccountRolesRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.accessToken && { accessToken: import_smithy_client.SENSITIVE_STRING }\n}), \"ListAccountRolesRequestFilterSensitiveLog\");\nvar ListAccountsRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.accessToken && { accessToken: import_smithy_client.SENSITIVE_STRING }\n}), \"ListAccountsRequestFilterSensitiveLog\");\nvar LogoutRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.accessToken && { accessToken: import_smithy_client.SENSITIVE_STRING }\n}), \"LogoutRequestFilterSensitiveLog\");\n\n// src/protocols/Aws_restJson1.ts\nvar import_core2 = require(\"@aws-sdk/core\");\n\n\nvar se_GetRoleCredentialsCommand = /* @__PURE__ */ __name(async (input, context) => {\n const b = (0, import_core.requestBuilder)(input, context);\n const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {\n [_xasbt]: input[_aT]\n });\n b.bp(\"/federation/credentials\");\n const query = (0, import_smithy_client.map)({\n [_rn]: [, (0, import_smithy_client.expectNonNull)(input[_rN], `roleName`)],\n [_ai]: [, (0, import_smithy_client.expectNonNull)(input[_aI], `accountId`)]\n });\n let body;\n b.m(\"GET\").h(headers).q(query).b(body);\n return b.build();\n}, \"se_GetRoleCredentialsCommand\");\nvar se_ListAccountRolesCommand = /* @__PURE__ */ __name(async (input, context) => {\n const b = (0, import_core.requestBuilder)(input, context);\n const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {\n [_xasbt]: input[_aT]\n });\n b.bp(\"/assignment/roles\");\n const query = (0, import_smithy_client.map)({\n [_nt]: [, input[_nT]],\n [_mr]: [() => input.maxResults !== void 0, () => input[_mR].toString()],\n [_ai]: [, (0, import_smithy_client.expectNonNull)(input[_aI], `accountId`)]\n });\n let body;\n b.m(\"GET\").h(headers).q(query).b(body);\n return b.build();\n}, \"se_ListAccountRolesCommand\");\nvar se_ListAccountsCommand = /* @__PURE__ */ __name(async (input, context) => {\n const b = (0, import_core.requestBuilder)(input, context);\n const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {\n [_xasbt]: input[_aT]\n });\n b.bp(\"/assignment/accounts\");\n const query = (0, import_smithy_client.map)({\n [_nt]: [, input[_nT]],\n [_mr]: [() => input.maxResults !== void 0, () => input[_mR].toString()]\n });\n let body;\n b.m(\"GET\").h(headers).q(query).b(body);\n return b.build();\n}, \"se_ListAccountsCommand\");\nvar se_LogoutCommand = /* @__PURE__ */ __name(async (input, context) => {\n const b = (0, import_core.requestBuilder)(input, context);\n const headers = (0, import_smithy_client.map)({}, import_smithy_client.isSerializableHeaderValue, {\n [_xasbt]: input[_aT]\n });\n b.bp(\"/logout\");\n let body;\n b.m(\"POST\").h(headers).b(body);\n return b.build();\n}, \"se_LogoutCommand\");\nvar de_GetRoleCredentialsCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const contents = (0, import_smithy_client.map)({\n $metadata: deserializeMetadata(output)\n });\n const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), \"body\");\n const doc = (0, import_smithy_client.take)(data, {\n roleCredentials: import_smithy_client._json\n });\n Object.assign(contents, doc);\n return contents;\n}, \"de_GetRoleCredentialsCommand\");\nvar de_ListAccountRolesCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const contents = (0, import_smithy_client.map)({\n $metadata: deserializeMetadata(output)\n });\n const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), \"body\");\n const doc = (0, import_smithy_client.take)(data, {\n nextToken: import_smithy_client.expectString,\n roleList: import_smithy_client._json\n });\n Object.assign(contents, doc);\n return contents;\n}, \"de_ListAccountRolesCommand\");\nvar de_ListAccountsCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const contents = (0, import_smithy_client.map)({\n $metadata: deserializeMetadata(output)\n });\n const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), \"body\");\n const doc = (0, import_smithy_client.take)(data, {\n accountList: import_smithy_client._json,\n nextToken: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n return contents;\n}, \"de_ListAccountsCommand\");\nvar de_LogoutCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const contents = (0, import_smithy_client.map)({\n $metadata: deserializeMetadata(output)\n });\n await (0, import_smithy_client.collectBody)(output.body, context);\n return contents;\n}, \"de_LogoutCommand\");\nvar de_CommandError = /* @__PURE__ */ __name(async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await (0, import_core2.parseJsonErrorBody)(output.body, context)\n };\n const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);\n switch (errorCode) {\n case \"InvalidRequestException\":\n case \"com.amazonaws.sso#InvalidRequestException\":\n throw await de_InvalidRequestExceptionRes(parsedOutput, context);\n case \"ResourceNotFoundException\":\n case \"com.amazonaws.sso#ResourceNotFoundException\":\n throw await de_ResourceNotFoundExceptionRes(parsedOutput, context);\n case \"TooManyRequestsException\":\n case \"com.amazonaws.sso#TooManyRequestsException\":\n throw await de_TooManyRequestsExceptionRes(parsedOutput, context);\n case \"UnauthorizedException\":\n case \"com.amazonaws.sso#UnauthorizedException\":\n throw await de_UnauthorizedExceptionRes(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n return throwDefaultError({\n output,\n parsedBody,\n errorCode\n });\n }\n}, \"de_CommandError\");\nvar throwDefaultError = (0, import_smithy_client.withBaseException)(SSOServiceException);\nvar de_InvalidRequestExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client.take)(data, {\n message: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n const exception = new InvalidRequestException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_InvalidRequestExceptionRes\");\nvar de_ResourceNotFoundExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client.take)(data, {\n message: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n const exception = new ResourceNotFoundException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_ResourceNotFoundExceptionRes\");\nvar de_TooManyRequestsExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client.take)(data, {\n message: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n const exception = new TooManyRequestsException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_TooManyRequestsExceptionRes\");\nvar de_UnauthorizedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client.take)(data, {\n message: import_smithy_client.expectString\n });\n Object.assign(contents, doc);\n const exception = new UnauthorizedException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_UnauthorizedExceptionRes\");\nvar deserializeMetadata = /* @__PURE__ */ __name((output) => ({\n httpStatusCode: output.statusCode,\n requestId: output.headers[\"x-amzn-requestid\"] ?? output.headers[\"x-amzn-request-id\"] ?? output.headers[\"x-amz-request-id\"],\n extendedRequestId: output.headers[\"x-amz-id-2\"],\n cfId: output.headers[\"x-amz-cf-id\"]\n}), \"deserializeMetadata\");\nvar _aI = \"accountId\";\nvar _aT = \"accessToken\";\nvar _ai = \"account_id\";\nvar _mR = \"maxResults\";\nvar _mr = \"max_result\";\nvar _nT = \"nextToken\";\nvar _nt = \"next_token\";\nvar _rN = \"roleName\";\nvar _rn = \"role_name\";\nvar _xasbt = \"x-amz-sso_bearer_token\";\n\n// src/commands/GetRoleCredentialsCommand.ts\nvar GetRoleCredentialsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"SWBPortalService\", \"GetRoleCredentials\", {}).n(\"SSOClient\", \"GetRoleCredentialsCommand\").f(GetRoleCredentialsRequestFilterSensitiveLog, GetRoleCredentialsResponseFilterSensitiveLog).ser(se_GetRoleCredentialsCommand).de(de_GetRoleCredentialsCommand).build() {\n static {\n __name(this, \"GetRoleCredentialsCommand\");\n }\n};\n\n// src/commands/ListAccountRolesCommand.ts\n\n\n\nvar ListAccountRolesCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"SWBPortalService\", \"ListAccountRoles\", {}).n(\"SSOClient\", \"ListAccountRolesCommand\").f(ListAccountRolesRequestFilterSensitiveLog, void 0).ser(se_ListAccountRolesCommand).de(de_ListAccountRolesCommand).build() {\n static {\n __name(this, \"ListAccountRolesCommand\");\n }\n};\n\n// src/commands/ListAccountsCommand.ts\n\n\n\nvar ListAccountsCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"SWBPortalService\", \"ListAccounts\", {}).n(\"SSOClient\", \"ListAccountsCommand\").f(ListAccountsRequestFilterSensitiveLog, void 0).ser(se_ListAccountsCommand).de(de_ListAccountsCommand).build() {\n static {\n __name(this, \"ListAccountsCommand\");\n }\n};\n\n// src/commands/LogoutCommand.ts\n\n\n\nvar LogoutCommand = class extends import_smithy_client.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"SWBPortalService\", \"Logout\", {}).n(\"SSOClient\", \"LogoutCommand\").f(LogoutRequestFilterSensitiveLog, void 0).ser(se_LogoutCommand).de(de_LogoutCommand).build() {\n static {\n __name(this, \"LogoutCommand\");\n }\n};\n\n// src/SSO.ts\nvar commands = {\n GetRoleCredentialsCommand,\n ListAccountRolesCommand,\n ListAccountsCommand,\n LogoutCommand\n};\nvar SSO = class extends SSOClient {\n static {\n __name(this, \"SSO\");\n }\n};\n(0, import_smithy_client.createAggregatedClient)(commands, SSO);\n\n// src/pagination/ListAccountRolesPaginator.ts\n\nvar paginateListAccountRoles = (0, import_core.createPaginator)(SSOClient, ListAccountRolesCommand, \"nextToken\", \"nextToken\", \"maxResults\");\n\n// src/pagination/ListAccountsPaginator.ts\n\nvar paginateListAccounts = (0, import_core.createPaginator)(SSOClient, ListAccountsCommand, \"nextToken\", \"nextToken\", \"maxResults\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n SSOServiceException,\n __Client,\n SSOClient,\n SSO,\n $Command,\n GetRoleCredentialsCommand,\n ListAccountRolesCommand,\n ListAccountsCommand,\n LogoutCommand,\n paginateListAccountRoles,\n paginateListAccounts,\n InvalidRequestException,\n ResourceNotFoundException,\n TooManyRequestsException,\n UnauthorizedException,\n GetRoleCredentialsRequestFilterSensitiveLog,\n RoleCredentialsFilterSensitiveLog,\n GetRoleCredentialsResponseFilterSensitiveLog,\n ListAccountRolesRequestFilterSensitiveLog,\n ListAccountsRequestFilterSensitiveLog,\n LogoutRequestFilterSensitiveLog\n});\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getRuntimeConfig = void 0;\nconst tslib_1 = require(\"tslib\");\nconst package_json_1 = tslib_1.__importDefault(require(\"../package.json\"));\nconst core_1 = require(\"@aws-sdk/core\");\nconst util_user_agent_node_1 = require(\"@aws-sdk/util-user-agent-node\");\nconst config_resolver_1 = require(\"@smithy/config-resolver\");\nconst hash_node_1 = require(\"@smithy/hash-node\");\nconst middleware_retry_1 = require(\"@smithy/middleware-retry\");\nconst node_config_provider_1 = require(\"@smithy/node-config-provider\");\nconst node_http_handler_1 = require(\"@smithy/node-http-handler\");\nconst util_body_length_node_1 = require(\"@smithy/util-body-length-node\");\nconst util_retry_1 = require(\"@smithy/util-retry\");\nconst runtimeConfig_shared_1 = require(\"./runtimeConfig.shared\");\nconst smithy_client_1 = require(\"@smithy/smithy-client\");\nconst util_defaults_mode_node_1 = require(\"@smithy/util-defaults-mode-node\");\nconst smithy_client_2 = require(\"@smithy/smithy-client\");\nconst getRuntimeConfig = (config) => {\n (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);\n const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);\n const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);\n const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);\n (0, core_1.emitWarningIfUnsupportedVersion)(process.version);\n const loaderConfig = {\n profile: config?.profile,\n logger: clientSharedValues.logger,\n };\n return {\n ...clientSharedValues,\n ...config,\n runtime: \"node\",\n defaultsMode,\n authSchemePreference: config?.authSchemePreference ?? (0, node_config_provider_1.loadConfig)(core_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),\n bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,\n defaultUserAgentProvider: config?.defaultUserAgentProvider ??\n (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),\n maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),\n region: config?.region ??\n (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),\n requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),\n retryMode: config?.retryMode ??\n (0, node_config_provider_1.loadConfig)({\n ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,\n default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE,\n }, config),\n sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, \"sha256\"),\n streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,\n useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),\n };\n};\nexports.getRuntimeConfig = getRuntimeConfig;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getRuntimeConfig = void 0;\nconst core_1 = require(\"@aws-sdk/core\");\nconst core_2 = require(\"@smithy/core\");\nconst smithy_client_1 = require(\"@smithy/smithy-client\");\nconst url_parser_1 = require(\"@smithy/url-parser\");\nconst util_base64_1 = require(\"@smithy/util-base64\");\nconst util_utf8_1 = require(\"@smithy/util-utf8\");\nconst httpAuthSchemeProvider_1 = require(\"./auth/httpAuthSchemeProvider\");\nconst endpointResolver_1 = require(\"./endpoint/endpointResolver\");\nconst getRuntimeConfig = (config) => {\n return {\n apiVersion: \"2019-06-10\",\n base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64,\n base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,\n disableHostPrefix: config?.disableHostPrefix ?? false,\n endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,\n extensions: config?.extensions ?? [],\n httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSSOHttpAuthSchemeProvider,\n httpAuthSchemes: config?.httpAuthSchemes ?? [\n {\n schemeId: \"aws.auth#sigv4\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"aws.auth#sigv4\"),\n signer: new core_1.AwsSdkSigV4Signer(),\n },\n {\n schemeId: \"smithy.api#noAuth\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"smithy.api#noAuth\") || (async () => ({})),\n signer: new core_2.NoAuthSigner(),\n },\n ],\n logger: config?.logger ?? new smithy_client_1.NoOpLogger(),\n serviceId: config?.serviceId ?? \"SSO\",\n urlParser: config?.urlParser ?? url_parser_1.parseUrl,\n utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,\n utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8,\n };\n};\nexports.getRuntimeConfig = getRuntimeConfig;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.STSClient = exports.__Client = void 0;\nconst middleware_host_header_1 = require(\"@aws-sdk/middleware-host-header\");\nconst middleware_logger_1 = require(\"@aws-sdk/middleware-logger\");\nconst middleware_recursion_detection_1 = require(\"@aws-sdk/middleware-recursion-detection\");\nconst middleware_user_agent_1 = require(\"@aws-sdk/middleware-user-agent\");\nconst config_resolver_1 = require(\"@smithy/config-resolver\");\nconst core_1 = require(\"@smithy/core\");\nconst middleware_content_length_1 = require(\"@smithy/middleware-content-length\");\nconst middleware_endpoint_1 = require(\"@smithy/middleware-endpoint\");\nconst middleware_retry_1 = require(\"@smithy/middleware-retry\");\nconst smithy_client_1 = require(\"@smithy/smithy-client\");\nObject.defineProperty(exports, \"__Client\", { enumerable: true, get: function () { return smithy_client_1.Client; } });\nconst httpAuthSchemeProvider_1 = require(\"./auth/httpAuthSchemeProvider\");\nconst EndpointParameters_1 = require(\"./endpoint/EndpointParameters\");\nconst runtimeConfig_1 = require(\"./runtimeConfig\");\nconst runtimeExtensions_1 = require(\"./runtimeExtensions\");\nclass STSClient extends smithy_client_1.Client {\n config;\n constructor(...[configuration]) {\n const _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration || {});\n super(_config_0);\n this.initConfig = _config_0;\n const _config_1 = (0, EndpointParameters_1.resolveClientEndpointParameters)(_config_0);\n const _config_2 = (0, middleware_user_agent_1.resolveUserAgentConfig)(_config_1);\n const _config_3 = (0, middleware_retry_1.resolveRetryConfig)(_config_2);\n const _config_4 = (0, config_resolver_1.resolveRegionConfig)(_config_3);\n const _config_5 = (0, middleware_host_header_1.resolveHostHeaderConfig)(_config_4);\n const _config_6 = (0, middleware_endpoint_1.resolveEndpointConfig)(_config_5);\n const _config_7 = (0, httpAuthSchemeProvider_1.resolveHttpAuthSchemeConfig)(_config_6);\n const _config_8 = (0, runtimeExtensions_1.resolveRuntimeExtensions)(_config_7, configuration?.extensions || []);\n this.config = _config_8;\n this.middlewareStack.use((0, middleware_user_agent_1.getUserAgentPlugin)(this.config));\n this.middlewareStack.use((0, middleware_retry_1.getRetryPlugin)(this.config));\n this.middlewareStack.use((0, middleware_content_length_1.getContentLengthPlugin)(this.config));\n this.middlewareStack.use((0, middleware_host_header_1.getHostHeaderPlugin)(this.config));\n this.middlewareStack.use((0, middleware_logger_1.getLoggerPlugin)(this.config));\n this.middlewareStack.use((0, middleware_recursion_detection_1.getRecursionDetectionPlugin)(this.config));\n this.middlewareStack.use((0, core_1.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {\n httpAuthSchemeParametersProvider: httpAuthSchemeProvider_1.defaultSTSHttpAuthSchemeParametersProvider,\n identityProviderConfigProvider: async (config) => new core_1.DefaultIdentityProviderConfig({\n \"aws.auth#sigv4\": config.credentials,\n }),\n }));\n this.middlewareStack.use((0, core_1.getHttpSigningPlugin)(this.config));\n }\n destroy() {\n super.destroy();\n }\n}\nexports.STSClient = STSClient;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resolveHttpAuthRuntimeConfig = exports.getHttpAuthExtensionConfiguration = void 0;\nconst getHttpAuthExtensionConfiguration = (runtimeConfig) => {\n const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;\n let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;\n let _credentials = runtimeConfig.credentials;\n return {\n setHttpAuthScheme(httpAuthScheme) {\n const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);\n if (index === -1) {\n _httpAuthSchemes.push(httpAuthScheme);\n }\n else {\n _httpAuthSchemes.splice(index, 1, httpAuthScheme);\n }\n },\n httpAuthSchemes() {\n return _httpAuthSchemes;\n },\n setHttpAuthSchemeProvider(httpAuthSchemeProvider) {\n _httpAuthSchemeProvider = httpAuthSchemeProvider;\n },\n httpAuthSchemeProvider() {\n return _httpAuthSchemeProvider;\n },\n setCredentials(credentials) {\n _credentials = credentials;\n },\n credentials() {\n return _credentials;\n },\n };\n};\nexports.getHttpAuthExtensionConfiguration = getHttpAuthExtensionConfiguration;\nconst resolveHttpAuthRuntimeConfig = (config) => {\n return {\n httpAuthSchemes: config.httpAuthSchemes(),\n httpAuthSchemeProvider: config.httpAuthSchemeProvider(),\n credentials: config.credentials(),\n };\n};\nexports.resolveHttpAuthRuntimeConfig = resolveHttpAuthRuntimeConfig;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resolveHttpAuthSchemeConfig = exports.resolveStsAuthConfig = exports.defaultSTSHttpAuthSchemeProvider = exports.defaultSTSHttpAuthSchemeParametersProvider = void 0;\nconst core_1 = require(\"@aws-sdk/core\");\nconst util_middleware_1 = require(\"@smithy/util-middleware\");\nconst STSClient_1 = require(\"../STSClient\");\nconst defaultSTSHttpAuthSchemeParametersProvider = async (config, context, input) => {\n return {\n operation: (0, util_middleware_1.getSmithyContext)(context).operation,\n region: (await (0, util_middleware_1.normalizeProvider)(config.region)()) ||\n (() => {\n throw new Error(\"expected `region` to be configured for `aws.auth#sigv4`\");\n })(),\n };\n};\nexports.defaultSTSHttpAuthSchemeParametersProvider = defaultSTSHttpAuthSchemeParametersProvider;\nfunction createAwsAuthSigv4HttpAuthOption(authParameters) {\n return {\n schemeId: \"aws.auth#sigv4\",\n signingProperties: {\n name: \"sts\",\n region: authParameters.region,\n },\n propertiesExtractor: (config, context) => ({\n signingProperties: {\n config,\n context,\n },\n }),\n };\n}\nfunction createSmithyApiNoAuthHttpAuthOption(authParameters) {\n return {\n schemeId: \"smithy.api#noAuth\",\n };\n}\nconst defaultSTSHttpAuthSchemeProvider = (authParameters) => {\n const options = [];\n switch (authParameters.operation) {\n case \"AssumeRoleWithSAML\": {\n options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));\n break;\n }\n case \"AssumeRoleWithWebIdentity\": {\n options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));\n break;\n }\n default: {\n options.push(createAwsAuthSigv4HttpAuthOption(authParameters));\n }\n }\n return options;\n};\nexports.defaultSTSHttpAuthSchemeProvider = defaultSTSHttpAuthSchemeProvider;\nconst resolveStsAuthConfig = (input) => Object.assign(input, {\n stsClientCtor: STSClient_1.STSClient,\n});\nexports.resolveStsAuthConfig = resolveStsAuthConfig;\nconst resolveHttpAuthSchemeConfig = (config) => {\n const config_0 = (0, exports.resolveStsAuthConfig)(config);\n const config_1 = (0, core_1.resolveAwsSdkSigV4Config)(config_0);\n return Object.assign(config_1, {\n authSchemePreference: (0, util_middleware_1.normalizeProvider)(config.authSchemePreference ?? []),\n });\n};\nexports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.commonParams = exports.resolveClientEndpointParameters = void 0;\nconst resolveClientEndpointParameters = (options) => {\n return Object.assign(options, {\n useDualstackEndpoint: options.useDualstackEndpoint ?? false,\n useFipsEndpoint: options.useFipsEndpoint ?? false,\n useGlobalEndpoint: options.useGlobalEndpoint ?? false,\n defaultSigningName: \"sts\",\n });\n};\nexports.resolveClientEndpointParameters = resolveClientEndpointParameters;\nexports.commonParams = {\n UseGlobalEndpoint: { type: \"builtInParams\", name: \"useGlobalEndpoint\" },\n UseFIPS: { type: \"builtInParams\", name: \"useFipsEndpoint\" },\n Endpoint: { type: \"builtInParams\", name: \"endpoint\" },\n Region: { type: \"builtInParams\", name: \"region\" },\n UseDualStack: { type: \"builtInParams\", name: \"useDualstackEndpoint\" },\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.defaultEndpointResolver = void 0;\nconst util_endpoints_1 = require(\"@aws-sdk/util-endpoints\");\nconst util_endpoints_2 = require(\"@smithy/util-endpoints\");\nconst ruleset_1 = require(\"./ruleset\");\nconst cache = new util_endpoints_2.EndpointCache({\n size: 50,\n params: [\"Endpoint\", \"Region\", \"UseDualStack\", \"UseFIPS\", \"UseGlobalEndpoint\"],\n});\nconst defaultEndpointResolver = (endpointParams, context = {}) => {\n return cache.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, {\n endpointParams: endpointParams,\n logger: context.logger,\n }));\n};\nexports.defaultEndpointResolver = defaultEndpointResolver;\nutil_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ruleSet = void 0;\nconst F = \"required\", G = \"type\", H = \"fn\", I = \"argv\", J = \"ref\";\nconst a = false, b = true, c = \"booleanEquals\", d = \"stringEquals\", e = \"sigv4\", f = \"sts\", g = \"us-east-1\", h = \"endpoint\", i = \"https://sts.{Region}.{PartitionResult#dnsSuffix}\", j = \"tree\", k = \"error\", l = \"getAttr\", m = { [F]: false, [G]: \"String\" }, n = { [F]: true, \"default\": false, [G]: \"Boolean\" }, o = { [J]: \"Endpoint\" }, p = { [H]: \"isSet\", [I]: [{ [J]: \"Region\" }] }, q = { [J]: \"Region\" }, r = { [H]: \"aws.partition\", [I]: [q], \"assign\": \"PartitionResult\" }, s = { [J]: \"UseFIPS\" }, t = { [J]: \"UseDualStack\" }, u = { \"url\": \"https://sts.amazonaws.com\", \"properties\": { \"authSchemes\": [{ \"name\": e, \"signingName\": f, \"signingRegion\": g }] }, \"headers\": {} }, v = {}, w = { \"conditions\": [{ [H]: d, [I]: [q, \"aws-global\"] }], [h]: u, [G]: h }, x = { [H]: c, [I]: [s, true] }, y = { [H]: c, [I]: [t, true] }, z = { [H]: l, [I]: [{ [J]: \"PartitionResult\" }, \"supportsFIPS\"] }, A = { [J]: \"PartitionResult\" }, B = { [H]: c, [I]: [true, { [H]: l, [I]: [A, \"supportsDualStack\"] }] }, C = [{ [H]: \"isSet\", [I]: [o] }], D = [x], E = [y];\nconst _data = { version: \"1.0\", parameters: { Region: m, UseDualStack: n, UseFIPS: n, Endpoint: m, UseGlobalEndpoint: n }, rules: [{ conditions: [{ [H]: c, [I]: [{ [J]: \"UseGlobalEndpoint\" }, b] }, { [H]: \"not\", [I]: C }, p, r, { [H]: c, [I]: [s, a] }, { [H]: c, [I]: [t, a] }], rules: [{ conditions: [{ [H]: d, [I]: [q, \"ap-northeast-1\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"ap-south-1\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"ap-southeast-1\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"ap-southeast-2\"] }], endpoint: u, [G]: h }, w, { conditions: [{ [H]: d, [I]: [q, \"ca-central-1\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"eu-central-1\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"eu-north-1\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"eu-west-1\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"eu-west-2\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"eu-west-3\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"sa-east-1\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, g] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"us-east-2\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"us-west-1\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"us-west-2\"] }], endpoint: u, [G]: h }, { endpoint: { url: i, properties: { authSchemes: [{ name: e, signingName: f, signingRegion: \"{Region}\" }] }, headers: v }, [G]: h }], [G]: j }, { conditions: C, rules: [{ conditions: D, error: \"Invalid Configuration: FIPS and custom endpoint are not supported\", [G]: k }, { conditions: E, error: \"Invalid Configuration: Dualstack and custom endpoint are not supported\", [G]: k }, { endpoint: { url: o, properties: v, headers: v }, [G]: h }], [G]: j }, { conditions: [p], rules: [{ conditions: [r], rules: [{ conditions: [x, y], rules: [{ conditions: [{ [H]: c, [I]: [b, z] }, B], rules: [{ endpoint: { url: \"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}\", properties: v, headers: v }, [G]: h }], [G]: j }, { error: \"FIPS and DualStack are enabled, but this partition does not support one or both\", [G]: k }], [G]: j }, { conditions: D, rules: [{ conditions: [{ [H]: c, [I]: [z, b] }], rules: [{ conditions: [{ [H]: d, [I]: [{ [H]: l, [I]: [A, \"name\"] }, \"aws-us-gov\"] }], endpoint: { url: \"https://sts.{Region}.amazonaws.com\", properties: v, headers: v }, [G]: h }, { endpoint: { url: \"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}\", properties: v, headers: v }, [G]: h }], [G]: j }, { error: \"FIPS is enabled but this partition does not support FIPS\", [G]: k }], [G]: j }, { conditions: E, rules: [{ conditions: [B], rules: [{ endpoint: { url: \"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}\", properties: v, headers: v }, [G]: h }], [G]: j }, { error: \"DualStack is enabled but this partition does not support DualStack\", [G]: k }], [G]: j }, w, { endpoint: { url: i, properties: v, headers: v }, [G]: h }], [G]: j }], [G]: j }, { error: \"Invalid Configuration: Missing Region\", [G]: k }] };\nexports.ruleSet = _data;\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar index_exports = {};\n__export(index_exports, {\n AssumeRoleCommand: () => AssumeRoleCommand,\n AssumeRoleResponseFilterSensitiveLog: () => AssumeRoleResponseFilterSensitiveLog,\n AssumeRoleWithSAMLCommand: () => AssumeRoleWithSAMLCommand,\n AssumeRoleWithSAMLRequestFilterSensitiveLog: () => AssumeRoleWithSAMLRequestFilterSensitiveLog,\n AssumeRoleWithSAMLResponseFilterSensitiveLog: () => AssumeRoleWithSAMLResponseFilterSensitiveLog,\n AssumeRoleWithWebIdentityCommand: () => AssumeRoleWithWebIdentityCommand,\n AssumeRoleWithWebIdentityRequestFilterSensitiveLog: () => AssumeRoleWithWebIdentityRequestFilterSensitiveLog,\n AssumeRoleWithWebIdentityResponseFilterSensitiveLog: () => AssumeRoleWithWebIdentityResponseFilterSensitiveLog,\n AssumeRootCommand: () => AssumeRootCommand,\n AssumeRootResponseFilterSensitiveLog: () => AssumeRootResponseFilterSensitiveLog,\n ClientInputEndpointParameters: () => import_EndpointParameters10.ClientInputEndpointParameters,\n CredentialsFilterSensitiveLog: () => CredentialsFilterSensitiveLog,\n DecodeAuthorizationMessageCommand: () => DecodeAuthorizationMessageCommand,\n ExpiredTokenException: () => ExpiredTokenException,\n GetAccessKeyInfoCommand: () => GetAccessKeyInfoCommand,\n GetCallerIdentityCommand: () => GetCallerIdentityCommand,\n GetFederationTokenCommand: () => GetFederationTokenCommand,\n GetFederationTokenResponseFilterSensitiveLog: () => GetFederationTokenResponseFilterSensitiveLog,\n GetSessionTokenCommand: () => GetSessionTokenCommand,\n GetSessionTokenResponseFilterSensitiveLog: () => GetSessionTokenResponseFilterSensitiveLog,\n IDPCommunicationErrorException: () => IDPCommunicationErrorException,\n IDPRejectedClaimException: () => IDPRejectedClaimException,\n InvalidAuthorizationMessageException: () => InvalidAuthorizationMessageException,\n InvalidIdentityTokenException: () => InvalidIdentityTokenException,\n MalformedPolicyDocumentException: () => MalformedPolicyDocumentException,\n PackedPolicyTooLargeException: () => PackedPolicyTooLargeException,\n RegionDisabledException: () => RegionDisabledException,\n STS: () => STS,\n STSServiceException: () => STSServiceException,\n decorateDefaultCredentialProvider: () => decorateDefaultCredentialProvider,\n getDefaultRoleAssumer: () => getDefaultRoleAssumer2,\n getDefaultRoleAssumerWithWebIdentity: () => getDefaultRoleAssumerWithWebIdentity2\n});\nmodule.exports = __toCommonJS(index_exports);\n__reExport(index_exports, require(\"././STSClient\"), module.exports);\n\n// src/STS.ts\n\n\n// src/commands/AssumeRoleCommand.ts\nvar import_middleware_endpoint = require(\"@smithy/middleware-endpoint\");\nvar import_middleware_serde = require(\"@smithy/middleware-serde\");\n\nvar import_EndpointParameters = require(\"./endpoint/EndpointParameters\");\n\n// src/models/models_0.ts\n\n\n// src/models/STSServiceException.ts\nvar import_smithy_client = require(\"@smithy/smithy-client\");\nvar STSServiceException = class _STSServiceException extends import_smithy_client.ServiceException {\n static {\n __name(this, \"STSServiceException\");\n }\n /**\n * @internal\n */\n constructor(options) {\n super(options);\n Object.setPrototypeOf(this, _STSServiceException.prototype);\n }\n};\n\n// src/models/models_0.ts\nvar ExpiredTokenException = class _ExpiredTokenException extends STSServiceException {\n static {\n __name(this, \"ExpiredTokenException\");\n }\n name = \"ExpiredTokenException\";\n $fault = \"client\";\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"ExpiredTokenException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _ExpiredTokenException.prototype);\n }\n};\nvar MalformedPolicyDocumentException = class _MalformedPolicyDocumentException extends STSServiceException {\n static {\n __name(this, \"MalformedPolicyDocumentException\");\n }\n name = \"MalformedPolicyDocumentException\";\n $fault = \"client\";\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"MalformedPolicyDocumentException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _MalformedPolicyDocumentException.prototype);\n }\n};\nvar PackedPolicyTooLargeException = class _PackedPolicyTooLargeException extends STSServiceException {\n static {\n __name(this, \"PackedPolicyTooLargeException\");\n }\n name = \"PackedPolicyTooLargeException\";\n $fault = \"client\";\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"PackedPolicyTooLargeException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _PackedPolicyTooLargeException.prototype);\n }\n};\nvar RegionDisabledException = class _RegionDisabledException extends STSServiceException {\n static {\n __name(this, \"RegionDisabledException\");\n }\n name = \"RegionDisabledException\";\n $fault = \"client\";\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"RegionDisabledException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _RegionDisabledException.prototype);\n }\n};\nvar IDPRejectedClaimException = class _IDPRejectedClaimException extends STSServiceException {\n static {\n __name(this, \"IDPRejectedClaimException\");\n }\n name = \"IDPRejectedClaimException\";\n $fault = \"client\";\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"IDPRejectedClaimException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _IDPRejectedClaimException.prototype);\n }\n};\nvar InvalidIdentityTokenException = class _InvalidIdentityTokenException extends STSServiceException {\n static {\n __name(this, \"InvalidIdentityTokenException\");\n }\n name = \"InvalidIdentityTokenException\";\n $fault = \"client\";\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"InvalidIdentityTokenException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _InvalidIdentityTokenException.prototype);\n }\n};\nvar IDPCommunicationErrorException = class _IDPCommunicationErrorException extends STSServiceException {\n static {\n __name(this, \"IDPCommunicationErrorException\");\n }\n name = \"IDPCommunicationErrorException\";\n $fault = \"client\";\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"IDPCommunicationErrorException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _IDPCommunicationErrorException.prototype);\n }\n};\nvar InvalidAuthorizationMessageException = class _InvalidAuthorizationMessageException extends STSServiceException {\n static {\n __name(this, \"InvalidAuthorizationMessageException\");\n }\n name = \"InvalidAuthorizationMessageException\";\n $fault = \"client\";\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"InvalidAuthorizationMessageException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _InvalidAuthorizationMessageException.prototype);\n }\n};\nvar CredentialsFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.SecretAccessKey && { SecretAccessKey: import_smithy_client.SENSITIVE_STRING }\n}), \"CredentialsFilterSensitiveLog\");\nvar AssumeRoleResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) }\n}), \"AssumeRoleResponseFilterSensitiveLog\");\nvar AssumeRoleWithSAMLRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.SAMLAssertion && { SAMLAssertion: import_smithy_client.SENSITIVE_STRING }\n}), \"AssumeRoleWithSAMLRequestFilterSensitiveLog\");\nvar AssumeRoleWithSAMLResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) }\n}), \"AssumeRoleWithSAMLResponseFilterSensitiveLog\");\nvar AssumeRoleWithWebIdentityRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.WebIdentityToken && { WebIdentityToken: import_smithy_client.SENSITIVE_STRING }\n}), \"AssumeRoleWithWebIdentityRequestFilterSensitiveLog\");\nvar AssumeRoleWithWebIdentityResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) }\n}), \"AssumeRoleWithWebIdentityResponseFilterSensitiveLog\");\nvar AssumeRootResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) }\n}), \"AssumeRootResponseFilterSensitiveLog\");\nvar GetFederationTokenResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) }\n}), \"GetFederationTokenResponseFilterSensitiveLog\");\nvar GetSessionTokenResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) }\n}), \"GetSessionTokenResponseFilterSensitiveLog\");\n\n// src/protocols/Aws_query.ts\nvar import_core = require(\"@aws-sdk/core\");\nvar import_protocol_http = require(\"@smithy/protocol-http\");\n\nvar se_AssumeRoleCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_AssumeRoleRequest(input, context),\n [_A]: _AR,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_AssumeRoleCommand\");\nvar se_AssumeRoleWithSAMLCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_AssumeRoleWithSAMLRequest(input, context),\n [_A]: _ARWSAML,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_AssumeRoleWithSAMLCommand\");\nvar se_AssumeRoleWithWebIdentityCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_AssumeRoleWithWebIdentityRequest(input, context),\n [_A]: _ARWWI,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_AssumeRoleWithWebIdentityCommand\");\nvar se_AssumeRootCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_AssumeRootRequest(input, context),\n [_A]: _ARs,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_AssumeRootCommand\");\nvar se_DecodeAuthorizationMessageCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_DecodeAuthorizationMessageRequest(input, context),\n [_A]: _DAM,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_DecodeAuthorizationMessageCommand\");\nvar se_GetAccessKeyInfoCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_GetAccessKeyInfoRequest(input, context),\n [_A]: _GAKI,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_GetAccessKeyInfoCommand\");\nvar se_GetCallerIdentityCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_GetCallerIdentityRequest(input, context),\n [_A]: _GCI,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_GetCallerIdentityCommand\");\nvar se_GetFederationTokenCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_GetFederationTokenRequest(input, context),\n [_A]: _GFT,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_GetFederationTokenCommand\");\nvar se_GetSessionTokenCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_GetSessionTokenRequest(input, context),\n [_A]: _GST,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_GetSessionTokenCommand\");\nvar de_AssumeRoleCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_AssumeRoleResponse(data.AssumeRoleResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_AssumeRoleCommand\");\nvar de_AssumeRoleWithSAMLCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_AssumeRoleWithSAMLResponse(data.AssumeRoleWithSAMLResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_AssumeRoleWithSAMLCommand\");\nvar de_AssumeRoleWithWebIdentityCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_AssumeRoleWithWebIdentityResponse(data.AssumeRoleWithWebIdentityResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_AssumeRoleWithWebIdentityCommand\");\nvar de_AssumeRootCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_AssumeRootResponse(data.AssumeRootResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_AssumeRootCommand\");\nvar de_DecodeAuthorizationMessageCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_DecodeAuthorizationMessageResponse(data.DecodeAuthorizationMessageResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_DecodeAuthorizationMessageCommand\");\nvar de_GetAccessKeyInfoCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_GetAccessKeyInfoResponse(data.GetAccessKeyInfoResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_GetAccessKeyInfoCommand\");\nvar de_GetCallerIdentityCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_GetCallerIdentityResponse(data.GetCallerIdentityResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_GetCallerIdentityCommand\");\nvar de_GetFederationTokenCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_GetFederationTokenResponse(data.GetFederationTokenResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_GetFederationTokenCommand\");\nvar de_GetSessionTokenCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_GetSessionTokenResponse(data.GetSessionTokenResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_GetSessionTokenCommand\");\nvar de_CommandError = /* @__PURE__ */ __name(async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await (0, import_core.parseXmlErrorBody)(output.body, context)\n };\n const errorCode = loadQueryErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"ExpiredTokenException\":\n case \"com.amazonaws.sts#ExpiredTokenException\":\n throw await de_ExpiredTokenExceptionRes(parsedOutput, context);\n case \"MalformedPolicyDocument\":\n case \"com.amazonaws.sts#MalformedPolicyDocumentException\":\n throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput, context);\n case \"PackedPolicyTooLarge\":\n case \"com.amazonaws.sts#PackedPolicyTooLargeException\":\n throw await de_PackedPolicyTooLargeExceptionRes(parsedOutput, context);\n case \"RegionDisabledException\":\n case \"com.amazonaws.sts#RegionDisabledException\":\n throw await de_RegionDisabledExceptionRes(parsedOutput, context);\n case \"IDPRejectedClaim\":\n case \"com.amazonaws.sts#IDPRejectedClaimException\":\n throw await de_IDPRejectedClaimExceptionRes(parsedOutput, context);\n case \"InvalidIdentityToken\":\n case \"com.amazonaws.sts#InvalidIdentityTokenException\":\n throw await de_InvalidIdentityTokenExceptionRes(parsedOutput, context);\n case \"IDPCommunicationError\":\n case \"com.amazonaws.sts#IDPCommunicationErrorException\":\n throw await de_IDPCommunicationErrorExceptionRes(parsedOutput, context);\n case \"InvalidAuthorizationMessageException\":\n case \"com.amazonaws.sts#InvalidAuthorizationMessageException\":\n throw await de_InvalidAuthorizationMessageExceptionRes(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n return throwDefaultError({\n output,\n parsedBody: parsedBody.Error,\n errorCode\n });\n }\n}, \"de_CommandError\");\nvar de_ExpiredTokenExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_ExpiredTokenException(body.Error, context);\n const exception = new ExpiredTokenException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_ExpiredTokenExceptionRes\");\nvar de_IDPCommunicationErrorExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_IDPCommunicationErrorException(body.Error, context);\n const exception = new IDPCommunicationErrorException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_IDPCommunicationErrorExceptionRes\");\nvar de_IDPRejectedClaimExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_IDPRejectedClaimException(body.Error, context);\n const exception = new IDPRejectedClaimException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_IDPRejectedClaimExceptionRes\");\nvar de_InvalidAuthorizationMessageExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_InvalidAuthorizationMessageException(body.Error, context);\n const exception = new InvalidAuthorizationMessageException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_InvalidAuthorizationMessageExceptionRes\");\nvar de_InvalidIdentityTokenExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_InvalidIdentityTokenException(body.Error, context);\n const exception = new InvalidIdentityTokenException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_InvalidIdentityTokenExceptionRes\");\nvar de_MalformedPolicyDocumentExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_MalformedPolicyDocumentException(body.Error, context);\n const exception = new MalformedPolicyDocumentException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_MalformedPolicyDocumentExceptionRes\");\nvar de_PackedPolicyTooLargeExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_PackedPolicyTooLargeException(body.Error, context);\n const exception = new PackedPolicyTooLargeException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_PackedPolicyTooLargeExceptionRes\");\nvar de_RegionDisabledExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_RegionDisabledException(body.Error, context);\n const exception = new RegionDisabledException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client.decorateServiceException)(exception, body);\n}, \"de_RegionDisabledExceptionRes\");\nvar se_AssumeRoleRequest = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_RA] != null) {\n entries[_RA] = input[_RA];\n }\n if (input[_RSN] != null) {\n entries[_RSN] = input[_RSN];\n }\n if (input[_PA] != null) {\n const memberEntries = se_policyDescriptorListType(input[_PA], context);\n if (input[_PA]?.length === 0) {\n entries.PolicyArns = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `PolicyArns.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_P] != null) {\n entries[_P] = input[_P];\n }\n if (input[_DS] != null) {\n entries[_DS] = input[_DS];\n }\n if (input[_T] != null) {\n const memberEntries = se_tagListType(input[_T], context);\n if (input[_T]?.length === 0) {\n entries.Tags = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Tags.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_TTK] != null) {\n const memberEntries = se_tagKeyListType(input[_TTK], context);\n if (input[_TTK]?.length === 0) {\n entries.TransitiveTagKeys = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `TransitiveTagKeys.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_EI] != null) {\n entries[_EI] = input[_EI];\n }\n if (input[_SN] != null) {\n entries[_SN] = input[_SN];\n }\n if (input[_TC] != null) {\n entries[_TC] = input[_TC];\n }\n if (input[_SI] != null) {\n entries[_SI] = input[_SI];\n }\n if (input[_PC] != null) {\n const memberEntries = se_ProvidedContextsListType(input[_PC], context);\n if (input[_PC]?.length === 0) {\n entries.ProvidedContexts = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `ProvidedContexts.${key}`;\n entries[loc] = value;\n });\n }\n return entries;\n}, \"se_AssumeRoleRequest\");\nvar se_AssumeRoleWithSAMLRequest = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_RA] != null) {\n entries[_RA] = input[_RA];\n }\n if (input[_PAr] != null) {\n entries[_PAr] = input[_PAr];\n }\n if (input[_SAMLA] != null) {\n entries[_SAMLA] = input[_SAMLA];\n }\n if (input[_PA] != null) {\n const memberEntries = se_policyDescriptorListType(input[_PA], context);\n if (input[_PA]?.length === 0) {\n entries.PolicyArns = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `PolicyArns.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_P] != null) {\n entries[_P] = input[_P];\n }\n if (input[_DS] != null) {\n entries[_DS] = input[_DS];\n }\n return entries;\n}, \"se_AssumeRoleWithSAMLRequest\");\nvar se_AssumeRoleWithWebIdentityRequest = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_RA] != null) {\n entries[_RA] = input[_RA];\n }\n if (input[_RSN] != null) {\n entries[_RSN] = input[_RSN];\n }\n if (input[_WIT] != null) {\n entries[_WIT] = input[_WIT];\n }\n if (input[_PI] != null) {\n entries[_PI] = input[_PI];\n }\n if (input[_PA] != null) {\n const memberEntries = se_policyDescriptorListType(input[_PA], context);\n if (input[_PA]?.length === 0) {\n entries.PolicyArns = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `PolicyArns.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_P] != null) {\n entries[_P] = input[_P];\n }\n if (input[_DS] != null) {\n entries[_DS] = input[_DS];\n }\n return entries;\n}, \"se_AssumeRoleWithWebIdentityRequest\");\nvar se_AssumeRootRequest = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_TP] != null) {\n entries[_TP] = input[_TP];\n }\n if (input[_TPA] != null) {\n const memberEntries = se_PolicyDescriptorType(input[_TPA], context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `TaskPolicyArn.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_DS] != null) {\n entries[_DS] = input[_DS];\n }\n return entries;\n}, \"se_AssumeRootRequest\");\nvar se_DecodeAuthorizationMessageRequest = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_EM] != null) {\n entries[_EM] = input[_EM];\n }\n return entries;\n}, \"se_DecodeAuthorizationMessageRequest\");\nvar se_GetAccessKeyInfoRequest = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_AKI] != null) {\n entries[_AKI] = input[_AKI];\n }\n return entries;\n}, \"se_GetAccessKeyInfoRequest\");\nvar se_GetCallerIdentityRequest = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n return entries;\n}, \"se_GetCallerIdentityRequest\");\nvar se_GetFederationTokenRequest = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_N] != null) {\n entries[_N] = input[_N];\n }\n if (input[_P] != null) {\n entries[_P] = input[_P];\n }\n if (input[_PA] != null) {\n const memberEntries = se_policyDescriptorListType(input[_PA], context);\n if (input[_PA]?.length === 0) {\n entries.PolicyArns = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `PolicyArns.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_DS] != null) {\n entries[_DS] = input[_DS];\n }\n if (input[_T] != null) {\n const memberEntries = se_tagListType(input[_T], context);\n if (input[_T]?.length === 0) {\n entries.Tags = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Tags.${key}`;\n entries[loc] = value;\n });\n }\n return entries;\n}, \"se_GetFederationTokenRequest\");\nvar se_GetSessionTokenRequest = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_DS] != null) {\n entries[_DS] = input[_DS];\n }\n if (input[_SN] != null) {\n entries[_SN] = input[_SN];\n }\n if (input[_TC] != null) {\n entries[_TC] = input[_TC];\n }\n return entries;\n}, \"se_GetSessionTokenRequest\");\nvar se_policyDescriptorListType = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n const memberEntries = se_PolicyDescriptorType(entry, context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n entries[`member.${counter}.${key}`] = value;\n });\n counter++;\n }\n return entries;\n}, \"se_policyDescriptorListType\");\nvar se_PolicyDescriptorType = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_a] != null) {\n entries[_a] = input[_a];\n }\n return entries;\n}, \"se_PolicyDescriptorType\");\nvar se_ProvidedContext = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_PAro] != null) {\n entries[_PAro] = input[_PAro];\n }\n if (input[_CA] != null) {\n entries[_CA] = input[_CA];\n }\n return entries;\n}, \"se_ProvidedContext\");\nvar se_ProvidedContextsListType = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n const memberEntries = se_ProvidedContext(entry, context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n entries[`member.${counter}.${key}`] = value;\n });\n counter++;\n }\n return entries;\n}, \"se_ProvidedContextsListType\");\nvar se_Tag = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_K] != null) {\n entries[_K] = input[_K];\n }\n if (input[_Va] != null) {\n entries[_Va] = input[_Va];\n }\n return entries;\n}, \"se_Tag\");\nvar se_tagKeyListType = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n entries[`member.${counter}`] = entry;\n counter++;\n }\n return entries;\n}, \"se_tagKeyListType\");\nvar se_tagListType = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n const memberEntries = se_Tag(entry, context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n entries[`member.${counter}.${key}`] = value;\n });\n counter++;\n }\n return entries;\n}, \"se_tagListType\");\nvar de_AssumedRoleUser = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_ARI] != null) {\n contents[_ARI] = (0, import_smithy_client.expectString)(output[_ARI]);\n }\n if (output[_Ar] != null) {\n contents[_Ar] = (0, import_smithy_client.expectString)(output[_Ar]);\n }\n return contents;\n}, \"de_AssumedRoleUser\");\nvar de_AssumeRoleResponse = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_C] != null) {\n contents[_C] = de_Credentials(output[_C], context);\n }\n if (output[_ARU] != null) {\n contents[_ARU] = de_AssumedRoleUser(output[_ARU], context);\n }\n if (output[_PPS] != null) {\n contents[_PPS] = (0, import_smithy_client.strictParseInt32)(output[_PPS]);\n }\n if (output[_SI] != null) {\n contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);\n }\n return contents;\n}, \"de_AssumeRoleResponse\");\nvar de_AssumeRoleWithSAMLResponse = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_C] != null) {\n contents[_C] = de_Credentials(output[_C], context);\n }\n if (output[_ARU] != null) {\n contents[_ARU] = de_AssumedRoleUser(output[_ARU], context);\n }\n if (output[_PPS] != null) {\n contents[_PPS] = (0, import_smithy_client.strictParseInt32)(output[_PPS]);\n }\n if (output[_S] != null) {\n contents[_S] = (0, import_smithy_client.expectString)(output[_S]);\n }\n if (output[_ST] != null) {\n contents[_ST] = (0, import_smithy_client.expectString)(output[_ST]);\n }\n if (output[_I] != null) {\n contents[_I] = (0, import_smithy_client.expectString)(output[_I]);\n }\n if (output[_Au] != null) {\n contents[_Au] = (0, import_smithy_client.expectString)(output[_Au]);\n }\n if (output[_NQ] != null) {\n contents[_NQ] = (0, import_smithy_client.expectString)(output[_NQ]);\n }\n if (output[_SI] != null) {\n contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);\n }\n return contents;\n}, \"de_AssumeRoleWithSAMLResponse\");\nvar de_AssumeRoleWithWebIdentityResponse = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_C] != null) {\n contents[_C] = de_Credentials(output[_C], context);\n }\n if (output[_SFWIT] != null) {\n contents[_SFWIT] = (0, import_smithy_client.expectString)(output[_SFWIT]);\n }\n if (output[_ARU] != null) {\n contents[_ARU] = de_AssumedRoleUser(output[_ARU], context);\n }\n if (output[_PPS] != null) {\n contents[_PPS] = (0, import_smithy_client.strictParseInt32)(output[_PPS]);\n }\n if (output[_Pr] != null) {\n contents[_Pr] = (0, import_smithy_client.expectString)(output[_Pr]);\n }\n if (output[_Au] != null) {\n contents[_Au] = (0, import_smithy_client.expectString)(output[_Au]);\n }\n if (output[_SI] != null) {\n contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);\n }\n return contents;\n}, \"de_AssumeRoleWithWebIdentityResponse\");\nvar de_AssumeRootResponse = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_C] != null) {\n contents[_C] = de_Credentials(output[_C], context);\n }\n if (output[_SI] != null) {\n contents[_SI] = (0, import_smithy_client.expectString)(output[_SI]);\n }\n return contents;\n}, \"de_AssumeRootResponse\");\nvar de_Credentials = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_AKI] != null) {\n contents[_AKI] = (0, import_smithy_client.expectString)(output[_AKI]);\n }\n if (output[_SAK] != null) {\n contents[_SAK] = (0, import_smithy_client.expectString)(output[_SAK]);\n }\n if (output[_STe] != null) {\n contents[_STe] = (0, import_smithy_client.expectString)(output[_STe]);\n }\n if (output[_E] != null) {\n contents[_E] = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.parseRfc3339DateTimeWithOffset)(output[_E]));\n }\n return contents;\n}, \"de_Credentials\");\nvar de_DecodeAuthorizationMessageResponse = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_DM] != null) {\n contents[_DM] = (0, import_smithy_client.expectString)(output[_DM]);\n }\n return contents;\n}, \"de_DecodeAuthorizationMessageResponse\");\nvar de_ExpiredTokenException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_m] != null) {\n contents[_m] = (0, import_smithy_client.expectString)(output[_m]);\n }\n return contents;\n}, \"de_ExpiredTokenException\");\nvar de_FederatedUser = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_FUI] != null) {\n contents[_FUI] = (0, import_smithy_client.expectString)(output[_FUI]);\n }\n if (output[_Ar] != null) {\n contents[_Ar] = (0, import_smithy_client.expectString)(output[_Ar]);\n }\n return contents;\n}, \"de_FederatedUser\");\nvar de_GetAccessKeyInfoResponse = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_Ac] != null) {\n contents[_Ac] = (0, import_smithy_client.expectString)(output[_Ac]);\n }\n return contents;\n}, \"de_GetAccessKeyInfoResponse\");\nvar de_GetCallerIdentityResponse = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_UI] != null) {\n contents[_UI] = (0, import_smithy_client.expectString)(output[_UI]);\n }\n if (output[_Ac] != null) {\n contents[_Ac] = (0, import_smithy_client.expectString)(output[_Ac]);\n }\n if (output[_Ar] != null) {\n contents[_Ar] = (0, import_smithy_client.expectString)(output[_Ar]);\n }\n return contents;\n}, \"de_GetCallerIdentityResponse\");\nvar de_GetFederationTokenResponse = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_C] != null) {\n contents[_C] = de_Credentials(output[_C], context);\n }\n if (output[_FU] != null) {\n contents[_FU] = de_FederatedUser(output[_FU], context);\n }\n if (output[_PPS] != null) {\n contents[_PPS] = (0, import_smithy_client.strictParseInt32)(output[_PPS]);\n }\n return contents;\n}, \"de_GetFederationTokenResponse\");\nvar de_GetSessionTokenResponse = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_C] != null) {\n contents[_C] = de_Credentials(output[_C], context);\n }\n return contents;\n}, \"de_GetSessionTokenResponse\");\nvar de_IDPCommunicationErrorException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_m] != null) {\n contents[_m] = (0, import_smithy_client.expectString)(output[_m]);\n }\n return contents;\n}, \"de_IDPCommunicationErrorException\");\nvar de_IDPRejectedClaimException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_m] != null) {\n contents[_m] = (0, import_smithy_client.expectString)(output[_m]);\n }\n return contents;\n}, \"de_IDPRejectedClaimException\");\nvar de_InvalidAuthorizationMessageException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_m] != null) {\n contents[_m] = (0, import_smithy_client.expectString)(output[_m]);\n }\n return contents;\n}, \"de_InvalidAuthorizationMessageException\");\nvar de_InvalidIdentityTokenException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_m] != null) {\n contents[_m] = (0, import_smithy_client.expectString)(output[_m]);\n }\n return contents;\n}, \"de_InvalidIdentityTokenException\");\nvar de_MalformedPolicyDocumentException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_m] != null) {\n contents[_m] = (0, import_smithy_client.expectString)(output[_m]);\n }\n return contents;\n}, \"de_MalformedPolicyDocumentException\");\nvar de_PackedPolicyTooLargeException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_m] != null) {\n contents[_m] = (0, import_smithy_client.expectString)(output[_m]);\n }\n return contents;\n}, \"de_PackedPolicyTooLargeException\");\nvar de_RegionDisabledException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_m] != null) {\n contents[_m] = (0, import_smithy_client.expectString)(output[_m]);\n }\n return contents;\n}, \"de_RegionDisabledException\");\nvar deserializeMetadata = /* @__PURE__ */ __name((output) => ({\n httpStatusCode: output.statusCode,\n requestId: output.headers[\"x-amzn-requestid\"] ?? output.headers[\"x-amzn-request-id\"] ?? output.headers[\"x-amz-request-id\"],\n extendedRequestId: output.headers[\"x-amz-id-2\"],\n cfId: output.headers[\"x-amz-cf-id\"]\n}), \"deserializeMetadata\");\nvar throwDefaultError = (0, import_smithy_client.withBaseException)(STSServiceException);\nvar buildHttpRpcRequest = /* @__PURE__ */ __name(async (context, headers, path, resolvedHostname, body) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const contents = {\n protocol,\n hostname,\n port,\n method: \"POST\",\n path: basePath.endsWith(\"/\") ? basePath.slice(0, -1) + path : basePath + path,\n headers\n };\n if (resolvedHostname !== void 0) {\n contents.hostname = resolvedHostname;\n }\n if (body !== void 0) {\n contents.body = body;\n }\n return new import_protocol_http.HttpRequest(contents);\n}, \"buildHttpRpcRequest\");\nvar SHARED_HEADERS = {\n \"content-type\": \"application/x-www-form-urlencoded\"\n};\nvar _ = \"2011-06-15\";\nvar _A = \"Action\";\nvar _AKI = \"AccessKeyId\";\nvar _AR = \"AssumeRole\";\nvar _ARI = \"AssumedRoleId\";\nvar _ARU = \"AssumedRoleUser\";\nvar _ARWSAML = \"AssumeRoleWithSAML\";\nvar _ARWWI = \"AssumeRoleWithWebIdentity\";\nvar _ARs = \"AssumeRoot\";\nvar _Ac = \"Account\";\nvar _Ar = \"Arn\";\nvar _Au = \"Audience\";\nvar _C = \"Credentials\";\nvar _CA = \"ContextAssertion\";\nvar _DAM = \"DecodeAuthorizationMessage\";\nvar _DM = \"DecodedMessage\";\nvar _DS = \"DurationSeconds\";\nvar _E = \"Expiration\";\nvar _EI = \"ExternalId\";\nvar _EM = \"EncodedMessage\";\nvar _FU = \"FederatedUser\";\nvar _FUI = \"FederatedUserId\";\nvar _GAKI = \"GetAccessKeyInfo\";\nvar _GCI = \"GetCallerIdentity\";\nvar _GFT = \"GetFederationToken\";\nvar _GST = \"GetSessionToken\";\nvar _I = \"Issuer\";\nvar _K = \"Key\";\nvar _N = \"Name\";\nvar _NQ = \"NameQualifier\";\nvar _P = \"Policy\";\nvar _PA = \"PolicyArns\";\nvar _PAr = \"PrincipalArn\";\nvar _PAro = \"ProviderArn\";\nvar _PC = \"ProvidedContexts\";\nvar _PI = \"ProviderId\";\nvar _PPS = \"PackedPolicySize\";\nvar _Pr = \"Provider\";\nvar _RA = \"RoleArn\";\nvar _RSN = \"RoleSessionName\";\nvar _S = \"Subject\";\nvar _SAK = \"SecretAccessKey\";\nvar _SAMLA = \"SAMLAssertion\";\nvar _SFWIT = \"SubjectFromWebIdentityToken\";\nvar _SI = \"SourceIdentity\";\nvar _SN = \"SerialNumber\";\nvar _ST = \"SubjectType\";\nvar _STe = \"SessionToken\";\nvar _T = \"Tags\";\nvar _TC = \"TokenCode\";\nvar _TP = \"TargetPrincipal\";\nvar _TPA = \"TaskPolicyArn\";\nvar _TTK = \"TransitiveTagKeys\";\nvar _UI = \"UserId\";\nvar _V = \"Version\";\nvar _Va = \"Value\";\nvar _WIT = \"WebIdentityToken\";\nvar _a = \"arn\";\nvar _m = \"message\";\nvar buildFormUrlencodedString = /* @__PURE__ */ __name((formEntries) => Object.entries(formEntries).map(([key, value]) => (0, import_smithy_client.extendedEncodeURIComponent)(key) + \"=\" + (0, import_smithy_client.extendedEncodeURIComponent)(value)).join(\"&\"), \"buildFormUrlencodedString\");\nvar loadQueryErrorCode = /* @__PURE__ */ __name((output, data) => {\n if (data.Error?.Code !== void 0) {\n return data.Error.Code;\n }\n if (output.statusCode == 404) {\n return \"NotFound\";\n }\n}, \"loadQueryErrorCode\");\n\n// src/commands/AssumeRoleCommand.ts\nvar AssumeRoleCommand = class extends import_smithy_client.Command.classBuilder().ep(import_EndpointParameters.commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSSecurityTokenServiceV20110615\", \"AssumeRole\", {}).n(\"STSClient\", \"AssumeRoleCommand\").f(void 0, AssumeRoleResponseFilterSensitiveLog).ser(se_AssumeRoleCommand).de(de_AssumeRoleCommand).build() {\n static {\n __name(this, \"AssumeRoleCommand\");\n }\n};\n\n// src/commands/AssumeRoleWithSAMLCommand.ts\n\n\n\nvar import_EndpointParameters2 = require(\"./endpoint/EndpointParameters\");\nvar AssumeRoleWithSAMLCommand = class extends import_smithy_client.Command.classBuilder().ep(import_EndpointParameters2.commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSSecurityTokenServiceV20110615\", \"AssumeRoleWithSAML\", {}).n(\"STSClient\", \"AssumeRoleWithSAMLCommand\").f(AssumeRoleWithSAMLRequestFilterSensitiveLog, AssumeRoleWithSAMLResponseFilterSensitiveLog).ser(se_AssumeRoleWithSAMLCommand).de(de_AssumeRoleWithSAMLCommand).build() {\n static {\n __name(this, \"AssumeRoleWithSAMLCommand\");\n }\n};\n\n// src/commands/AssumeRoleWithWebIdentityCommand.ts\n\n\n\nvar import_EndpointParameters3 = require(\"./endpoint/EndpointParameters\");\nvar AssumeRoleWithWebIdentityCommand = class extends import_smithy_client.Command.classBuilder().ep(import_EndpointParameters3.commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSSecurityTokenServiceV20110615\", \"AssumeRoleWithWebIdentity\", {}).n(\"STSClient\", \"AssumeRoleWithWebIdentityCommand\").f(AssumeRoleWithWebIdentityRequestFilterSensitiveLog, AssumeRoleWithWebIdentityResponseFilterSensitiveLog).ser(se_AssumeRoleWithWebIdentityCommand).de(de_AssumeRoleWithWebIdentityCommand).build() {\n static {\n __name(this, \"AssumeRoleWithWebIdentityCommand\");\n }\n};\n\n// src/commands/AssumeRootCommand.ts\n\n\n\nvar import_EndpointParameters4 = require(\"./endpoint/EndpointParameters\");\nvar AssumeRootCommand = class extends import_smithy_client.Command.classBuilder().ep(import_EndpointParameters4.commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSSecurityTokenServiceV20110615\", \"AssumeRoot\", {}).n(\"STSClient\", \"AssumeRootCommand\").f(void 0, AssumeRootResponseFilterSensitiveLog).ser(se_AssumeRootCommand).de(de_AssumeRootCommand).build() {\n static {\n __name(this, \"AssumeRootCommand\");\n }\n};\n\n// src/commands/DecodeAuthorizationMessageCommand.ts\n\n\n\nvar import_EndpointParameters5 = require(\"./endpoint/EndpointParameters\");\nvar DecodeAuthorizationMessageCommand = class extends import_smithy_client.Command.classBuilder().ep(import_EndpointParameters5.commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSSecurityTokenServiceV20110615\", \"DecodeAuthorizationMessage\", {}).n(\"STSClient\", \"DecodeAuthorizationMessageCommand\").f(void 0, void 0).ser(se_DecodeAuthorizationMessageCommand).de(de_DecodeAuthorizationMessageCommand).build() {\n static {\n __name(this, \"DecodeAuthorizationMessageCommand\");\n }\n};\n\n// src/commands/GetAccessKeyInfoCommand.ts\n\n\n\nvar import_EndpointParameters6 = require(\"./endpoint/EndpointParameters\");\nvar GetAccessKeyInfoCommand = class extends import_smithy_client.Command.classBuilder().ep(import_EndpointParameters6.commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSSecurityTokenServiceV20110615\", \"GetAccessKeyInfo\", {}).n(\"STSClient\", \"GetAccessKeyInfoCommand\").f(void 0, void 0).ser(se_GetAccessKeyInfoCommand).de(de_GetAccessKeyInfoCommand).build() {\n static {\n __name(this, \"GetAccessKeyInfoCommand\");\n }\n};\n\n// src/commands/GetCallerIdentityCommand.ts\n\n\n\nvar import_EndpointParameters7 = require(\"./endpoint/EndpointParameters\");\nvar GetCallerIdentityCommand = class extends import_smithy_client.Command.classBuilder().ep(import_EndpointParameters7.commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSSecurityTokenServiceV20110615\", \"GetCallerIdentity\", {}).n(\"STSClient\", \"GetCallerIdentityCommand\").f(void 0, void 0).ser(se_GetCallerIdentityCommand).de(de_GetCallerIdentityCommand).build() {\n static {\n __name(this, \"GetCallerIdentityCommand\");\n }\n};\n\n// src/commands/GetFederationTokenCommand.ts\n\n\n\nvar import_EndpointParameters8 = require(\"./endpoint/EndpointParameters\");\nvar GetFederationTokenCommand = class extends import_smithy_client.Command.classBuilder().ep(import_EndpointParameters8.commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSSecurityTokenServiceV20110615\", \"GetFederationToken\", {}).n(\"STSClient\", \"GetFederationTokenCommand\").f(void 0, GetFederationTokenResponseFilterSensitiveLog).ser(se_GetFederationTokenCommand).de(de_GetFederationTokenCommand).build() {\n static {\n __name(this, \"GetFederationTokenCommand\");\n }\n};\n\n// src/commands/GetSessionTokenCommand.ts\n\n\n\nvar import_EndpointParameters9 = require(\"./endpoint/EndpointParameters\");\nvar GetSessionTokenCommand = class extends import_smithy_client.Command.classBuilder().ep(import_EndpointParameters9.commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSSecurityTokenServiceV20110615\", \"GetSessionToken\", {}).n(\"STSClient\", \"GetSessionTokenCommand\").f(void 0, GetSessionTokenResponseFilterSensitiveLog).ser(se_GetSessionTokenCommand).de(de_GetSessionTokenCommand).build() {\n static {\n __name(this, \"GetSessionTokenCommand\");\n }\n};\n\n// src/STS.ts\nvar import_STSClient = require(\"././STSClient\");\nvar commands = {\n AssumeRoleCommand,\n AssumeRoleWithSAMLCommand,\n AssumeRoleWithWebIdentityCommand,\n AssumeRootCommand,\n DecodeAuthorizationMessageCommand,\n GetAccessKeyInfoCommand,\n GetCallerIdentityCommand,\n GetFederationTokenCommand,\n GetSessionTokenCommand\n};\nvar STS = class extends import_STSClient.STSClient {\n static {\n __name(this, \"STS\");\n }\n};\n(0, import_smithy_client.createAggregatedClient)(commands, STS);\n\n// src/index.ts\nvar import_EndpointParameters10 = require(\"./endpoint/EndpointParameters\");\n\n// src/defaultStsRoleAssumers.ts\nvar import_client = require(\"@aws-sdk/core/client\");\nvar ASSUME_ROLE_DEFAULT_REGION = \"us-east-1\";\nvar getAccountIdFromAssumedRoleUser = /* @__PURE__ */ __name((assumedRoleUser) => {\n if (typeof assumedRoleUser?.Arn === \"string\") {\n const arnComponents = assumedRoleUser.Arn.split(\":\");\n if (arnComponents.length > 4 && arnComponents[4] !== \"\") {\n return arnComponents[4];\n }\n }\n return void 0;\n}, \"getAccountIdFromAssumedRoleUser\");\nvar resolveRegion = /* @__PURE__ */ __name(async (_region, _parentRegion, credentialProviderLogger) => {\n const region = typeof _region === \"function\" ? await _region() : _region;\n const parentRegion = typeof _parentRegion === \"function\" ? await _parentRegion() : _parentRegion;\n credentialProviderLogger?.debug?.(\n \"@aws-sdk/client-sts::resolveRegion\",\n \"accepting first of:\",\n `${region} (provider)`,\n `${parentRegion} (parent client)`,\n `${ASSUME_ROLE_DEFAULT_REGION} (STS default)`\n );\n return region ?? parentRegion ?? ASSUME_ROLE_DEFAULT_REGION;\n}, \"resolveRegion\");\nvar getDefaultRoleAssumer = /* @__PURE__ */ __name((stsOptions, STSClient3) => {\n let stsClient;\n let closureSourceCreds;\n return async (sourceCreds, params) => {\n closureSourceCreds = sourceCreds;\n if (!stsClient) {\n const {\n logger = stsOptions?.parentClientConfig?.logger,\n region,\n requestHandler = stsOptions?.parentClientConfig?.requestHandler,\n credentialProviderLogger\n } = stsOptions;\n const resolvedRegion = await resolveRegion(\n region,\n stsOptions?.parentClientConfig?.region,\n credentialProviderLogger\n );\n const isCompatibleRequestHandler = !isH2(requestHandler);\n stsClient = new STSClient3({\n profile: stsOptions?.parentClientConfig?.profile,\n // A hack to make sts client uses the credential in current closure.\n credentialDefaultProvider: /* @__PURE__ */ __name(() => async () => closureSourceCreds, \"credentialDefaultProvider\"),\n region: resolvedRegion,\n requestHandler: isCompatibleRequestHandler ? requestHandler : void 0,\n logger\n });\n }\n const { Credentials: Credentials2, AssumedRoleUser: AssumedRoleUser2 } = await stsClient.send(new AssumeRoleCommand(params));\n if (!Credentials2 || !Credentials2.AccessKeyId || !Credentials2.SecretAccessKey) {\n throw new Error(`Invalid response from STS.assumeRole call with role ${params.RoleArn}`);\n }\n const accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser2);\n const credentials = {\n accessKeyId: Credentials2.AccessKeyId,\n secretAccessKey: Credentials2.SecretAccessKey,\n sessionToken: Credentials2.SessionToken,\n expiration: Credentials2.Expiration,\n // TODO(credentialScope): access normally when shape is updated.\n ...Credentials2.CredentialScope && { credentialScope: Credentials2.CredentialScope },\n ...accountId && { accountId }\n };\n (0, import_client.setCredentialFeature)(credentials, \"CREDENTIALS_STS_ASSUME_ROLE\", \"i\");\n return credentials;\n };\n}, \"getDefaultRoleAssumer\");\nvar getDefaultRoleAssumerWithWebIdentity = /* @__PURE__ */ __name((stsOptions, STSClient3) => {\n let stsClient;\n return async (params) => {\n if (!stsClient) {\n const {\n logger = stsOptions?.parentClientConfig?.logger,\n region,\n requestHandler = stsOptions?.parentClientConfig?.requestHandler,\n credentialProviderLogger\n } = stsOptions;\n const resolvedRegion = await resolveRegion(\n region,\n stsOptions?.parentClientConfig?.region,\n credentialProviderLogger\n );\n const isCompatibleRequestHandler = !isH2(requestHandler);\n stsClient = new STSClient3({\n profile: stsOptions?.parentClientConfig?.profile,\n region: resolvedRegion,\n requestHandler: isCompatibleRequestHandler ? requestHandler : void 0,\n logger\n });\n }\n const { Credentials: Credentials2, AssumedRoleUser: AssumedRoleUser2 } = await stsClient.send(new AssumeRoleWithWebIdentityCommand(params));\n if (!Credentials2 || !Credentials2.AccessKeyId || !Credentials2.SecretAccessKey) {\n throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${params.RoleArn}`);\n }\n const accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser2);\n const credentials = {\n accessKeyId: Credentials2.AccessKeyId,\n secretAccessKey: Credentials2.SecretAccessKey,\n sessionToken: Credentials2.SessionToken,\n expiration: Credentials2.Expiration,\n // TODO(credentialScope): access normally when shape is updated.\n ...Credentials2.CredentialScope && { credentialScope: Credentials2.CredentialScope },\n ...accountId && { accountId }\n };\n if (accountId) {\n (0, import_client.setCredentialFeature)(credentials, \"RESOLVED_ACCOUNT_ID\", \"T\");\n }\n (0, import_client.setCredentialFeature)(credentials, \"CREDENTIALS_STS_ASSUME_ROLE_WEB_ID\", \"k\");\n return credentials;\n };\n}, \"getDefaultRoleAssumerWithWebIdentity\");\nvar isH2 = /* @__PURE__ */ __name((requestHandler) => {\n return requestHandler?.metadata?.handlerProtocol === \"h2\";\n}, \"isH2\");\n\n// src/defaultRoleAssumers.ts\nvar import_STSClient2 = require(\"././STSClient\");\nvar getCustomizableStsClientCtor = /* @__PURE__ */ __name((baseCtor, customizations) => {\n if (!customizations) return baseCtor;\n else\n return class CustomizableSTSClient extends baseCtor {\n static {\n __name(this, \"CustomizableSTSClient\");\n }\n constructor(config) {\n super(config);\n for (const customization of customizations) {\n this.middlewareStack.use(customization);\n }\n }\n };\n}, \"getCustomizableStsClientCtor\");\nvar getDefaultRoleAssumer2 = /* @__PURE__ */ __name((stsOptions = {}, stsPlugins) => getDefaultRoleAssumer(stsOptions, getCustomizableStsClientCtor(import_STSClient2.STSClient, stsPlugins)), \"getDefaultRoleAssumer\");\nvar getDefaultRoleAssumerWithWebIdentity2 = /* @__PURE__ */ __name((stsOptions = {}, stsPlugins) => getDefaultRoleAssumerWithWebIdentity(stsOptions, getCustomizableStsClientCtor(import_STSClient2.STSClient, stsPlugins)), \"getDefaultRoleAssumerWithWebIdentity\");\nvar decorateDefaultCredentialProvider = /* @__PURE__ */ __name((provider) => (input) => provider({\n roleAssumer: getDefaultRoleAssumer2(input),\n roleAssumerWithWebIdentity: getDefaultRoleAssumerWithWebIdentity2(input),\n ...input\n}), \"decorateDefaultCredentialProvider\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n STSServiceException,\n __Client,\n STSClient,\n STS,\n $Command,\n AssumeRoleCommand,\n AssumeRoleWithSAMLCommand,\n AssumeRoleWithWebIdentityCommand,\n AssumeRootCommand,\n DecodeAuthorizationMessageCommand,\n GetAccessKeyInfoCommand,\n GetCallerIdentityCommand,\n GetFederationTokenCommand,\n GetSessionTokenCommand,\n ExpiredTokenException,\n MalformedPolicyDocumentException,\n PackedPolicyTooLargeException,\n RegionDisabledException,\n IDPRejectedClaimException,\n InvalidIdentityTokenException,\n IDPCommunicationErrorException,\n InvalidAuthorizationMessageException,\n CredentialsFilterSensitiveLog,\n AssumeRoleResponseFilterSensitiveLog,\n AssumeRoleWithSAMLRequestFilterSensitiveLog,\n AssumeRoleWithSAMLResponseFilterSensitiveLog,\n AssumeRoleWithWebIdentityRequestFilterSensitiveLog,\n AssumeRoleWithWebIdentityResponseFilterSensitiveLog,\n AssumeRootResponseFilterSensitiveLog,\n GetFederationTokenResponseFilterSensitiveLog,\n GetSessionTokenResponseFilterSensitiveLog,\n getDefaultRoleAssumer,\n getDefaultRoleAssumerWithWebIdentity,\n decorateDefaultCredentialProvider\n});\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getRuntimeConfig = void 0;\nconst tslib_1 = require(\"tslib\");\nconst package_json_1 = tslib_1.__importDefault(require(\"../package.json\"));\nconst core_1 = require(\"@aws-sdk/core\");\nconst credential_provider_node_1 = require(\"@aws-sdk/credential-provider-node\");\nconst util_user_agent_node_1 = require(\"@aws-sdk/util-user-agent-node\");\nconst config_resolver_1 = require(\"@smithy/config-resolver\");\nconst core_2 = require(\"@smithy/core\");\nconst hash_node_1 = require(\"@smithy/hash-node\");\nconst middleware_retry_1 = require(\"@smithy/middleware-retry\");\nconst node_config_provider_1 = require(\"@smithy/node-config-provider\");\nconst node_http_handler_1 = require(\"@smithy/node-http-handler\");\nconst util_body_length_node_1 = require(\"@smithy/util-body-length-node\");\nconst util_retry_1 = require(\"@smithy/util-retry\");\nconst runtimeConfig_shared_1 = require(\"./runtimeConfig.shared\");\nconst smithy_client_1 = require(\"@smithy/smithy-client\");\nconst util_defaults_mode_node_1 = require(\"@smithy/util-defaults-mode-node\");\nconst smithy_client_2 = require(\"@smithy/smithy-client\");\nconst getRuntimeConfig = (config) => {\n (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);\n const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);\n const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);\n const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);\n (0, core_1.emitWarningIfUnsupportedVersion)(process.version);\n const loaderConfig = {\n profile: config?.profile,\n logger: clientSharedValues.logger,\n };\n return {\n ...clientSharedValues,\n ...config,\n runtime: \"node\",\n defaultsMode,\n authSchemePreference: config?.authSchemePreference ?? (0, node_config_provider_1.loadConfig)(core_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),\n bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,\n credentialDefaultProvider: config?.credentialDefaultProvider ?? credential_provider_node_1.defaultProvider,\n defaultUserAgentProvider: config?.defaultUserAgentProvider ??\n (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),\n httpAuthSchemes: config?.httpAuthSchemes ?? [\n {\n schemeId: \"aws.auth#sigv4\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"aws.auth#sigv4\") ||\n (async (idProps) => await (0, credential_provider_node_1.defaultProvider)(idProps?.__config || {})()),\n signer: new core_1.AwsSdkSigV4Signer(),\n },\n {\n schemeId: \"smithy.api#noAuth\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"smithy.api#noAuth\") || (async () => ({})),\n signer: new core_2.NoAuthSigner(),\n },\n ],\n maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),\n region: config?.region ??\n (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),\n requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),\n retryMode: config?.retryMode ??\n (0, node_config_provider_1.loadConfig)({\n ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,\n default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE,\n }, config),\n sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, \"sha256\"),\n streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,\n useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),\n };\n};\nexports.getRuntimeConfig = getRuntimeConfig;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getRuntimeConfig = void 0;\nconst core_1 = require(\"@aws-sdk/core\");\nconst core_2 = require(\"@smithy/core\");\nconst smithy_client_1 = require(\"@smithy/smithy-client\");\nconst url_parser_1 = require(\"@smithy/url-parser\");\nconst util_base64_1 = require(\"@smithy/util-base64\");\nconst util_utf8_1 = require(\"@smithy/util-utf8\");\nconst httpAuthSchemeProvider_1 = require(\"./auth/httpAuthSchemeProvider\");\nconst endpointResolver_1 = require(\"./endpoint/endpointResolver\");\nconst getRuntimeConfig = (config) => {\n return {\n apiVersion: \"2011-06-15\",\n base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64,\n base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,\n disableHostPrefix: config?.disableHostPrefix ?? false,\n endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,\n extensions: config?.extensions ?? [],\n httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSTSHttpAuthSchemeProvider,\n httpAuthSchemes: config?.httpAuthSchemes ?? [\n {\n schemeId: \"aws.auth#sigv4\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"aws.auth#sigv4\"),\n signer: new core_1.AwsSdkSigV4Signer(),\n },\n {\n schemeId: \"smithy.api#noAuth\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"smithy.api#noAuth\") || (async () => ({})),\n signer: new core_2.NoAuthSigner(),\n },\n ],\n logger: config?.logger ?? new smithy_client_1.NoOpLogger(),\n serviceId: config?.serviceId ?? \"STS\",\n urlParser: config?.urlParser ?? url_parser_1.parseUrl,\n utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,\n utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8,\n };\n};\nexports.getRuntimeConfig = getRuntimeConfig;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resolveRuntimeExtensions = void 0;\nconst region_config_resolver_1 = require(\"@aws-sdk/region-config-resolver\");\nconst protocol_http_1 = require(\"@smithy/protocol-http\");\nconst smithy_client_1 = require(\"@smithy/smithy-client\");\nconst httpAuthExtensionConfiguration_1 = require(\"./auth/httpAuthExtensionConfiguration\");\nconst resolveRuntimeExtensions = (runtimeConfig, extensions) => {\n const extensionConfiguration = Object.assign((0, region_config_resolver_1.getAwsRegionExtensionConfiguration)(runtimeConfig), (0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig), (0, protocol_http_1.getHttpHandlerExtensionConfiguration)(runtimeConfig), (0, httpAuthExtensionConfiguration_1.getHttpAuthExtensionConfiguration)(runtimeConfig));\n extensions.forEach((extension) => extension.configure(extensionConfiguration));\n return Object.assign(runtimeConfig, (0, region_config_resolver_1.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), (0, smithy_client_1.resolveDefaultRuntimeConfig)(extensionConfiguration), (0, protocol_http_1.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), (0, httpAuthExtensionConfiguration_1.resolveHttpAuthRuntimeConfig)(extensionConfiguration));\n};\nexports.resolveRuntimeExtensions = resolveRuntimeExtensions;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./submodules/client/index\"), exports);\ntslib_1.__exportStar(require(\"./submodules/httpAuthSchemes/index\"), exports);\ntslib_1.__exportStar(require(\"./submodules/protocols/index\"), exports);\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/submodules/client/index.ts\nvar index_exports = {};\n__export(index_exports, {\n emitWarningIfUnsupportedVersion: () => emitWarningIfUnsupportedVersion,\n setCredentialFeature: () => setCredentialFeature,\n setFeature: () => setFeature,\n state: () => state\n});\nmodule.exports = __toCommonJS(index_exports);\n\n// src/submodules/client/emitWarningIfUnsupportedVersion.ts\nvar state = {\n warningEmitted: false\n};\nvar emitWarningIfUnsupportedVersion = /* @__PURE__ */ __name((version) => {\n if (version && !state.warningEmitted && parseInt(version.substring(1, version.indexOf(\".\"))) < 18) {\n state.warningEmitted = true;\n process.emitWarning(\n `NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will\nno longer support Node.js 16.x on January 6, 2025.\n\nTo continue receiving updates to AWS services, bug fixes, and security\nupdates please upgrade to a supported Node.js LTS version.\n\nMore information can be found at: https://a.co/74kJMmI`\n );\n }\n}, \"emitWarningIfUnsupportedVersion\");\n\n// src/submodules/client/setCredentialFeature.ts\nfunction setCredentialFeature(credentials, feature, value) {\n if (!credentials.$source) {\n credentials.$source = {};\n }\n credentials.$source[feature] = value;\n return credentials;\n}\n__name(setCredentialFeature, \"setCredentialFeature\");\n\n// src/submodules/client/setFeature.ts\nfunction setFeature(context, feature, value) {\n if (!context.__aws_sdk_context) {\n context.__aws_sdk_context = {\n features: {}\n };\n } else if (!context.__aws_sdk_context.features) {\n context.__aws_sdk_context.features = {};\n }\n context.__aws_sdk_context.features[feature] = value;\n}\n__name(setFeature, \"setFeature\");\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n emitWarningIfUnsupportedVersion,\n setCredentialFeature,\n setFeature,\n state\n});\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/submodules/httpAuthSchemes/index.ts\nvar index_exports = {};\n__export(index_exports, {\n AWSSDKSigV4Signer: () => AWSSDKSigV4Signer,\n AwsSdkSigV4ASigner: () => AwsSdkSigV4ASigner,\n AwsSdkSigV4Signer: () => AwsSdkSigV4Signer,\n NODE_AUTH_SCHEME_PREFERENCE_OPTIONS: () => NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,\n NODE_SIGV4A_CONFIG_OPTIONS: () => NODE_SIGV4A_CONFIG_OPTIONS,\n getBearerTokenEnvKey: () => getBearerTokenEnvKey,\n resolveAWSSDKSigV4Config: () => resolveAWSSDKSigV4Config,\n resolveAwsSdkSigV4AConfig: () => resolveAwsSdkSigV4AConfig,\n resolveAwsSdkSigV4Config: () => resolveAwsSdkSigV4Config,\n validateSigningProperties: () => validateSigningProperties\n});\nmodule.exports = __toCommonJS(index_exports);\n\n// src/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.ts\nvar import_protocol_http2 = require(\"@smithy/protocol-http\");\n\n// src/submodules/httpAuthSchemes/utils/getDateHeader.ts\nvar import_protocol_http = require(\"@smithy/protocol-http\");\nvar getDateHeader = /* @__PURE__ */ __name((response) => import_protocol_http.HttpResponse.isInstance(response) ? response.headers?.date ?? response.headers?.Date : void 0, \"getDateHeader\");\n\n// src/submodules/httpAuthSchemes/utils/getSkewCorrectedDate.ts\nvar getSkewCorrectedDate = /* @__PURE__ */ __name((systemClockOffset) => new Date(Date.now() + systemClockOffset), \"getSkewCorrectedDate\");\n\n// src/submodules/httpAuthSchemes/utils/isClockSkewed.ts\nvar isClockSkewed = /* @__PURE__ */ __name((clockTime, systemClockOffset) => Math.abs(getSkewCorrectedDate(systemClockOffset).getTime() - clockTime) >= 3e5, \"isClockSkewed\");\n\n// src/submodules/httpAuthSchemes/utils/getUpdatedSystemClockOffset.ts\nvar getUpdatedSystemClockOffset = /* @__PURE__ */ __name((clockTime, currentSystemClockOffset) => {\n const clockTimeInMs = Date.parse(clockTime);\n if (isClockSkewed(clockTimeInMs, currentSystemClockOffset)) {\n return clockTimeInMs - Date.now();\n }\n return currentSystemClockOffset;\n}, \"getUpdatedSystemClockOffset\");\n\n// src/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.ts\nvar throwSigningPropertyError = /* @__PURE__ */ __name((name, property) => {\n if (!property) {\n throw new Error(`Property \\`${name}\\` is not resolved for AWS SDK SigV4Auth`);\n }\n return property;\n}, \"throwSigningPropertyError\");\nvar validateSigningProperties = /* @__PURE__ */ __name(async (signingProperties) => {\n const context = throwSigningPropertyError(\n \"context\",\n signingProperties.context\n );\n const config = throwSigningPropertyError(\"config\", signingProperties.config);\n const authScheme = context.endpointV2?.properties?.authSchemes?.[0];\n const signerFunction = throwSigningPropertyError(\n \"signer\",\n config.signer\n );\n const signer = await signerFunction(authScheme);\n const signingRegion = signingProperties?.signingRegion;\n const signingRegionSet = signingProperties?.signingRegionSet;\n const signingName = signingProperties?.signingName;\n return {\n config,\n signer,\n signingRegion,\n signingRegionSet,\n signingName\n };\n}, \"validateSigningProperties\");\nvar AwsSdkSigV4Signer = class {\n static {\n __name(this, \"AwsSdkSigV4Signer\");\n }\n async sign(httpRequest, identity, signingProperties) {\n if (!import_protocol_http2.HttpRequest.isInstance(httpRequest)) {\n throw new Error(\"The request is not an instance of `HttpRequest` and cannot be signed\");\n }\n const validatedProps = await validateSigningProperties(signingProperties);\n const { config, signer } = validatedProps;\n let { signingRegion, signingName } = validatedProps;\n const handlerExecutionContext = signingProperties.context;\n if (handlerExecutionContext?.authSchemes?.length ?? 0 > 1) {\n const [first, second] = handlerExecutionContext.authSchemes;\n if (first?.name === \"sigv4a\" && second?.name === \"sigv4\") {\n signingRegion = second?.signingRegion ?? signingRegion;\n signingName = second?.signingName ?? signingName;\n }\n }\n const signedRequest = await signer.sign(httpRequest, {\n signingDate: getSkewCorrectedDate(config.systemClockOffset),\n signingRegion,\n signingService: signingName\n });\n return signedRequest;\n }\n errorHandler(signingProperties) {\n return (error) => {\n const serverTime = error.ServerTime ?? getDateHeader(error.$response);\n if (serverTime) {\n const config = throwSigningPropertyError(\"config\", signingProperties.config);\n const initialSystemClockOffset = config.systemClockOffset;\n config.systemClockOffset = getUpdatedSystemClockOffset(serverTime, config.systemClockOffset);\n const clockSkewCorrected = config.systemClockOffset !== initialSystemClockOffset;\n if (clockSkewCorrected && error.$metadata) {\n error.$metadata.clockSkewCorrected = true;\n }\n }\n throw error;\n };\n }\n successHandler(httpResponse, signingProperties) {\n const dateHeader = getDateHeader(httpResponse);\n if (dateHeader) {\n const config = throwSigningPropertyError(\"config\", signingProperties.config);\n config.systemClockOffset = getUpdatedSystemClockOffset(dateHeader, config.systemClockOffset);\n }\n }\n};\nvar AWSSDKSigV4Signer = AwsSdkSigV4Signer;\n\n// src/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4ASigner.ts\nvar import_protocol_http3 = require(\"@smithy/protocol-http\");\nvar AwsSdkSigV4ASigner = class extends AwsSdkSigV4Signer {\n static {\n __name(this, \"AwsSdkSigV4ASigner\");\n }\n async sign(httpRequest, identity, signingProperties) {\n if (!import_protocol_http3.HttpRequest.isInstance(httpRequest)) {\n throw new Error(\"The request is not an instance of `HttpRequest` and cannot be signed\");\n }\n const { config, signer, signingRegion, signingRegionSet, signingName } = await validateSigningProperties(\n signingProperties\n );\n const configResolvedSigningRegionSet = await config.sigv4aSigningRegionSet?.();\n const multiRegionOverride = (configResolvedSigningRegionSet ?? signingRegionSet ?? [signingRegion]).join(\",\");\n const signedRequest = await signer.sign(httpRequest, {\n signingDate: getSkewCorrectedDate(config.systemClockOffset),\n signingRegion: multiRegionOverride,\n signingService: signingName\n });\n return signedRequest;\n }\n};\n\n// src/submodules/httpAuthSchemes/utils/getArrayForCommaSeparatedString.ts\nvar getArrayForCommaSeparatedString = /* @__PURE__ */ __name((str) => typeof str === \"string\" && str.length > 0 ? str.split(\",\").map((item) => item.trim()) : [], \"getArrayForCommaSeparatedString\");\n\n// src/submodules/httpAuthSchemes/utils/getBearerTokenEnvKey.ts\nvar getBearerTokenEnvKey = /* @__PURE__ */ __name((signingName) => `AWS_BEARER_TOKEN_${signingName.replace(/[\\s-]/g, \"_\").toUpperCase()}`, \"getBearerTokenEnvKey\");\n\n// src/submodules/httpAuthSchemes/aws_sdk/NODE_AUTH_SCHEME_PREFERENCE_OPTIONS.ts\nvar NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY = \"AWS_AUTH_SCHEME_PREFERENCE\";\nvar NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY = \"auth_scheme_preference\";\nvar NODE_AUTH_SCHEME_PREFERENCE_OPTIONS = {\n /**\n * Retrieves auth scheme preference from environment variables\n * @param env - Node process environment object\n * @returns Array of auth scheme strings if preference is set, undefined otherwise\n */\n environmentVariableSelector: /* @__PURE__ */ __name((env, options) => {\n if (options?.signingName) {\n const bearerTokenKey = getBearerTokenEnvKey(options.signingName);\n if (bearerTokenKey in env) return [\"httpBearerAuth\"];\n }\n if (!(NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY in env)) return void 0;\n return getArrayForCommaSeparatedString(env[NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY]);\n }, \"environmentVariableSelector\"),\n /**\n * Retrieves auth scheme preference from config file\n * @param profile - Config profile object\n * @returns Array of auth scheme strings if preference is set, undefined otherwise\n */\n configFileSelector: /* @__PURE__ */ __name((profile) => {\n if (!(NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY in profile)) return void 0;\n return getArrayForCommaSeparatedString(profile[NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY]);\n }, \"configFileSelector\"),\n /**\n * Default auth scheme preference if not specified in environment or config\n */\n default: []\n};\n\n// src/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4AConfig.ts\nvar import_core = require(\"@smithy/core\");\nvar import_property_provider = require(\"@smithy/property-provider\");\nvar resolveAwsSdkSigV4AConfig = /* @__PURE__ */ __name((config) => {\n config.sigv4aSigningRegionSet = (0, import_core.normalizeProvider)(config.sigv4aSigningRegionSet);\n return config;\n}, \"resolveAwsSdkSigV4AConfig\");\nvar NODE_SIGV4A_CONFIG_OPTIONS = {\n environmentVariableSelector(env) {\n if (env.AWS_SIGV4A_SIGNING_REGION_SET) {\n return env.AWS_SIGV4A_SIGNING_REGION_SET.split(\",\").map((_) => _.trim());\n }\n throw new import_property_provider.ProviderError(\"AWS_SIGV4A_SIGNING_REGION_SET not set in env.\", {\n tryNextLink: true\n });\n },\n configFileSelector(profile) {\n if (profile.sigv4a_signing_region_set) {\n return (profile.sigv4a_signing_region_set ?? \"\").split(\",\").map((_) => _.trim());\n }\n throw new import_property_provider.ProviderError(\"sigv4a_signing_region_set not set in profile.\", {\n tryNextLink: true\n });\n },\n default: void 0\n};\n\n// src/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.ts\nvar import_client = require(\"@aws-sdk/core/client\");\nvar import_core2 = require(\"@smithy/core\");\nvar import_signature_v4 = require(\"@smithy/signature-v4\");\nvar resolveAwsSdkSigV4Config = /* @__PURE__ */ __name((config) => {\n let inputCredentials = config.credentials;\n let isUserSupplied = !!config.credentials;\n let resolvedCredentials = void 0;\n Object.defineProperty(config, \"credentials\", {\n set(credentials) {\n if (credentials && credentials !== inputCredentials && credentials !== resolvedCredentials) {\n isUserSupplied = true;\n }\n inputCredentials = credentials;\n const memoizedProvider = normalizeCredentialProvider(config, {\n credentials: inputCredentials,\n credentialDefaultProvider: config.credentialDefaultProvider\n });\n const boundProvider = bindCallerConfig(config, memoizedProvider);\n if (isUserSupplied && !boundProvider.attributed) {\n resolvedCredentials = /* @__PURE__ */ __name(async (options) => boundProvider(options).then(\n (creds) => (0, import_client.setCredentialFeature)(creds, \"CREDENTIALS_CODE\", \"e\")\n ), \"resolvedCredentials\");\n resolvedCredentials.memoized = boundProvider.memoized;\n resolvedCredentials.configBound = boundProvider.configBound;\n resolvedCredentials.attributed = true;\n } else {\n resolvedCredentials = boundProvider;\n }\n },\n get() {\n return resolvedCredentials;\n },\n enumerable: true,\n configurable: true\n });\n config.credentials = inputCredentials;\n const {\n // Default for signingEscapePath\n signingEscapePath = true,\n // Default for systemClockOffset\n systemClockOffset = config.systemClockOffset || 0,\n // No default for sha256 since it is platform dependent\n sha256\n } = config;\n let signer;\n if (config.signer) {\n signer = (0, import_core2.normalizeProvider)(config.signer);\n } else if (config.regionInfoProvider) {\n signer = /* @__PURE__ */ __name(() => (0, import_core2.normalizeProvider)(config.region)().then(\n async (region) => [\n await config.regionInfoProvider(region, {\n useFipsEndpoint: await config.useFipsEndpoint(),\n useDualstackEndpoint: await config.useDualstackEndpoint()\n }) || {},\n region\n ]\n ).then(([regionInfo, region]) => {\n const { signingRegion, signingService } = regionInfo;\n config.signingRegion = config.signingRegion || signingRegion || region;\n config.signingName = config.signingName || signingService || config.serviceId;\n const params = {\n ...config,\n credentials: config.credentials,\n region: config.signingRegion,\n service: config.signingName,\n sha256,\n uriEscapePath: signingEscapePath\n };\n const SignerCtor = config.signerConstructor || import_signature_v4.SignatureV4;\n return new SignerCtor(params);\n }), \"signer\");\n } else {\n signer = /* @__PURE__ */ __name(async (authScheme) => {\n authScheme = Object.assign(\n {},\n {\n name: \"sigv4\",\n signingName: config.signingName || config.defaultSigningName,\n signingRegion: await (0, import_core2.normalizeProvider)(config.region)(),\n properties: {}\n },\n authScheme\n );\n const signingRegion = authScheme.signingRegion;\n const signingService = authScheme.signingName;\n config.signingRegion = config.signingRegion || signingRegion;\n config.signingName = config.signingName || signingService || config.serviceId;\n const params = {\n ...config,\n credentials: config.credentials,\n region: config.signingRegion,\n service: config.signingName,\n sha256,\n uriEscapePath: signingEscapePath\n };\n const SignerCtor = config.signerConstructor || import_signature_v4.SignatureV4;\n return new SignerCtor(params);\n }, \"signer\");\n }\n const resolvedConfig = Object.assign(config, {\n systemClockOffset,\n signingEscapePath,\n signer\n });\n return resolvedConfig;\n}, \"resolveAwsSdkSigV4Config\");\nvar resolveAWSSDKSigV4Config = resolveAwsSdkSigV4Config;\nfunction normalizeCredentialProvider(config, {\n credentials,\n credentialDefaultProvider\n}) {\n let credentialsProvider;\n if (credentials) {\n if (!credentials?.memoized) {\n credentialsProvider = (0, import_core2.memoizeIdentityProvider)(credentials, import_core2.isIdentityExpired, import_core2.doesIdentityRequireRefresh);\n } else {\n credentialsProvider = credentials;\n }\n } else {\n if (credentialDefaultProvider) {\n credentialsProvider = (0, import_core2.normalizeProvider)(\n credentialDefaultProvider(\n Object.assign({}, config, {\n parentClientConfig: config\n })\n )\n );\n } else {\n credentialsProvider = /* @__PURE__ */ __name(async () => {\n throw new Error(\n \"@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.\"\n );\n }, \"credentialsProvider\");\n }\n }\n credentialsProvider.memoized = true;\n return credentialsProvider;\n}\n__name(normalizeCredentialProvider, \"normalizeCredentialProvider\");\nfunction bindCallerConfig(config, credentialsProvider) {\n if (credentialsProvider.configBound) {\n return credentialsProvider;\n }\n const fn = /* @__PURE__ */ __name(async (options) => credentialsProvider({ ...options, callerClientConfig: config }), \"fn\");\n fn.memoized = credentialsProvider.memoized;\n fn.configBound = true;\n return fn;\n}\n__name(bindCallerConfig, \"bindCallerConfig\");\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n AWSSDKSigV4Signer,\n AwsSdkSigV4ASigner,\n AwsSdkSigV4Signer,\n NODE_AUTH_SCHEME_PREFERENCE_OPTIONS,\n NODE_SIGV4A_CONFIG_OPTIONS,\n getBearerTokenEnvKey,\n resolveAWSSDKSigV4Config,\n resolveAwsSdkSigV4AConfig,\n resolveAwsSdkSigV4Config,\n validateSigningProperties\n});\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/submodules/protocols/index.ts\nvar index_exports = {};\n__export(index_exports, {\n AwsEc2QueryProtocol: () => AwsEc2QueryProtocol,\n AwsJson1_0Protocol: () => AwsJson1_0Protocol,\n AwsJson1_1Protocol: () => AwsJson1_1Protocol,\n AwsJsonRpcProtocol: () => AwsJsonRpcProtocol,\n AwsQueryProtocol: () => AwsQueryProtocol,\n AwsRestJsonProtocol: () => AwsRestJsonProtocol,\n AwsRestXmlProtocol: () => AwsRestXmlProtocol,\n JsonCodec: () => JsonCodec,\n JsonShapeDeserializer: () => JsonShapeDeserializer,\n JsonShapeSerializer: () => JsonShapeSerializer,\n XmlCodec: () => XmlCodec,\n XmlShapeDeserializer: () => XmlShapeDeserializer,\n XmlShapeSerializer: () => XmlShapeSerializer,\n _toBool: () => _toBool,\n _toNum: () => _toNum,\n _toStr: () => _toStr,\n awsExpectUnion: () => awsExpectUnion,\n loadRestJsonErrorCode: () => loadRestJsonErrorCode,\n loadRestXmlErrorCode: () => loadRestXmlErrorCode,\n parseJsonBody: () => parseJsonBody,\n parseJsonErrorBody: () => parseJsonErrorBody,\n parseXmlBody: () => parseXmlBody,\n parseXmlErrorBody: () => parseXmlErrorBody\n});\nmodule.exports = __toCommonJS(index_exports);\n\n// src/submodules/protocols/coercing-serializers.ts\nvar _toStr = /* @__PURE__ */ __name((val) => {\n if (val == null) {\n return val;\n }\n if (typeof val === \"number\" || typeof val === \"bigint\") {\n const warning = new Error(`Received number ${val} where a string was expected.`);\n warning.name = \"Warning\";\n console.warn(warning);\n return String(val);\n }\n if (typeof val === \"boolean\") {\n const warning = new Error(`Received boolean ${val} where a string was expected.`);\n warning.name = \"Warning\";\n console.warn(warning);\n return String(val);\n }\n return val;\n}, \"_toStr\");\nvar _toBool = /* @__PURE__ */ __name((val) => {\n if (val == null) {\n return val;\n }\n if (typeof val === \"number\") {\n }\n if (typeof val === \"string\") {\n const lowercase = val.toLowerCase();\n if (val !== \"\" && lowercase !== \"false\" && lowercase !== \"true\") {\n const warning = new Error(`Received string \"${val}\" where a boolean was expected.`);\n warning.name = \"Warning\";\n console.warn(warning);\n }\n return val !== \"\" && lowercase !== \"false\";\n }\n return val;\n}, \"_toBool\");\nvar _toNum = /* @__PURE__ */ __name((val) => {\n if (val == null) {\n return val;\n }\n if (typeof val === \"boolean\") {\n }\n if (typeof val === \"string\") {\n const num = Number(val);\n if (num.toString() !== val) {\n const warning = new Error(`Received string \"${val}\" where a number was expected.`);\n warning.name = \"Warning\";\n console.warn(warning);\n return val;\n }\n return num;\n }\n return val;\n}, \"_toNum\");\n\n// src/submodules/protocols/json/AwsJsonRpcProtocol.ts\nvar import_protocols = require(\"@smithy/core/protocols\");\nvar import_schema3 = require(\"@smithy/core/schema\");\nvar import_util_body_length_browser = require(\"@smithy/util-body-length-browser\");\n\n// src/submodules/protocols/ConfigurableSerdeContext.ts\nvar SerdeContextConfig = class {\n static {\n __name(this, \"SerdeContextConfig\");\n }\n serdeContext;\n setSerdeContext(serdeContext) {\n this.serdeContext = serdeContext;\n }\n};\n\n// src/submodules/protocols/json/JsonShapeDeserializer.ts\nvar import_schema = require(\"@smithy/core/schema\");\nvar import_serde2 = require(\"@smithy/core/serde\");\nvar import_util_base64 = require(\"@smithy/util-base64\");\n\n// src/submodules/protocols/json/jsonReviver.ts\nvar import_serde = require(\"@smithy/core/serde\");\nfunction jsonReviver(key, value, context) {\n if (context?.source) {\n const numericString = context.source;\n if (typeof value === \"number\") {\n if (value > Number.MAX_SAFE_INTEGER || value < Number.MIN_SAFE_INTEGER || numericString !== String(value)) {\n const isFractional = numericString.includes(\".\");\n if (isFractional) {\n return new import_serde.NumericValue(numericString, \"bigDecimal\");\n } else {\n return BigInt(numericString);\n }\n }\n }\n }\n return value;\n}\n__name(jsonReviver, \"jsonReviver\");\n\n// src/submodules/protocols/common.ts\nvar import_smithy_client = require(\"@smithy/smithy-client\");\nvar collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), \"collectBodyString\");\n\n// src/submodules/protocols/json/parseJsonBody.ts\nvar parseJsonBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {\n if (encoded.length) {\n try {\n return JSON.parse(encoded);\n } catch (e) {\n if (e?.name === \"SyntaxError\") {\n Object.defineProperty(e, \"$responseBodyText\", {\n value: encoded\n });\n }\n throw e;\n }\n }\n return {};\n}), \"parseJsonBody\");\nvar parseJsonErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {\n const value = await parseJsonBody(errorBody, context);\n value.message = value.message ?? value.Message;\n return value;\n}, \"parseJsonErrorBody\");\nvar loadRestJsonErrorCode = /* @__PURE__ */ __name((output, data) => {\n const findKey = /* @__PURE__ */ __name((object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase()), \"findKey\");\n const sanitizeErrorCode = /* @__PURE__ */ __name((rawValue) => {\n let cleanValue = rawValue;\n if (typeof cleanValue === \"number\") {\n cleanValue = cleanValue.toString();\n }\n if (cleanValue.indexOf(\",\") >= 0) {\n cleanValue = cleanValue.split(\",\")[0];\n }\n if (cleanValue.indexOf(\":\") >= 0) {\n cleanValue = cleanValue.split(\":\")[0];\n }\n if (cleanValue.indexOf(\"#\") >= 0) {\n cleanValue = cleanValue.split(\"#\")[1];\n }\n return cleanValue;\n }, \"sanitizeErrorCode\");\n const headerKey = findKey(output.headers, \"x-amzn-errortype\");\n if (headerKey !== void 0) {\n return sanitizeErrorCode(output.headers[headerKey]);\n }\n if (data && typeof data === \"object\") {\n const codeKey = findKey(data, \"code\");\n if (codeKey && data[codeKey] !== void 0) {\n return sanitizeErrorCode(data[codeKey]);\n }\n if (data[\"__type\"] !== void 0) {\n return sanitizeErrorCode(data[\"__type\"]);\n }\n }\n}, \"loadRestJsonErrorCode\");\n\n// src/submodules/protocols/json/JsonShapeDeserializer.ts\nvar JsonShapeDeserializer = class extends SerdeContextConfig {\n constructor(settings) {\n super();\n this.settings = settings;\n }\n static {\n __name(this, \"JsonShapeDeserializer\");\n }\n async read(schema, data) {\n return this._read(\n schema,\n typeof data === \"string\" ? JSON.parse(data, jsonReviver) : await parseJsonBody(data, this.serdeContext)\n );\n }\n readObject(schema, data) {\n return this._read(schema, data);\n }\n _read(schema, value) {\n const isObject = value !== null && typeof value === \"object\";\n const ns = import_schema.NormalizedSchema.of(schema);\n if (ns.isListSchema() && Array.isArray(value)) {\n const listMember = ns.getValueSchema();\n const out = [];\n const sparse = !!ns.getMergedTraits().sparse;\n for (const item of value) {\n if (sparse || item != null) {\n out.push(this._read(listMember, item));\n }\n }\n return out;\n } else if (ns.isMapSchema() && isObject) {\n const mapMember = ns.getValueSchema();\n const out = {};\n const sparse = !!ns.getMergedTraits().sparse;\n for (const [_k, _v] of Object.entries(value)) {\n if (sparse || _v != null) {\n out[_k] = this._read(mapMember, _v);\n }\n }\n return out;\n } else if (ns.isStructSchema() && isObject) {\n const out = {};\n for (const [memberName, memberSchema] of ns.structIterator()) {\n const fromKey = this.settings.jsonName ? memberSchema.getMergedTraits().jsonName ?? memberName : memberName;\n const deserializedValue = this._read(memberSchema, value[fromKey]);\n if (deserializedValue != null) {\n out[memberName] = deserializedValue;\n }\n }\n return out;\n }\n if (ns.isBlobSchema() && typeof value === \"string\") {\n return (0, import_util_base64.fromBase64)(value);\n }\n const mediaType = ns.getMergedTraits().mediaType;\n if (ns.isStringSchema() && typeof value === \"string\" && mediaType) {\n const isJson = mediaType === \"application/json\" || mediaType.endsWith(\"+json\");\n if (isJson) {\n return import_serde2.LazyJsonString.from(value);\n }\n }\n if (ns.isTimestampSchema()) {\n const options = this.settings.timestampFormat;\n const format = options.useTrait ? ns.getSchema() === import_schema.SCHEMA.TIMESTAMP_DEFAULT ? options.default : ns.getSchema() ?? options.default : options.default;\n switch (format) {\n case import_schema.SCHEMA.TIMESTAMP_DATE_TIME:\n return (0, import_serde2.parseRfc3339DateTimeWithOffset)(value);\n case import_schema.SCHEMA.TIMESTAMP_HTTP_DATE:\n return (0, import_serde2.parseRfc7231DateTime)(value);\n case import_schema.SCHEMA.TIMESTAMP_EPOCH_SECONDS:\n return (0, import_serde2.parseEpochTimestamp)(value);\n default:\n console.warn(\"Missing timestamp format, parsing value with Date constructor:\", value);\n return new Date(value);\n }\n }\n if (ns.isBigIntegerSchema() && (typeof value === \"number\" || typeof value === \"string\")) {\n return BigInt(value);\n }\n if (ns.isBigDecimalSchema() && value != void 0) {\n if (value instanceof import_serde2.NumericValue) {\n return value;\n }\n return new import_serde2.NumericValue(String(value), \"bigDecimal\");\n }\n if (ns.isNumericSchema() && typeof value === \"string\") {\n switch (value) {\n case \"Infinity\":\n return Infinity;\n case \"-Infinity\":\n return -Infinity;\n case \"NaN\":\n return NaN;\n }\n }\n return value;\n }\n};\n\n// src/submodules/protocols/json/JsonShapeSerializer.ts\nvar import_schema2 = require(\"@smithy/core/schema\");\nvar import_serde4 = require(\"@smithy/core/serde\");\nvar import_serde5 = require(\"@smithy/core/serde\");\n\n// src/submodules/protocols/json/jsonReplacer.ts\nvar import_serde3 = require(\"@smithy/core/serde\");\nvar NUMERIC_CONTROL_CHAR = String.fromCharCode(925);\nvar JsonReplacer = class {\n static {\n __name(this, \"JsonReplacer\");\n }\n /**\n * Stores placeholder key to true serialized value lookup.\n */\n values = /* @__PURE__ */ new Map();\n counter = 0;\n stage = 0;\n /**\n * Creates a jsonReplacer function that reserves big integer and big decimal values\n * for later replacement.\n */\n createReplacer() {\n if (this.stage === 1) {\n throw new Error(\"@aws-sdk/core/protocols - JsonReplacer already created.\");\n }\n if (this.stage === 2) {\n throw new Error(\"@aws-sdk/core/protocols - JsonReplacer exhausted.\");\n }\n this.stage = 1;\n return (key, value) => {\n if (value instanceof import_serde3.NumericValue) {\n const v = `${NUMERIC_CONTROL_CHAR + +\"nv\" + this.counter++}_` + value.string;\n this.values.set(`\"${v}\"`, value.string);\n return v;\n }\n if (typeof value === \"bigint\") {\n const s = value.toString();\n const v = `${NUMERIC_CONTROL_CHAR + \"b\" + this.counter++}_` + s;\n this.values.set(`\"${v}\"`, s);\n return v;\n }\n return value;\n };\n }\n /**\n * Replaces placeholder keys with their true values.\n */\n replaceInJson(json) {\n if (this.stage === 0) {\n throw new Error(\"@aws-sdk/core/protocols - JsonReplacer not created yet.\");\n }\n if (this.stage === 2) {\n throw new Error(\"@aws-sdk/core/protocols - JsonReplacer exhausted.\");\n }\n this.stage = 2;\n if (this.counter === 0) {\n return json;\n }\n for (const [key, value] of this.values) {\n json = json.replace(key, value);\n }\n return json;\n }\n};\n\n// src/submodules/protocols/json/JsonShapeSerializer.ts\nvar JsonShapeSerializer = class extends SerdeContextConfig {\n constructor(settings) {\n super();\n this.settings = settings;\n }\n static {\n __name(this, \"JsonShapeSerializer\");\n }\n buffer;\n rootSchema;\n write(schema, value) {\n this.rootSchema = import_schema2.NormalizedSchema.of(schema);\n this.buffer = this._write(this.rootSchema, value);\n }\n flush() {\n if (this.rootSchema?.isStructSchema() || this.rootSchema?.isDocumentSchema()) {\n const replacer = new JsonReplacer();\n return replacer.replaceInJson(JSON.stringify(this.buffer, replacer.createReplacer(), 0));\n }\n return this.buffer;\n }\n _write(schema, value, container) {\n const isObject = value !== null && typeof value === \"object\";\n const ns = import_schema2.NormalizedSchema.of(schema);\n if (ns.isListSchema() && Array.isArray(value)) {\n const listMember = ns.getValueSchema();\n const out = [];\n const sparse = !!ns.getMergedTraits().sparse;\n for (const item of value) {\n if (sparse || item != null) {\n out.push(this._write(listMember, item));\n }\n }\n return out;\n } else if (ns.isMapSchema() && isObject) {\n const mapMember = ns.getValueSchema();\n const out = {};\n const sparse = !!ns.getMergedTraits().sparse;\n for (const [_k, _v] of Object.entries(value)) {\n if (sparse || _v != null) {\n out[_k] = this._write(mapMember, _v);\n }\n }\n return out;\n } else if (ns.isStructSchema() && isObject) {\n const out = {};\n for (const [memberName, memberSchema] of ns.structIterator()) {\n const targetKey = this.settings.jsonName ? memberSchema.getMergedTraits().jsonName ?? memberName : memberName;\n const serializableValue = this._write(memberSchema, value[memberName], ns);\n if (serializableValue !== void 0) {\n out[targetKey] = serializableValue;\n }\n }\n return out;\n }\n if (value === null && container?.isStructSchema()) {\n return void 0;\n }\n if (ns.isBlobSchema() && (value instanceof Uint8Array || typeof value === \"string\")) {\n if (ns === this.rootSchema) {\n return value;\n }\n if (!this.serdeContext?.base64Encoder) {\n throw new Error(\"Missing base64Encoder in serdeContext\");\n }\n return this.serdeContext?.base64Encoder(value);\n }\n if (ns.isTimestampSchema() && value instanceof Date) {\n const options = this.settings.timestampFormat;\n const format = options.useTrait ? ns.getSchema() === import_schema2.SCHEMA.TIMESTAMP_DEFAULT ? options.default : ns.getSchema() ?? options.default : options.default;\n switch (format) {\n case import_schema2.SCHEMA.TIMESTAMP_DATE_TIME:\n return value.toISOString().replace(\".000Z\", \"Z\");\n case import_schema2.SCHEMA.TIMESTAMP_HTTP_DATE:\n return (0, import_serde4.dateToUtcString)(value);\n case import_schema2.SCHEMA.TIMESTAMP_EPOCH_SECONDS:\n return value.getTime() / 1e3;\n default:\n console.warn(\"Missing timestamp format, using epoch seconds\", value);\n return value.getTime() / 1e3;\n }\n }\n if (ns.isNumericSchema() && typeof value === \"number\") {\n if (Math.abs(value) === Infinity || isNaN(value)) {\n return String(value);\n }\n }\n const mediaType = ns.getMergedTraits().mediaType;\n if (ns.isStringSchema() && typeof value === \"string\" && mediaType) {\n const isJson = mediaType === \"application/json\" || mediaType.endsWith(\"+json\");\n if (isJson) {\n return import_serde5.LazyJsonString.from(value);\n }\n }\n return value;\n }\n};\n\n// src/submodules/protocols/json/JsonCodec.ts\nvar JsonCodec = class extends SerdeContextConfig {\n constructor(settings) {\n super();\n this.settings = settings;\n }\n static {\n __name(this, \"JsonCodec\");\n }\n createSerializer() {\n const serializer = new JsonShapeSerializer(this.settings);\n serializer.setSerdeContext(this.serdeContext);\n return serializer;\n }\n createDeserializer() {\n const deserializer = new JsonShapeDeserializer(this.settings);\n deserializer.setSerdeContext(this.serdeContext);\n return deserializer;\n }\n};\n\n// src/submodules/protocols/json/AwsJsonRpcProtocol.ts\nvar AwsJsonRpcProtocol = class extends import_protocols.RpcProtocol {\n static {\n __name(this, \"AwsJsonRpcProtocol\");\n }\n serializer;\n deserializer;\n codec;\n constructor({ defaultNamespace }) {\n super({\n defaultNamespace\n });\n this.codec = new JsonCodec({\n timestampFormat: {\n useTrait: true,\n default: import_schema3.SCHEMA.TIMESTAMP_EPOCH_SECONDS\n },\n jsonName: false\n });\n this.serializer = this.codec.createSerializer();\n this.deserializer = this.codec.createDeserializer();\n }\n async serializeRequest(operationSchema, input, context) {\n const request = await super.serializeRequest(operationSchema, input, context);\n if (!request.path.endsWith(\"/\")) {\n request.path += \"/\";\n }\n Object.assign(request.headers, {\n \"content-type\": `application/x-amz-json-${this.getJsonRpcVersion()}`,\n \"x-amz-target\": (this.getJsonRpcVersion() === \"1.0\" ? `JsonRpc10.` : `JsonProtocol.`) + import_schema3.NormalizedSchema.of(operationSchema).getName()\n });\n if ((0, import_schema3.deref)(operationSchema.input) === \"unit\" || !request.body) {\n request.body = \"{}\";\n }\n try {\n request.headers[\"content-length\"] = String((0, import_util_body_length_browser.calculateBodyLength)(request.body));\n } catch (e) {\n }\n return request;\n }\n getPayloadCodec() {\n return this.codec;\n }\n async handleError(operationSchema, context, response, dataObject, metadata) {\n const errorIdentifier = loadRestJsonErrorCode(response, dataObject) ?? \"Unknown\";\n let namespace = this.options.defaultNamespace;\n let errorName = errorIdentifier;\n if (errorIdentifier.includes(\"#\")) {\n [namespace, errorName] = errorIdentifier.split(\"#\");\n }\n const registry = import_schema3.TypeRegistry.for(namespace);\n let errorSchema;\n try {\n errorSchema = registry.getSchema(errorIdentifier);\n } catch (e) {\n const baseExceptionSchema = import_schema3.TypeRegistry.for(\"smithy.ts.sdk.synthetic.\" + namespace).getBaseException();\n if (baseExceptionSchema) {\n const ErrorCtor = baseExceptionSchema.ctor;\n throw Object.assign(new ErrorCtor(errorName), dataObject);\n }\n throw new Error(errorName);\n }\n const ns = import_schema3.NormalizedSchema.of(errorSchema);\n const message = dataObject.message ?? dataObject.Message ?? \"Unknown\";\n const exception = new errorSchema.ctor(message);\n await this.deserializeHttpMessage(errorSchema, context, response, dataObject);\n const output = {};\n for (const [name, member] of ns.structIterator()) {\n const target = member.getMergedTraits().jsonName ?? name;\n output[name] = this.codec.createDeserializer().readObject(member, dataObject[target]);\n }\n Object.assign(exception, {\n $metadata: metadata,\n $response: response,\n $fault: ns.getMergedTraits().error,\n message,\n ...output\n });\n throw exception;\n }\n};\n\n// src/submodules/protocols/json/AwsJson1_0Protocol.ts\nvar AwsJson1_0Protocol = class extends AwsJsonRpcProtocol {\n static {\n __name(this, \"AwsJson1_0Protocol\");\n }\n constructor({ defaultNamespace }) {\n super({\n defaultNamespace\n });\n }\n getShapeId() {\n return \"aws.protocols#awsJson1_0\";\n }\n getJsonRpcVersion() {\n return \"1.0\";\n }\n};\n\n// src/submodules/protocols/json/AwsJson1_1Protocol.ts\nvar AwsJson1_1Protocol = class extends AwsJsonRpcProtocol {\n static {\n __name(this, \"AwsJson1_1Protocol\");\n }\n constructor({ defaultNamespace }) {\n super({\n defaultNamespace\n });\n }\n getShapeId() {\n return \"aws.protocols#awsJson1_1\";\n }\n getJsonRpcVersion() {\n return \"1.1\";\n }\n};\n\n// src/submodules/protocols/json/AwsRestJsonProtocol.ts\nvar import_protocols2 = require(\"@smithy/core/protocols\");\nvar import_schema4 = require(\"@smithy/core/schema\");\nvar import_util_body_length_browser2 = require(\"@smithy/util-body-length-browser\");\nvar AwsRestJsonProtocol = class extends import_protocols2.HttpBindingProtocol {\n static {\n __name(this, \"AwsRestJsonProtocol\");\n }\n serializer;\n deserializer;\n codec;\n constructor({ defaultNamespace }) {\n super({\n defaultNamespace\n });\n const settings = {\n timestampFormat: {\n useTrait: true,\n default: import_schema4.SCHEMA.TIMESTAMP_EPOCH_SECONDS\n },\n httpBindings: true,\n jsonName: true\n };\n this.codec = new JsonCodec(settings);\n this.serializer = new import_protocols2.HttpInterceptingShapeSerializer(this.codec.createSerializer(), settings);\n this.deserializer = new import_protocols2.HttpInterceptingShapeDeserializer(this.codec.createDeserializer(), settings);\n }\n getShapeId() {\n return \"aws.protocols#restJson1\";\n }\n getPayloadCodec() {\n return this.codec;\n }\n setSerdeContext(serdeContext) {\n this.codec.setSerdeContext(serdeContext);\n super.setSerdeContext(serdeContext);\n }\n async serializeRequest(operationSchema, input, context) {\n const request = await super.serializeRequest(operationSchema, input, context);\n const inputSchema = import_schema4.NormalizedSchema.of(operationSchema.input);\n const members = inputSchema.getMemberSchemas();\n if (!request.headers[\"content-type\"]) {\n const httpPayloadMember = Object.values(members).find((m) => {\n return !!m.getMergedTraits().httpPayload;\n });\n if (httpPayloadMember) {\n const mediaType = httpPayloadMember.getMergedTraits().mediaType;\n if (mediaType) {\n request.headers[\"content-type\"] = mediaType;\n } else if (httpPayloadMember.isStringSchema()) {\n request.headers[\"content-type\"] = \"text/plain\";\n } else if (httpPayloadMember.isBlobSchema()) {\n request.headers[\"content-type\"] = \"application/octet-stream\";\n } else {\n request.headers[\"content-type\"] = \"application/json\";\n }\n } else if (!inputSchema.isUnitSchema()) {\n const hasBody = Object.values(members).find((m) => {\n const { httpQuery, httpQueryParams, httpHeader, httpLabel, httpPrefixHeaders } = m.getMergedTraits();\n return !httpQuery && !httpQueryParams && !httpHeader && !httpLabel && httpPrefixHeaders === void 0;\n });\n if (hasBody) {\n request.headers[\"content-type\"] = \"application/json\";\n }\n }\n }\n if (request.headers[\"content-type\"] && !request.body) {\n request.body = \"{}\";\n }\n if (request.body) {\n try {\n request.headers[\"content-length\"] = String((0, import_util_body_length_browser2.calculateBodyLength)(request.body));\n } catch (e) {\n }\n }\n return request;\n }\n async handleError(operationSchema, context, response, dataObject, metadata) {\n const errorIdentifier = loadRestJsonErrorCode(response, dataObject) ?? \"Unknown\";\n let namespace = this.options.defaultNamespace;\n let errorName = errorIdentifier;\n if (errorIdentifier.includes(\"#\")) {\n [namespace, errorName] = errorIdentifier.split(\"#\");\n }\n const registry = import_schema4.TypeRegistry.for(namespace);\n let errorSchema;\n try {\n errorSchema = registry.getSchema(errorIdentifier);\n } catch (e) {\n const baseExceptionSchema = import_schema4.TypeRegistry.for(\"smithy.ts.sdk.synthetic.\" + namespace).getBaseException();\n if (baseExceptionSchema) {\n const ErrorCtor = baseExceptionSchema.ctor;\n throw Object.assign(new ErrorCtor(errorName), dataObject);\n }\n throw new Error(errorName);\n }\n const ns = import_schema4.NormalizedSchema.of(errorSchema);\n const message = dataObject.message ?? dataObject.Message ?? \"Unknown\";\n const exception = new errorSchema.ctor(message);\n await this.deserializeHttpMessage(errorSchema, context, response, dataObject);\n const output = {};\n for (const [name, member] of ns.structIterator()) {\n const target = member.getMergedTraits().jsonName ?? name;\n output[name] = this.codec.createDeserializer().readObject(member, dataObject[target]);\n }\n Object.assign(exception, {\n $metadata: metadata,\n $response: response,\n $fault: ns.getMergedTraits().error,\n message,\n ...output\n });\n throw exception;\n }\n};\n\n// src/submodules/protocols/json/awsExpectUnion.ts\nvar import_smithy_client2 = require(\"@smithy/smithy-client\");\nvar awsExpectUnion = /* @__PURE__ */ __name((value) => {\n if (value == null) {\n return void 0;\n }\n if (typeof value === \"object\" && \"__type\" in value) {\n delete value.__type;\n }\n return (0, import_smithy_client2.expectUnion)(value);\n}, \"awsExpectUnion\");\n\n// src/submodules/protocols/query/AwsQueryProtocol.ts\nvar import_protocols5 = require(\"@smithy/core/protocols\");\nvar import_schema7 = require(\"@smithy/core/schema\");\nvar import_util_body_length_browser3 = require(\"@smithy/util-body-length-browser\");\n\n// src/submodules/protocols/xml/XmlShapeDeserializer.ts\nvar import_protocols3 = require(\"@smithy/core/protocols\");\nvar import_schema5 = require(\"@smithy/core/schema\");\nvar import_smithy_client3 = require(\"@smithy/smithy-client\");\nvar import_util_utf8 = require(\"@smithy/util-utf8\");\nvar import_fast_xml_parser = require(\"fast-xml-parser\");\nvar XmlShapeDeserializer = class extends SerdeContextConfig {\n constructor(settings) {\n super();\n this.settings = settings;\n this.stringDeserializer = new import_protocols3.FromStringShapeDeserializer(settings);\n }\n static {\n __name(this, \"XmlShapeDeserializer\");\n }\n stringDeserializer;\n setSerdeContext(serdeContext) {\n this.serdeContext = serdeContext;\n this.stringDeserializer.setSerdeContext(serdeContext);\n }\n /**\n * @param schema - describing the data.\n * @param bytes - serialized data.\n * @param key - used by AwsQuery to step one additional depth into the object before reading it.\n */\n read(schema, bytes, key) {\n const ns = import_schema5.NormalizedSchema.of(schema);\n const memberSchemas = ns.getMemberSchemas();\n const isEventPayload = ns.isStructSchema() && ns.isMemberSchema() && !!Object.values(memberSchemas).find((memberNs) => {\n return !!memberNs.getMemberTraits().eventPayload;\n });\n if (isEventPayload) {\n const output = {};\n const memberName = Object.keys(memberSchemas)[0];\n const eventMemberSchema = memberSchemas[memberName];\n if (eventMemberSchema.isBlobSchema()) {\n output[memberName] = bytes;\n } else {\n output[memberName] = this.read(memberSchemas[memberName], bytes);\n }\n return output;\n }\n const xmlString = (this.serdeContext?.utf8Encoder ?? import_util_utf8.toUtf8)(bytes);\n const parsedObject = this.parseXml(xmlString);\n return this.readSchema(schema, key ? parsedObject[key] : parsedObject);\n }\n readSchema(_schema, value) {\n const ns = import_schema5.NormalizedSchema.of(_schema);\n const traits = ns.getMergedTraits();\n const schema = ns.getSchema();\n if (ns.isListSchema() && !Array.isArray(value)) {\n return this.readSchema(schema, [value]);\n }\n if (value == null) {\n return value;\n }\n if (typeof value === \"object\") {\n const sparse = !!traits.sparse;\n const flat = !!traits.xmlFlattened;\n if (ns.isListSchema()) {\n const listValue = ns.getValueSchema();\n const buffer2 = [];\n const sourceKey = listValue.getMergedTraits().xmlName ?? \"member\";\n const source = flat ? value : (value[0] ?? value)[sourceKey];\n const sourceArray = Array.isArray(source) ? source : [source];\n for (const v of sourceArray) {\n if (v != null || sparse) {\n buffer2.push(this.readSchema(listValue, v));\n }\n }\n return buffer2;\n }\n const buffer = {};\n if (ns.isMapSchema()) {\n const keyNs = ns.getKeySchema();\n const memberNs = ns.getValueSchema();\n let entries;\n if (flat) {\n entries = Array.isArray(value) ? value : [value];\n } else {\n entries = Array.isArray(value.entry) ? value.entry : [value.entry];\n }\n const keyProperty = keyNs.getMergedTraits().xmlName ?? \"key\";\n const valueProperty = memberNs.getMergedTraits().xmlName ?? \"value\";\n for (const entry of entries) {\n const key = entry[keyProperty];\n const value2 = entry[valueProperty];\n if (value2 != null || sparse) {\n buffer[key] = this.readSchema(memberNs, value2);\n }\n }\n return buffer;\n }\n if (ns.isStructSchema()) {\n for (const [memberName, memberSchema] of ns.structIterator()) {\n const memberTraits = memberSchema.getMergedTraits();\n const xmlObjectKey = !memberTraits.httpPayload ? memberSchema.getMemberTraits().xmlName ?? memberName : memberTraits.xmlName ?? memberSchema.getName();\n if (value[xmlObjectKey] != null) {\n buffer[memberName] = this.readSchema(memberSchema, value[xmlObjectKey]);\n }\n }\n return buffer;\n }\n if (ns.isDocumentSchema()) {\n return value;\n }\n throw new Error(`@aws-sdk/core/protocols - xml deserializer unhandled schema type for ${ns.getName(true)}`);\n } else {\n if (ns.isListSchema()) {\n return [];\n } else if (ns.isMapSchema() || ns.isStructSchema()) {\n return {};\n }\n return this.stringDeserializer.read(ns, value);\n }\n }\n parseXml(xml) {\n if (xml.length) {\n const parser = new import_fast_xml_parser.XMLParser({\n attributeNamePrefix: \"\",\n htmlEntities: true,\n ignoreAttributes: false,\n ignoreDeclaration: true,\n parseTagValue: false,\n trimValues: false,\n tagValueProcessor: /* @__PURE__ */ __name((_, val) => val.trim() === \"\" && val.includes(\"\\n\") ? \"\" : void 0, \"tagValueProcessor\")\n });\n parser.addEntity(\"#xD\", \"\\r\");\n parser.addEntity(\"#10\", \"\\n\");\n let parsedObj;\n try {\n parsedObj = parser.parse(xml, true);\n } catch (e) {\n if (e && typeof e === \"object\") {\n Object.defineProperty(e, \"$responseBodyText\", {\n value: xml\n });\n }\n throw e;\n }\n const textNodeName = \"#text\";\n const key = Object.keys(parsedObj)[0];\n const parsedObjToReturn = parsedObj[key];\n if (parsedObjToReturn[textNodeName]) {\n parsedObjToReturn[key] = parsedObjToReturn[textNodeName];\n delete parsedObjToReturn[textNodeName];\n }\n return (0, import_smithy_client3.getValueFromTextNode)(parsedObjToReturn);\n }\n return {};\n }\n};\n\n// src/submodules/protocols/query/QueryShapeSerializer.ts\nvar import_protocols4 = require(\"@smithy/core/protocols\");\nvar import_schema6 = require(\"@smithy/core/schema\");\nvar import_serde6 = require(\"@smithy/core/serde\");\nvar import_smithy_client4 = require(\"@smithy/smithy-client\");\nvar import_util_base642 = require(\"@smithy/util-base64\");\nvar QueryShapeSerializer = class extends SerdeContextConfig {\n constructor(settings) {\n super();\n this.settings = settings;\n }\n static {\n __name(this, \"QueryShapeSerializer\");\n }\n buffer;\n write(schema, value, prefix = \"\") {\n if (this.buffer === void 0) {\n this.buffer = \"\";\n }\n const ns = import_schema6.NormalizedSchema.of(schema);\n if (prefix && !prefix.endsWith(\".\")) {\n prefix += \".\";\n }\n if (ns.isBlobSchema()) {\n if (typeof value === \"string\" || value instanceof Uint8Array) {\n this.writeKey(prefix);\n this.writeValue((this.serdeContext?.base64Encoder ?? import_util_base642.toBase64)(value));\n }\n } else if (ns.isBooleanSchema() || ns.isNumericSchema() || ns.isStringSchema()) {\n if (value != null) {\n this.writeKey(prefix);\n this.writeValue(String(value));\n }\n } else if (ns.isBigIntegerSchema()) {\n if (value != null) {\n this.writeKey(prefix);\n this.writeValue(String(value));\n }\n } else if (ns.isBigDecimalSchema()) {\n if (value != null) {\n this.writeKey(prefix);\n this.writeValue(value instanceof import_serde6.NumericValue ? value.string : String(value));\n }\n } else if (ns.isTimestampSchema()) {\n if (value instanceof Date) {\n this.writeKey(prefix);\n const format = (0, import_protocols4.determineTimestampFormat)(ns, this.settings);\n switch (format) {\n case import_schema6.SCHEMA.TIMESTAMP_DATE_TIME:\n this.writeValue(value.toISOString().replace(\".000Z\", \"Z\"));\n break;\n case import_schema6.SCHEMA.TIMESTAMP_HTTP_DATE:\n this.writeValue((0, import_smithy_client4.dateToUtcString)(value));\n break;\n case import_schema6.SCHEMA.TIMESTAMP_EPOCH_SECONDS:\n this.writeValue(String(value.getTime() / 1e3));\n break;\n }\n }\n } else if (ns.isDocumentSchema()) {\n throw new Error(`@aws-sdk/core/protocols - QuerySerializer unsupported document type ${ns.getName(true)}`);\n } else if (ns.isListSchema()) {\n if (Array.isArray(value)) {\n if (value.length === 0) {\n if (this.settings.serializeEmptyLists) {\n this.writeKey(prefix);\n this.writeValue(\"\");\n }\n } else {\n const member = ns.getValueSchema();\n const flat = this.settings.flattenLists || ns.getMergedTraits().xmlFlattened;\n let i = 1;\n for (const item of value) {\n if (item == null) {\n continue;\n }\n const suffix = this.getKey(\"member\", member.getMergedTraits().xmlName);\n const key = flat ? `${prefix}${i}` : `${prefix}${suffix}.${i}`;\n this.write(member, item, key);\n ++i;\n }\n }\n }\n } else if (ns.isMapSchema()) {\n if (value && typeof value === \"object\") {\n const keySchema = ns.getKeySchema();\n const memberSchema = ns.getValueSchema();\n const flat = ns.getMergedTraits().xmlFlattened;\n let i = 1;\n for (const [k, v] of Object.entries(value)) {\n if (v == null) {\n continue;\n }\n const keySuffix = this.getKey(\"key\", keySchema.getMergedTraits().xmlName);\n const key = flat ? `${prefix}${i}.${keySuffix}` : `${prefix}entry.${i}.${keySuffix}`;\n const valueSuffix = this.getKey(\"value\", memberSchema.getMergedTraits().xmlName);\n const valueKey = flat ? `${prefix}${i}.${valueSuffix}` : `${prefix}entry.${i}.${valueSuffix}`;\n this.write(keySchema, k, key);\n this.write(memberSchema, v, valueKey);\n ++i;\n }\n }\n } else if (ns.isStructSchema()) {\n if (value && typeof value === \"object\") {\n for (const [memberName, member] of ns.structIterator()) {\n if (value[memberName] == null) {\n continue;\n }\n const suffix = this.getKey(memberName, member.getMergedTraits().xmlName);\n const key = `${prefix}${suffix}`;\n this.write(member, value[memberName], key);\n }\n }\n } else if (ns.isUnitSchema()) {\n } else {\n throw new Error(`@aws-sdk/core/protocols - QuerySerializer unrecognized schema type ${ns.getName(true)}`);\n }\n }\n flush() {\n if (this.buffer === void 0) {\n throw new Error(\"@aws-sdk/core/protocols - QuerySerializer cannot flush with nothing written to buffer.\");\n }\n const str = this.buffer;\n delete this.buffer;\n return str;\n }\n getKey(memberName, xmlName) {\n const key = xmlName ?? memberName;\n if (this.settings.capitalizeKeys) {\n return key[0].toUpperCase() + key.slice(1);\n }\n return key;\n }\n writeKey(key) {\n if (key.endsWith(\".\")) {\n key = key.slice(0, key.length - 1);\n }\n this.buffer += `&${(0, import_protocols4.extendedEncodeURIComponent)(key)}=`;\n }\n writeValue(value) {\n this.buffer += (0, import_protocols4.extendedEncodeURIComponent)(value);\n }\n};\n\n// src/submodules/protocols/query/AwsQueryProtocol.ts\nvar AwsQueryProtocol = class extends import_protocols5.RpcProtocol {\n constructor(options) {\n super({\n defaultNamespace: options.defaultNamespace\n });\n this.options = options;\n const settings = {\n timestampFormat: {\n useTrait: true,\n default: import_schema7.SCHEMA.TIMESTAMP_DATE_TIME\n },\n httpBindings: false,\n xmlNamespace: options.xmlNamespace,\n serviceNamespace: options.defaultNamespace,\n serializeEmptyLists: true\n };\n this.serializer = new QueryShapeSerializer(settings);\n this.deserializer = new XmlShapeDeserializer(settings);\n }\n static {\n __name(this, \"AwsQueryProtocol\");\n }\n serializer;\n deserializer;\n getShapeId() {\n return \"aws.protocols#awsQuery\";\n }\n setSerdeContext(serdeContext) {\n this.serializer.setSerdeContext(serdeContext);\n this.deserializer.setSerdeContext(serdeContext);\n }\n getPayloadCodec() {\n throw new Error(\"AWSQuery protocol has no payload codec.\");\n }\n async serializeRequest(operationSchema, input, context) {\n const request = await super.serializeRequest(operationSchema, input, context);\n if (!request.path.endsWith(\"/\")) {\n request.path += \"/\";\n }\n Object.assign(request.headers, {\n \"content-type\": `application/x-www-form-urlencoded`\n });\n if ((0, import_schema7.deref)(operationSchema.input) === \"unit\" || !request.body) {\n request.body = \"\";\n }\n request.body = `Action=${operationSchema.name.split(\"#\")[1]}&Version=${this.options.version}` + request.body;\n if (request.body.endsWith(\"&\")) {\n request.body = request.body.slice(-1);\n }\n try {\n request.headers[\"content-length\"] = String((0, import_util_body_length_browser3.calculateBodyLength)(request.body));\n } catch (e) {\n }\n return request;\n }\n async deserializeResponse(operationSchema, context, response) {\n const deserializer = this.deserializer;\n const ns = import_schema7.NormalizedSchema.of(operationSchema.output);\n const dataObject = {};\n if (response.statusCode >= 300) {\n const bytes2 = await (0, import_protocols5.collectBody)(response.body, context);\n if (bytes2.byteLength > 0) {\n Object.assign(dataObject, await deserializer.read(import_schema7.SCHEMA.DOCUMENT, bytes2));\n }\n await this.handleError(operationSchema, context, response, dataObject, this.deserializeMetadata(response));\n }\n for (const header in response.headers) {\n const value = response.headers[header];\n delete response.headers[header];\n response.headers[header.toLowerCase()] = value;\n }\n const awsQueryResultKey = ns.isStructSchema() && this.useNestedResult() ? operationSchema.name.split(\"#\")[1] + \"Result\" : void 0;\n const bytes = await (0, import_protocols5.collectBody)(response.body, context);\n if (bytes.byteLength > 0) {\n Object.assign(dataObject, await deserializer.read(ns, bytes, awsQueryResultKey));\n }\n const output = {\n $metadata: this.deserializeMetadata(response),\n ...dataObject\n };\n return output;\n }\n /**\n * EC2 Query overrides this.\n */\n useNestedResult() {\n return true;\n }\n async handleError(operationSchema, context, response, dataObject, metadata) {\n const errorIdentifier = this.loadQueryErrorCode(response, dataObject) ?? \"Unknown\";\n let namespace = this.options.defaultNamespace;\n let errorName = errorIdentifier;\n if (errorIdentifier.includes(\"#\")) {\n [namespace, errorName] = errorIdentifier.split(\"#\");\n }\n const errorDataSource = this.loadQueryError(dataObject);\n const registry = import_schema7.TypeRegistry.for(namespace);\n let errorSchema;\n try {\n errorSchema = registry.find(\n (schema) => import_schema7.NormalizedSchema.of(schema).getMergedTraits().awsQueryError?.[0] === errorName\n );\n if (!errorSchema) {\n errorSchema = registry.getSchema(errorIdentifier);\n }\n } catch (e) {\n const baseExceptionSchema = import_schema7.TypeRegistry.for(\"smithy.ts.sdk.synthetic.\" + namespace).getBaseException();\n if (baseExceptionSchema) {\n const ErrorCtor = baseExceptionSchema.ctor;\n throw Object.assign(new ErrorCtor(errorName), errorDataSource);\n }\n throw new Error(errorName);\n }\n const ns = import_schema7.NormalizedSchema.of(errorSchema);\n const message = this.loadQueryErrorMessage(dataObject);\n const exception = new errorSchema.ctor(message);\n const output = {};\n for (const [name, member] of ns.structIterator()) {\n const target = member.getMergedTraits().xmlName ?? name;\n const value = errorDataSource[target] ?? dataObject[target];\n output[name] = this.deserializer.readSchema(member, value);\n }\n Object.assign(exception, {\n $metadata: metadata,\n $response: response,\n $fault: ns.getMergedTraits().error,\n message,\n ...output\n });\n throw exception;\n }\n /**\n * The variations in the error and error message locations are attributed to\n * divergence between AWS Query and EC2 Query behavior.\n */\n loadQueryErrorCode(output, data) {\n const code = (data.Errors?.[0]?.Error ?? data.Errors?.Error ?? data.Error)?.Code;\n if (code !== void 0) {\n return code;\n }\n if (output.statusCode == 404) {\n return \"NotFound\";\n }\n }\n loadQueryError(data) {\n return data.Errors?.[0]?.Error ?? data.Errors?.Error ?? data.Error;\n }\n loadQueryErrorMessage(data) {\n const errorData = this.loadQueryError(data);\n return errorData?.message ?? errorData?.Message ?? data.message ?? data.Message ?? \"Unknown\";\n }\n};\n\n// src/submodules/protocols/query/AwsEc2QueryProtocol.ts\nvar AwsEc2QueryProtocol = class extends AwsQueryProtocol {\n constructor(options) {\n super(options);\n this.options = options;\n const ec2Settings = {\n capitalizeKeys: true,\n flattenLists: true,\n serializeEmptyLists: false\n };\n Object.assign(this.serializer.settings, ec2Settings);\n }\n static {\n __name(this, \"AwsEc2QueryProtocol\");\n }\n /**\n * EC2 Query reads XResponse.XResult instead of XResponse directly.\n */\n useNestedResult() {\n return false;\n }\n};\n\n// src/submodules/protocols/xml/AwsRestXmlProtocol.ts\nvar import_protocols6 = require(\"@smithy/core/protocols\");\nvar import_schema9 = require(\"@smithy/core/schema\");\nvar import_util_body_length_browser4 = require(\"@smithy/util-body-length-browser\");\n\n// src/submodules/protocols/xml/parseXmlBody.ts\nvar import_smithy_client5 = require(\"@smithy/smithy-client\");\nvar import_fast_xml_parser2 = require(\"fast-xml-parser\");\nvar parseXmlBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {\n if (encoded.length) {\n const parser = new import_fast_xml_parser2.XMLParser({\n attributeNamePrefix: \"\",\n htmlEntities: true,\n ignoreAttributes: false,\n ignoreDeclaration: true,\n parseTagValue: false,\n trimValues: false,\n tagValueProcessor: /* @__PURE__ */ __name((_, val) => val.trim() === \"\" && val.includes(\"\\n\") ? \"\" : void 0, \"tagValueProcessor\")\n });\n parser.addEntity(\"#xD\", \"\\r\");\n parser.addEntity(\"#10\", \"\\n\");\n let parsedObj;\n try {\n parsedObj = parser.parse(encoded, true);\n } catch (e) {\n if (e && typeof e === \"object\") {\n Object.defineProperty(e, \"$responseBodyText\", {\n value: encoded\n });\n }\n throw e;\n }\n const textNodeName = \"#text\";\n const key = Object.keys(parsedObj)[0];\n const parsedObjToReturn = parsedObj[key];\n if (parsedObjToReturn[textNodeName]) {\n parsedObjToReturn[key] = parsedObjToReturn[textNodeName];\n delete parsedObjToReturn[textNodeName];\n }\n return (0, import_smithy_client5.getValueFromTextNode)(parsedObjToReturn);\n }\n return {};\n}), \"parseXmlBody\");\nvar parseXmlErrorBody = /* @__PURE__ */ __name(async (errorBody, context) => {\n const value = await parseXmlBody(errorBody, context);\n if (value.Error) {\n value.Error.message = value.Error.message ?? value.Error.Message;\n }\n return value;\n}, \"parseXmlErrorBody\");\nvar loadRestXmlErrorCode = /* @__PURE__ */ __name((output, data) => {\n if (data?.Error?.Code !== void 0) {\n return data.Error.Code;\n }\n if (data?.Code !== void 0) {\n return data.Code;\n }\n if (output.statusCode == 404) {\n return \"NotFound\";\n }\n}, \"loadRestXmlErrorCode\");\n\n// src/submodules/protocols/xml/XmlShapeSerializer.ts\nvar import_xml_builder = require(\"@aws-sdk/xml-builder\");\nvar import_schema8 = require(\"@smithy/core/schema\");\nvar import_serde7 = require(\"@smithy/core/serde\");\nvar import_smithy_client6 = require(\"@smithy/smithy-client\");\nvar import_util_base643 = require(\"@smithy/util-base64\");\nvar XmlShapeSerializer = class extends SerdeContextConfig {\n constructor(settings) {\n super();\n this.settings = settings;\n }\n static {\n __name(this, \"XmlShapeSerializer\");\n }\n stringBuffer;\n byteBuffer;\n buffer;\n write(schema, value) {\n const ns = import_schema8.NormalizedSchema.of(schema);\n if (ns.isStringSchema() && typeof value === \"string\") {\n this.stringBuffer = value;\n } else if (ns.isBlobSchema()) {\n this.byteBuffer = \"byteLength\" in value ? value : (this.serdeContext?.base64Decoder ?? import_util_base643.fromBase64)(value);\n } else {\n this.buffer = this.writeStruct(ns, value, void 0);\n const traits = ns.getMergedTraits();\n if (traits.httpPayload && !traits.xmlName) {\n this.buffer.withName(ns.getName());\n }\n }\n }\n flush() {\n if (this.byteBuffer !== void 0) {\n const bytes = this.byteBuffer;\n delete this.byteBuffer;\n return bytes;\n }\n if (this.stringBuffer !== void 0) {\n const str = this.stringBuffer;\n delete this.stringBuffer;\n return str;\n }\n const buffer = this.buffer;\n if (this.settings.xmlNamespace) {\n if (!buffer?.attributes?.[\"xmlns\"]) {\n buffer.addAttribute(\"xmlns\", this.settings.xmlNamespace);\n }\n }\n delete this.buffer;\n return buffer.toString();\n }\n writeStruct(ns, value, parentXmlns) {\n const traits = ns.getMergedTraits();\n const name = ns.isMemberSchema() && !traits.httpPayload ? ns.getMemberTraits().xmlName ?? ns.getMemberName() : traits.xmlName ?? ns.getName();\n if (!name || !ns.isStructSchema()) {\n throw new Error(\n `@aws-sdk/core/protocols - xml serializer, cannot write struct with empty name or non-struct, schema=${ns.getName(\n true\n )}.`\n );\n }\n const structXmlNode = import_xml_builder.XmlNode.of(name);\n const [xmlnsAttr, xmlns] = this.getXmlnsAttribute(ns, parentXmlns);\n if (xmlns) {\n structXmlNode.addAttribute(xmlnsAttr, xmlns);\n }\n for (const [memberName, memberSchema] of ns.structIterator()) {\n const val = value[memberName];\n if (val != null) {\n if (memberSchema.getMergedTraits().xmlAttribute) {\n structXmlNode.addAttribute(\n memberSchema.getMergedTraits().xmlName ?? memberName,\n this.writeSimple(memberSchema, val)\n );\n continue;\n }\n if (memberSchema.isListSchema()) {\n this.writeList(memberSchema, val, structXmlNode, xmlns);\n } else if (memberSchema.isMapSchema()) {\n this.writeMap(memberSchema, val, structXmlNode, xmlns);\n } else if (memberSchema.isStructSchema()) {\n structXmlNode.addChildNode(this.writeStruct(memberSchema, val, xmlns));\n } else {\n const memberNode = import_xml_builder.XmlNode.of(memberSchema.getMergedTraits().xmlName ?? memberSchema.getMemberName());\n this.writeSimpleInto(memberSchema, val, memberNode, xmlns);\n structXmlNode.addChildNode(memberNode);\n }\n }\n }\n return structXmlNode;\n }\n writeList(listMember, array, container, parentXmlns) {\n if (!listMember.isMemberSchema()) {\n throw new Error(\n `@aws-sdk/core/protocols - xml serializer, cannot write non-member list: ${listMember.getName(true)}`\n );\n }\n const listTraits = listMember.getMergedTraits();\n const listValueSchema = listMember.getValueSchema();\n const listValueTraits = listValueSchema.getMergedTraits();\n const sparse = !!listValueTraits.sparse;\n const flat = !!listTraits.xmlFlattened;\n const [xmlnsAttr, xmlns] = this.getXmlnsAttribute(listMember, parentXmlns);\n const writeItem = /* @__PURE__ */ __name((container2, value) => {\n if (listValueSchema.isListSchema()) {\n this.writeList(listValueSchema, Array.isArray(value) ? value : [value], container2, xmlns);\n } else if (listValueSchema.isMapSchema()) {\n this.writeMap(listValueSchema, value, container2, xmlns);\n } else if (listValueSchema.isStructSchema()) {\n const struct = this.writeStruct(listValueSchema, value, xmlns);\n container2.addChildNode(\n struct.withName(flat ? listTraits.xmlName ?? listMember.getMemberName() : listValueTraits.xmlName ?? \"member\")\n );\n } else {\n const listItemNode = import_xml_builder.XmlNode.of(\n flat ? listTraits.xmlName ?? listMember.getMemberName() : listValueTraits.xmlName ?? \"member\"\n );\n this.writeSimpleInto(listValueSchema, value, listItemNode, xmlns);\n container2.addChildNode(listItemNode);\n }\n }, \"writeItem\");\n if (flat) {\n for (const value of array) {\n if (sparse || value != null) {\n writeItem(container, value);\n }\n }\n } else {\n const listNode = import_xml_builder.XmlNode.of(listTraits.xmlName ?? listMember.getMemberName());\n if (xmlns) {\n listNode.addAttribute(xmlnsAttr, xmlns);\n }\n for (const value of array) {\n if (sparse || value != null) {\n writeItem(listNode, value);\n }\n }\n container.addChildNode(listNode);\n }\n }\n writeMap(mapMember, map, container, parentXmlns, containerIsMap = false) {\n if (!mapMember.isMemberSchema()) {\n throw new Error(\n `@aws-sdk/core/protocols - xml serializer, cannot write non-member map: ${mapMember.getName(true)}`\n );\n }\n const mapTraits = mapMember.getMergedTraits();\n const mapKeySchema = mapMember.getKeySchema();\n const mapKeyTraits = mapKeySchema.getMergedTraits();\n const keyTag = mapKeyTraits.xmlName ?? \"key\";\n const mapValueSchema = mapMember.getValueSchema();\n const mapValueTraits = mapValueSchema.getMergedTraits();\n const valueTag = mapValueTraits.xmlName ?? \"value\";\n const sparse = !!mapValueTraits.sparse;\n const flat = !!mapTraits.xmlFlattened;\n const [xmlnsAttr, xmlns] = this.getXmlnsAttribute(mapMember, parentXmlns);\n const addKeyValue = /* @__PURE__ */ __name((entry, key, val) => {\n const keyNode = import_xml_builder.XmlNode.of(keyTag, key);\n const [keyXmlnsAttr, keyXmlns] = this.getXmlnsAttribute(mapKeySchema, xmlns);\n if (keyXmlns) {\n keyNode.addAttribute(keyXmlnsAttr, keyXmlns);\n }\n entry.addChildNode(keyNode);\n let valueNode = import_xml_builder.XmlNode.of(valueTag);\n if (mapValueSchema.isListSchema()) {\n this.writeList(mapValueSchema, val, valueNode, xmlns);\n } else if (mapValueSchema.isMapSchema()) {\n this.writeMap(mapValueSchema, val, valueNode, xmlns, true);\n } else if (mapValueSchema.isStructSchema()) {\n valueNode = this.writeStruct(mapValueSchema, val, xmlns);\n } else {\n this.writeSimpleInto(mapValueSchema, val, valueNode, xmlns);\n }\n entry.addChildNode(valueNode);\n }, \"addKeyValue\");\n if (flat) {\n for (const [key, val] of Object.entries(map)) {\n if (sparse || val != null) {\n const entry = import_xml_builder.XmlNode.of(mapTraits.xmlName ?? mapMember.getMemberName());\n addKeyValue(entry, key, val);\n container.addChildNode(entry);\n }\n }\n } else {\n let mapNode;\n if (!containerIsMap) {\n mapNode = import_xml_builder.XmlNode.of(mapTraits.xmlName ?? mapMember.getMemberName());\n if (xmlns) {\n mapNode.addAttribute(xmlnsAttr, xmlns);\n }\n container.addChildNode(mapNode);\n }\n for (const [key, val] of Object.entries(map)) {\n if (sparse || val != null) {\n const entry = import_xml_builder.XmlNode.of(\"entry\");\n addKeyValue(entry, key, val);\n (containerIsMap ? container : mapNode).addChildNode(entry);\n }\n }\n }\n }\n writeSimple(_schema, value) {\n if (null === value) {\n throw new Error(\"@aws-sdk/core/protocols - (XML serializer) cannot write null value.\");\n }\n const ns = import_schema8.NormalizedSchema.of(_schema);\n let nodeContents = null;\n if (value && typeof value === \"object\") {\n if (ns.isBlobSchema()) {\n nodeContents = (this.serdeContext?.base64Encoder ?? import_util_base643.toBase64)(value);\n } else if (ns.isTimestampSchema() && value instanceof Date) {\n const options = this.settings.timestampFormat;\n const format = options.useTrait ? ns.getSchema() === import_schema8.SCHEMA.TIMESTAMP_DEFAULT ? options.default : ns.getSchema() ?? options.default : options.default;\n switch (format) {\n case import_schema8.SCHEMA.TIMESTAMP_DATE_TIME:\n nodeContents = value.toISOString().replace(\".000Z\", \"Z\");\n break;\n case import_schema8.SCHEMA.TIMESTAMP_HTTP_DATE:\n nodeContents = (0, import_smithy_client6.dateToUtcString)(value);\n break;\n case import_schema8.SCHEMA.TIMESTAMP_EPOCH_SECONDS:\n nodeContents = String(value.getTime() / 1e3);\n break;\n default:\n console.warn(\"Missing timestamp format, using http date\", value);\n nodeContents = (0, import_smithy_client6.dateToUtcString)(value);\n break;\n }\n } else if (ns.isBigDecimalSchema() && value) {\n if (value instanceof import_serde7.NumericValue) {\n return value.string;\n }\n return String(value);\n } else if (ns.isMapSchema() || ns.isListSchema()) {\n throw new Error(\n \"@aws-sdk/core/protocols - xml serializer, cannot call _write() on List/Map schema, call writeList or writeMap() instead.\"\n );\n } else {\n throw new Error(\n `@aws-sdk/core/protocols - xml serializer, unhandled schema type for object value and schema: ${ns.getName(\n true\n )}`\n );\n }\n }\n if (ns.isStringSchema() || ns.isBooleanSchema() || ns.isNumericSchema() || ns.isBigIntegerSchema() || ns.isBigDecimalSchema()) {\n nodeContents = String(value);\n }\n if (nodeContents === null) {\n throw new Error(`Unhandled schema-value pair ${ns.getName(true)}=${value}`);\n }\n return nodeContents;\n }\n writeSimpleInto(_schema, value, into, parentXmlns) {\n const nodeContents = this.writeSimple(_schema, value);\n const ns = import_schema8.NormalizedSchema.of(_schema);\n const content = new import_xml_builder.XmlText(nodeContents);\n const [xmlnsAttr, xmlns] = this.getXmlnsAttribute(ns, parentXmlns);\n if (xmlns) {\n into.addAttribute(xmlnsAttr, xmlns);\n }\n into.addChildNode(content);\n }\n getXmlnsAttribute(ns, parentXmlns) {\n const traits = ns.getMergedTraits();\n const [prefix, xmlns] = traits.xmlNamespace ?? [];\n if (xmlns && xmlns !== parentXmlns) {\n return [prefix ? `xmlns:${prefix}` : \"xmlns\", xmlns];\n }\n return [void 0, void 0];\n }\n};\n\n// src/submodules/protocols/xml/XmlCodec.ts\nvar XmlCodec = class extends SerdeContextConfig {\n constructor(settings) {\n super();\n this.settings = settings;\n }\n static {\n __name(this, \"XmlCodec\");\n }\n createSerializer() {\n const serializer = new XmlShapeSerializer(this.settings);\n serializer.setSerdeContext(this.serdeContext);\n return serializer;\n }\n createDeserializer() {\n const deserializer = new XmlShapeDeserializer(this.settings);\n deserializer.setSerdeContext(this.serdeContext);\n return deserializer;\n }\n};\n\n// src/submodules/protocols/xml/AwsRestXmlProtocol.ts\nvar AwsRestXmlProtocol = class extends import_protocols6.HttpBindingProtocol {\n static {\n __name(this, \"AwsRestXmlProtocol\");\n }\n codec;\n serializer;\n deserializer;\n constructor(options) {\n super(options);\n const settings = {\n timestampFormat: {\n useTrait: true,\n default: import_schema9.SCHEMA.TIMESTAMP_DATE_TIME\n },\n httpBindings: true,\n xmlNamespace: options.xmlNamespace,\n serviceNamespace: options.defaultNamespace\n };\n this.codec = new XmlCodec(settings);\n this.serializer = new import_protocols6.HttpInterceptingShapeSerializer(this.codec.createSerializer(), settings);\n this.deserializer = new import_protocols6.HttpInterceptingShapeDeserializer(this.codec.createDeserializer(), settings);\n }\n getPayloadCodec() {\n return this.codec;\n }\n getShapeId() {\n return \"aws.protocols#restXml\";\n }\n async serializeRequest(operationSchema, input, context) {\n const request = await super.serializeRequest(operationSchema, input, context);\n const ns = import_schema9.NormalizedSchema.of(operationSchema.input);\n const members = ns.getMemberSchemas();\n request.path = String(request.path).split(\"/\").filter((segment) => {\n return segment !== \"{Bucket}\";\n }).join(\"/\") || \"/\";\n if (!request.headers[\"content-type\"]) {\n const httpPayloadMember = Object.values(members).find((m) => {\n return !!m.getMergedTraits().httpPayload;\n });\n if (httpPayloadMember) {\n const mediaType = httpPayloadMember.getMergedTraits().mediaType;\n if (mediaType) {\n request.headers[\"content-type\"] = mediaType;\n } else if (httpPayloadMember.isStringSchema()) {\n request.headers[\"content-type\"] = \"text/plain\";\n } else if (httpPayloadMember.isBlobSchema()) {\n request.headers[\"content-type\"] = \"application/octet-stream\";\n } else {\n request.headers[\"content-type\"] = \"application/xml\";\n }\n } else if (!ns.isUnitSchema()) {\n const hasBody = Object.values(members).find((m) => {\n const { httpQuery, httpQueryParams, httpHeader, httpLabel, httpPrefixHeaders } = m.getMergedTraits();\n return !httpQuery && !httpQueryParams && !httpHeader && !httpLabel && httpPrefixHeaders === void 0;\n });\n if (hasBody) {\n request.headers[\"content-type\"] = \"application/xml\";\n }\n }\n }\n if (request.headers[\"content-type\"] === \"application/xml\") {\n if (typeof request.body === \"string\") {\n request.body = '' + request.body;\n }\n }\n if (request.body) {\n try {\n request.headers[\"content-length\"] = String((0, import_util_body_length_browser4.calculateBodyLength)(request.body));\n } catch (e) {\n }\n }\n return request;\n }\n async deserializeResponse(operationSchema, context, response) {\n return super.deserializeResponse(operationSchema, context, response);\n }\n async handleError(operationSchema, context, response, dataObject, metadata) {\n const errorIdentifier = loadRestXmlErrorCode(response, dataObject) ?? \"Unknown\";\n let namespace = this.options.defaultNamespace;\n let errorName = errorIdentifier;\n if (errorIdentifier.includes(\"#\")) {\n [namespace, errorName] = errorIdentifier.split(\"#\");\n }\n const registry = import_schema9.TypeRegistry.for(namespace);\n let errorSchema;\n try {\n errorSchema = registry.getSchema(errorIdentifier);\n } catch (e) {\n const baseExceptionSchema = import_schema9.TypeRegistry.for(\"smithy.ts.sdk.synthetic.\" + namespace).getBaseException();\n if (baseExceptionSchema) {\n const ErrorCtor = baseExceptionSchema.ctor;\n throw Object.assign(new ErrorCtor(errorName), dataObject);\n }\n throw new Error(errorName);\n }\n const ns = import_schema9.NormalizedSchema.of(errorSchema);\n const message = dataObject.Error?.message ?? dataObject.Error?.Message ?? dataObject.message ?? dataObject.Message ?? \"Unknown\";\n const exception = new errorSchema.ctor(message);\n await this.deserializeHttpMessage(errorSchema, context, response, dataObject);\n const output = {};\n for (const [name, member] of ns.structIterator()) {\n const target = member.getMergedTraits().xmlName ?? name;\n const value = dataObject.Error?.[target] ?? dataObject[target];\n output[name] = this.codec.createDeserializer().readSchema(member, value);\n }\n Object.assign(exception, {\n $metadata: metadata,\n $response: response,\n $fault: ns.getMergedTraits().error,\n message,\n ...output\n });\n throw exception;\n }\n};\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n AwsEc2QueryProtocol,\n AwsJson1_0Protocol,\n AwsJson1_1Protocol,\n AwsJsonRpcProtocol,\n AwsQueryProtocol,\n AwsRestJsonProtocol,\n AwsRestXmlProtocol,\n JsonCodec,\n JsonShapeDeserializer,\n JsonShapeSerializer,\n XmlCodec,\n XmlShapeDeserializer,\n XmlShapeSerializer,\n _toBool,\n _toNum,\n _toStr,\n awsExpectUnion,\n loadRestJsonErrorCode,\n loadRestXmlErrorCode,\n parseJsonBody,\n parseJsonErrorBody,\n parseXmlBody,\n parseXmlErrorBody\n});\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __esm = (fn, res) => function __init() {\n return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;\n};\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/loadCognitoIdentity.ts\nvar loadCognitoIdentity_exports = {};\n__export(loadCognitoIdentity_exports, {\n CognitoIdentityClient: () => import_client_cognito_identity.CognitoIdentityClient,\n GetCredentialsForIdentityCommand: () => import_client_cognito_identity.GetCredentialsForIdentityCommand,\n GetIdCommand: () => import_client_cognito_identity.GetIdCommand\n});\nvar import_client_cognito_identity;\nvar init_loadCognitoIdentity = __esm({\n \"src/loadCognitoIdentity.ts\"() {\n \"use strict\";\n import_client_cognito_identity = require(\"@aws-sdk/client-cognito-identity\");\n }\n});\n\n// src/index.ts\nvar index_exports = {};\n__export(index_exports, {\n fromCognitoIdentity: () => fromCognitoIdentity,\n fromCognitoIdentityPool: () => fromCognitoIdentityPool\n});\nmodule.exports = __toCommonJS(index_exports);\n\n// src/fromCognitoIdentity.ts\nvar import_property_provider = require(\"@smithy/property-provider\");\n\n// src/resolveLogins.ts\nfunction resolveLogins(logins) {\n return Promise.all(\n Object.keys(logins).reduce((arr, name) => {\n const tokenOrProvider = logins[name];\n if (typeof tokenOrProvider === \"string\") {\n arr.push([name, tokenOrProvider]);\n } else {\n arr.push(tokenOrProvider().then((token) => [name, token]));\n }\n return arr;\n }, [])\n ).then(\n (resolvedPairs) => resolvedPairs.reduce((logins2, [key, value]) => {\n logins2[key] = value;\n return logins2;\n }, {})\n );\n}\n__name(resolveLogins, \"resolveLogins\");\n\n// src/fromCognitoIdentity.ts\nfunction fromCognitoIdentity(parameters) {\n return async (awsIdentityProperties) => {\n parameters.logger?.debug(\"@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity\");\n const { GetCredentialsForIdentityCommand: GetCredentialsForIdentityCommand2, CognitoIdentityClient: CognitoIdentityClient2 } = await Promise.resolve().then(() => (init_loadCognitoIdentity(), loadCognitoIdentity_exports));\n const fromConfigs = /* @__PURE__ */ __name((property) => parameters.clientConfig?.[property] ?? parameters.parentClientConfig?.[property] ?? awsIdentityProperties?.callerClientConfig?.[property], \"fromConfigs\");\n const {\n Credentials: {\n AccessKeyId = throwOnMissingAccessKeyId(parameters.logger),\n Expiration,\n SecretKey = throwOnMissingSecretKey(parameters.logger),\n SessionToken\n } = throwOnMissingCredentials(parameters.logger)\n } = await (parameters.client ?? new CognitoIdentityClient2(\n Object.assign({}, parameters.clientConfig ?? {}, {\n region: fromConfigs(\"region\"),\n profile: fromConfigs(\"profile\")\n })\n )).send(\n new GetCredentialsForIdentityCommand2({\n CustomRoleArn: parameters.customRoleArn,\n IdentityId: parameters.identityId,\n Logins: parameters.logins ? await resolveLogins(parameters.logins) : void 0\n })\n );\n return {\n identityId: parameters.identityId,\n accessKeyId: AccessKeyId,\n secretAccessKey: SecretKey,\n sessionToken: SessionToken,\n expiration: Expiration\n };\n };\n}\n__name(fromCognitoIdentity, \"fromCognitoIdentity\");\nfunction throwOnMissingAccessKeyId(logger) {\n throw new import_property_provider.CredentialsProviderError(\"Response from Amazon Cognito contained no access key ID\", { logger });\n}\n__name(throwOnMissingAccessKeyId, \"throwOnMissingAccessKeyId\");\nfunction throwOnMissingCredentials(logger) {\n throw new import_property_provider.CredentialsProviderError(\"Response from Amazon Cognito contained no credentials\", { logger });\n}\n__name(throwOnMissingCredentials, \"throwOnMissingCredentials\");\nfunction throwOnMissingSecretKey(logger) {\n throw new import_property_provider.CredentialsProviderError(\"Response from Amazon Cognito contained no secret key\", { logger });\n}\n__name(throwOnMissingSecretKey, \"throwOnMissingSecretKey\");\n\n// src/fromCognitoIdentityPool.ts\n\n\n// src/IndexedDbStorage.ts\nvar STORE_NAME = \"IdentityIds\";\nvar IndexedDbStorage = class {\n constructor(dbName = \"aws:cognito-identity-ids\") {\n this.dbName = dbName;\n }\n static {\n __name(this, \"IndexedDbStorage\");\n }\n getItem(key) {\n return this.withObjectStore(\"readonly\", (store) => {\n const req = store.get(key);\n return new Promise((resolve) => {\n req.onerror = () => resolve(null);\n req.onsuccess = () => resolve(req.result ? req.result.value : null);\n });\n }).catch(() => null);\n }\n removeItem(key) {\n return this.withObjectStore(\"readwrite\", (store) => {\n const req = store.delete(key);\n return new Promise((resolve, reject) => {\n req.onerror = () => reject(req.error);\n req.onsuccess = () => resolve();\n });\n });\n }\n setItem(id, value) {\n return this.withObjectStore(\"readwrite\", (store) => {\n const req = store.put({ id, value });\n return new Promise((resolve, reject) => {\n req.onerror = () => reject(req.error);\n req.onsuccess = () => resolve();\n });\n });\n }\n getDb() {\n const openDbRequest = self.indexedDB.open(this.dbName, 1);\n return new Promise((resolve, reject) => {\n openDbRequest.onsuccess = () => {\n resolve(openDbRequest.result);\n };\n openDbRequest.onerror = () => {\n reject(openDbRequest.error);\n };\n openDbRequest.onblocked = () => {\n reject(new Error(\"Unable to access DB\"));\n };\n openDbRequest.onupgradeneeded = () => {\n const db = openDbRequest.result;\n db.onerror = () => {\n reject(new Error(\"Failed to create object store\"));\n };\n db.createObjectStore(STORE_NAME, { keyPath: \"id\" });\n };\n });\n }\n withObjectStore(mode, action) {\n return this.getDb().then((db) => {\n const tx = db.transaction(STORE_NAME, mode);\n tx.oncomplete = () => db.close();\n return new Promise((resolve, reject) => {\n tx.onerror = () => reject(tx.error);\n resolve(action(tx.objectStore(STORE_NAME)));\n }).catch((err) => {\n db.close();\n throw err;\n });\n });\n }\n};\n\n// src/InMemoryStorage.ts\nvar InMemoryStorage = class {\n constructor(store = {}) {\n this.store = store;\n }\n static {\n __name(this, \"InMemoryStorage\");\n }\n getItem(key) {\n if (key in this.store) {\n return this.store[key];\n }\n return null;\n }\n removeItem(key) {\n delete this.store[key];\n }\n setItem(key, value) {\n this.store[key] = value;\n }\n};\n\n// src/localStorage.ts\nvar inMemoryStorage = new InMemoryStorage();\nfunction localStorage() {\n if (typeof self === \"object\" && self.indexedDB) {\n return new IndexedDbStorage();\n }\n if (typeof window === \"object\" && window.localStorage) {\n return window.localStorage;\n }\n return inMemoryStorage;\n}\n__name(localStorage, \"localStorage\");\n\n// src/fromCognitoIdentityPool.ts\nfunction fromCognitoIdentityPool({\n accountId,\n cache = localStorage(),\n client,\n clientConfig,\n customRoleArn,\n identityPoolId,\n logins,\n userIdentifier = !logins || Object.keys(logins).length === 0 ? \"ANONYMOUS\" : void 0,\n logger,\n parentClientConfig\n}) {\n logger?.debug(\"@aws-sdk/credential-provider-cognito-identity - fromCognitoIdentity\");\n const cacheKey = userIdentifier ? `aws:cognito-identity-credentials:${identityPoolId}:${userIdentifier}` : void 0;\n let provider = /* @__PURE__ */ __name(async (awsIdentityProperties) => {\n const { GetIdCommand: GetIdCommand2, CognitoIdentityClient: CognitoIdentityClient2 } = await Promise.resolve().then(() => (init_loadCognitoIdentity(), loadCognitoIdentity_exports));\n const fromConfigs = /* @__PURE__ */ __name((property) => clientConfig?.[property] ?? parentClientConfig?.[property] ?? awsIdentityProperties?.callerClientConfig?.[property], \"fromConfigs\");\n const _client = client ?? new CognitoIdentityClient2(\n Object.assign({}, clientConfig ?? {}, {\n region: fromConfigs(\"region\"),\n profile: fromConfigs(\"profile\")\n })\n );\n let identityId = cacheKey && await cache.getItem(cacheKey);\n if (!identityId) {\n const { IdentityId = throwOnMissingId(logger) } = await _client.send(\n new GetIdCommand2({\n AccountId: accountId,\n IdentityPoolId: identityPoolId,\n Logins: logins ? await resolveLogins(logins) : void 0\n })\n );\n identityId = IdentityId;\n if (cacheKey) {\n Promise.resolve(cache.setItem(cacheKey, identityId)).catch(() => {\n });\n }\n }\n provider = fromCognitoIdentity({\n client: _client,\n customRoleArn,\n logins,\n identityId\n });\n return provider(awsIdentityProperties);\n }, \"provider\");\n return (awsIdentityProperties) => provider(awsIdentityProperties).catch(async (err) => {\n if (cacheKey) {\n Promise.resolve(cache.removeItem(cacheKey)).catch(() => {\n });\n }\n throw err;\n });\n}\n__name(fromCognitoIdentityPool, \"fromCognitoIdentityPool\");\nfunction throwOnMissingId(logger) {\n throw new import_property_provider.CredentialsProviderError(\"Response from Amazon Cognito contained no identity ID\", { logger });\n}\n__name(throwOnMissingId, \"throwOnMissingId\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n fromCognitoIdentity,\n fromCognitoIdentityPool\n});\n\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar index_exports = {};\n__export(index_exports, {\n ENV_ACCOUNT_ID: () => ENV_ACCOUNT_ID,\n ENV_CREDENTIAL_SCOPE: () => ENV_CREDENTIAL_SCOPE,\n ENV_EXPIRATION: () => ENV_EXPIRATION,\n ENV_KEY: () => ENV_KEY,\n ENV_SECRET: () => ENV_SECRET,\n ENV_SESSION: () => ENV_SESSION,\n fromEnv: () => fromEnv\n});\nmodule.exports = __toCommonJS(index_exports);\n\n// src/fromEnv.ts\nvar import_client = require(\"@aws-sdk/core/client\");\nvar import_property_provider = require(\"@smithy/property-provider\");\nvar ENV_KEY = \"AWS_ACCESS_KEY_ID\";\nvar ENV_SECRET = \"AWS_SECRET_ACCESS_KEY\";\nvar ENV_SESSION = \"AWS_SESSION_TOKEN\";\nvar ENV_EXPIRATION = \"AWS_CREDENTIAL_EXPIRATION\";\nvar ENV_CREDENTIAL_SCOPE = \"AWS_CREDENTIAL_SCOPE\";\nvar ENV_ACCOUNT_ID = \"AWS_ACCOUNT_ID\";\nvar fromEnv = /* @__PURE__ */ __name((init) => async () => {\n init?.logger?.debug(\"@aws-sdk/credential-provider-env - fromEnv\");\n const accessKeyId = process.env[ENV_KEY];\n const secretAccessKey = process.env[ENV_SECRET];\n const sessionToken = process.env[ENV_SESSION];\n const expiry = process.env[ENV_EXPIRATION];\n const credentialScope = process.env[ENV_CREDENTIAL_SCOPE];\n const accountId = process.env[ENV_ACCOUNT_ID];\n if (accessKeyId && secretAccessKey) {\n const credentials = {\n accessKeyId,\n secretAccessKey,\n ...sessionToken && { sessionToken },\n ...expiry && { expiration: new Date(expiry) },\n ...credentialScope && { credentialScope },\n ...accountId && { accountId }\n };\n (0, import_client.setCredentialFeature)(credentials, \"CREDENTIALS_ENV_VARS\", \"g\");\n return credentials;\n }\n throw new import_property_provider.CredentialsProviderError(\"Unable to find environment variable credentials.\", { logger: init?.logger });\n}, \"fromEnv\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n ENV_KEY,\n ENV_SECRET,\n ENV_SESSION,\n ENV_EXPIRATION,\n ENV_CREDENTIAL_SCOPE,\n ENV_ACCOUNT_ID,\n fromEnv\n});\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.checkUrl = void 0;\nconst property_provider_1 = require(\"@smithy/property-provider\");\nconst LOOPBACK_CIDR_IPv4 = \"127.0.0.0/8\";\nconst LOOPBACK_CIDR_IPv6 = \"::1/128\";\nconst ECS_CONTAINER_HOST = \"169.254.170.2\";\nconst EKS_CONTAINER_HOST_IPv4 = \"169.254.170.23\";\nconst EKS_CONTAINER_HOST_IPv6 = \"[fd00:ec2::23]\";\nconst checkUrl = (url, logger) => {\n if (url.protocol === \"https:\") {\n return;\n }\n if (url.hostname === ECS_CONTAINER_HOST ||\n url.hostname === EKS_CONTAINER_HOST_IPv4 ||\n url.hostname === EKS_CONTAINER_HOST_IPv6) {\n return;\n }\n if (url.hostname.includes(\"[\")) {\n if (url.hostname === \"[::1]\" || url.hostname === \"[0000:0000:0000:0000:0000:0000:0000:0001]\") {\n return;\n }\n }\n else {\n if (url.hostname === \"localhost\") {\n return;\n }\n const ipComponents = url.hostname.split(\".\");\n const inRange = (component) => {\n const num = parseInt(component, 10);\n return 0 <= num && num <= 255;\n };\n if (ipComponents[0] === \"127\" &&\n inRange(ipComponents[1]) &&\n inRange(ipComponents[2]) &&\n inRange(ipComponents[3]) &&\n ipComponents.length === 4) {\n return;\n }\n }\n throw new property_provider_1.CredentialsProviderError(`URL not accepted. It must either be HTTPS or match one of the following:\n - loopback CIDR 127.0.0.0/8 or [::1/128]\n - ECS container host 169.254.170.2\n - EKS container host 169.254.170.23 or [fd00:ec2::23]`, { logger });\n};\nexports.checkUrl = checkUrl;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromHttp = void 0;\nconst tslib_1 = require(\"tslib\");\nconst client_1 = require(\"@aws-sdk/core/client\");\nconst node_http_handler_1 = require(\"@smithy/node-http-handler\");\nconst property_provider_1 = require(\"@smithy/property-provider\");\nconst promises_1 = tslib_1.__importDefault(require(\"fs/promises\"));\nconst checkUrl_1 = require(\"./checkUrl\");\nconst requestHelpers_1 = require(\"./requestHelpers\");\nconst retry_wrapper_1 = require(\"./retry-wrapper\");\nconst AWS_CONTAINER_CREDENTIALS_RELATIVE_URI = \"AWS_CONTAINER_CREDENTIALS_RELATIVE_URI\";\nconst DEFAULT_LINK_LOCAL_HOST = \"http://169.254.170.2\";\nconst AWS_CONTAINER_CREDENTIALS_FULL_URI = \"AWS_CONTAINER_CREDENTIALS_FULL_URI\";\nconst AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE = \"AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE\";\nconst AWS_CONTAINER_AUTHORIZATION_TOKEN = \"AWS_CONTAINER_AUTHORIZATION_TOKEN\";\nconst fromHttp = (options = {}) => {\n options.logger?.debug(\"@aws-sdk/credential-provider-http - fromHttp\");\n let host;\n const relative = options.awsContainerCredentialsRelativeUri ?? process.env[AWS_CONTAINER_CREDENTIALS_RELATIVE_URI];\n const full = options.awsContainerCredentialsFullUri ?? process.env[AWS_CONTAINER_CREDENTIALS_FULL_URI];\n const token = options.awsContainerAuthorizationToken ?? process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN];\n const tokenFile = options.awsContainerAuthorizationTokenFile ?? process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE];\n const warn = options.logger?.constructor?.name === \"NoOpLogger\" || !options.logger ? console.warn : options.logger.warn;\n if (relative && full) {\n warn(\"@aws-sdk/credential-provider-http: \" +\n \"you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri.\");\n warn(\"awsContainerCredentialsFullUri will take precedence.\");\n }\n if (token && tokenFile) {\n warn(\"@aws-sdk/credential-provider-http: \" +\n \"you have set both awsContainerAuthorizationToken and awsContainerAuthorizationTokenFile.\");\n warn(\"awsContainerAuthorizationToken will take precedence.\");\n }\n if (full) {\n host = full;\n }\n else if (relative) {\n host = `${DEFAULT_LINK_LOCAL_HOST}${relative}`;\n }\n else {\n throw new property_provider_1.CredentialsProviderError(`No HTTP credential provider host provided.\nSet AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`, { logger: options.logger });\n }\n const url = new URL(host);\n (0, checkUrl_1.checkUrl)(url, options.logger);\n const requestHandler = new node_http_handler_1.NodeHttpHandler({\n requestTimeout: options.timeout ?? 1000,\n connectionTimeout: options.timeout ?? 1000,\n });\n return (0, retry_wrapper_1.retryWrapper)(async () => {\n const request = (0, requestHelpers_1.createGetRequest)(url);\n if (token) {\n request.headers.Authorization = token;\n }\n else if (tokenFile) {\n request.headers.Authorization = (await promises_1.default.readFile(tokenFile)).toString();\n }\n try {\n const result = await requestHandler.handle(request);\n return (0, requestHelpers_1.getCredentials)(result.response).then((creds) => (0, client_1.setCredentialFeature)(creds, \"CREDENTIALS_HTTP\", \"z\"));\n }\n catch (e) {\n throw new property_provider_1.CredentialsProviderError(String(e), { logger: options.logger });\n }\n }, options.maxRetries ?? 3, options.timeout ?? 1000);\n};\nexports.fromHttp = fromHttp;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createGetRequest = createGetRequest;\nexports.getCredentials = getCredentials;\nconst property_provider_1 = require(\"@smithy/property-provider\");\nconst protocol_http_1 = require(\"@smithy/protocol-http\");\nconst smithy_client_1 = require(\"@smithy/smithy-client\");\nconst util_stream_1 = require(\"@smithy/util-stream\");\nfunction createGetRequest(url) {\n return new protocol_http_1.HttpRequest({\n protocol: url.protocol,\n hostname: url.hostname,\n port: Number(url.port),\n path: url.pathname,\n query: Array.from(url.searchParams.entries()).reduce((acc, [k, v]) => {\n acc[k] = v;\n return acc;\n }, {}),\n fragment: url.hash,\n });\n}\nasync function getCredentials(response, logger) {\n const stream = (0, util_stream_1.sdkStreamMixin)(response.body);\n const str = await stream.transformToString();\n if (response.statusCode === 200) {\n const parsed = JSON.parse(str);\n if (typeof parsed.AccessKeyId !== \"string\" ||\n typeof parsed.SecretAccessKey !== \"string\" ||\n typeof parsed.Token !== \"string\" ||\n typeof parsed.Expiration !== \"string\") {\n throw new property_provider_1.CredentialsProviderError(\"HTTP credential provider response not of the required format, an object matching: \" +\n \"{ AccessKeyId: string, SecretAccessKey: string, Token: string, Expiration: string(rfc3339) }\", { logger });\n }\n return {\n accessKeyId: parsed.AccessKeyId,\n secretAccessKey: parsed.SecretAccessKey,\n sessionToken: parsed.Token,\n expiration: (0, smithy_client_1.parseRfc3339DateTime)(parsed.Expiration),\n };\n }\n if (response.statusCode >= 400 && response.statusCode < 500) {\n let parsedBody = {};\n try {\n parsedBody = JSON.parse(str);\n }\n catch (e) { }\n throw Object.assign(new property_provider_1.CredentialsProviderError(`Server responded with status: ${response.statusCode}`, { logger }), {\n Code: parsedBody.Code,\n Message: parsedBody.Message,\n });\n }\n throw new property_provider_1.CredentialsProviderError(`Server responded with status: ${response.statusCode}`, { logger });\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.retryWrapper = void 0;\nconst retryWrapper = (toRetry, maxRetries, delayMs) => {\n return async () => {\n for (let i = 0; i < maxRetries; ++i) {\n try {\n return await toRetry();\n }\n catch (e) {\n await new Promise((resolve) => setTimeout(resolve, delayMs));\n }\n }\n return await toRetry();\n };\n};\nexports.retryWrapper = retryWrapper;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromHttp = void 0;\nvar fromHttp_1 = require(\"./fromHttp/fromHttp\");\nObject.defineProperty(exports, \"fromHttp\", { enumerable: true, get: function () { return fromHttp_1.fromHttp; } });\n","\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar index_exports = {};\n__export(index_exports, {\n fromIni: () => fromIni\n});\nmodule.exports = __toCommonJS(index_exports);\n\n// src/fromIni.ts\n\n\n// src/resolveProfileData.ts\n\n\n// src/resolveAssumeRoleCredentials.ts\n\n\nvar import_shared_ini_file_loader = require(\"@smithy/shared-ini-file-loader\");\n\n// src/resolveCredentialSource.ts\nvar import_client = require(\"@aws-sdk/core/client\");\nvar import_property_provider = require(\"@smithy/property-provider\");\nvar resolveCredentialSource = /* @__PURE__ */ __name((credentialSource, profileName, logger) => {\n const sourceProvidersMap = {\n EcsContainer: /* @__PURE__ */ __name(async (options) => {\n const { fromHttp } = await Promise.resolve().then(() => __toESM(require(\"@aws-sdk/credential-provider-http\")));\n const { fromContainerMetadata } = await Promise.resolve().then(() => __toESM(require(\"@smithy/credential-provider-imds\")));\n logger?.debug(\"@aws-sdk/credential-provider-ini - credential_source is EcsContainer\");\n return async () => (0, import_property_provider.chain)(fromHttp(options ?? {}), fromContainerMetadata(options))().then(setNamedProvider);\n }, \"EcsContainer\"),\n Ec2InstanceMetadata: /* @__PURE__ */ __name(async (options) => {\n logger?.debug(\"@aws-sdk/credential-provider-ini - credential_source is Ec2InstanceMetadata\");\n const { fromInstanceMetadata } = await Promise.resolve().then(() => __toESM(require(\"@smithy/credential-provider-imds\")));\n return async () => fromInstanceMetadata(options)().then(setNamedProvider);\n }, \"Ec2InstanceMetadata\"),\n Environment: /* @__PURE__ */ __name(async (options) => {\n logger?.debug(\"@aws-sdk/credential-provider-ini - credential_source is Environment\");\n const { fromEnv } = await Promise.resolve().then(() => __toESM(require(\"@aws-sdk/credential-provider-env\")));\n return async () => fromEnv(options)().then(setNamedProvider);\n }, \"Environment\")\n };\n if (credentialSource in sourceProvidersMap) {\n return sourceProvidersMap[credentialSource];\n } else {\n throw new import_property_provider.CredentialsProviderError(\n `Unsupported credential source in profile ${profileName}. Got ${credentialSource}, expected EcsContainer or Ec2InstanceMetadata or Environment.`,\n { logger }\n );\n }\n}, \"resolveCredentialSource\");\nvar setNamedProvider = /* @__PURE__ */ __name((creds) => (0, import_client.setCredentialFeature)(creds, \"CREDENTIALS_PROFILE_NAMED_PROVIDER\", \"p\"), \"setNamedProvider\");\n\n// src/resolveAssumeRoleCredentials.ts\nvar isAssumeRoleProfile = /* @__PURE__ */ __name((arg, { profile = \"default\", logger } = {}) => {\n return Boolean(arg) && typeof arg === \"object\" && typeof arg.role_arn === \"string\" && [\"undefined\", \"string\"].indexOf(typeof arg.role_session_name) > -1 && [\"undefined\", \"string\"].indexOf(typeof arg.external_id) > -1 && [\"undefined\", \"string\"].indexOf(typeof arg.mfa_serial) > -1 && (isAssumeRoleWithSourceProfile(arg, { profile, logger }) || isCredentialSourceProfile(arg, { profile, logger }));\n}, \"isAssumeRoleProfile\");\nvar isAssumeRoleWithSourceProfile = /* @__PURE__ */ __name((arg, { profile, logger }) => {\n const withSourceProfile = typeof arg.source_profile === \"string\" && typeof arg.credential_source === \"undefined\";\n if (withSourceProfile) {\n logger?.debug?.(` ${profile} isAssumeRoleWithSourceProfile source_profile=${arg.source_profile}`);\n }\n return withSourceProfile;\n}, \"isAssumeRoleWithSourceProfile\");\nvar isCredentialSourceProfile = /* @__PURE__ */ __name((arg, { profile, logger }) => {\n const withProviderProfile = typeof arg.credential_source === \"string\" && typeof arg.source_profile === \"undefined\";\n if (withProviderProfile) {\n logger?.debug?.(` ${profile} isCredentialSourceProfile credential_source=${arg.credential_source}`);\n }\n return withProviderProfile;\n}, \"isCredentialSourceProfile\");\nvar resolveAssumeRoleCredentials = /* @__PURE__ */ __name(async (profileName, profiles, options, visitedProfiles = {}) => {\n options.logger?.debug(\"@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)\");\n const profileData = profiles[profileName];\n const { source_profile, region } = profileData;\n if (!options.roleAssumer) {\n const { getDefaultRoleAssumer } = await Promise.resolve().then(() => __toESM(require(\"@aws-sdk/nested-clients/sts\")));\n options.roleAssumer = getDefaultRoleAssumer(\n {\n ...options.clientConfig,\n credentialProviderLogger: options.logger,\n parentClientConfig: {\n ...options?.parentClientConfig,\n region: region ?? options?.parentClientConfig?.region\n }\n },\n options.clientPlugins\n );\n }\n if (source_profile && source_profile in visitedProfiles) {\n throw new import_property_provider.CredentialsProviderError(\n `Detected a cycle attempting to resolve credentials for profile ${(0, import_shared_ini_file_loader.getProfileName)(options)}. Profiles visited: ` + Object.keys(visitedProfiles).join(\", \"),\n { logger: options.logger }\n );\n }\n options.logger?.debug(\n `@aws-sdk/credential-provider-ini - finding credential resolver using ${source_profile ? `source_profile=[${source_profile}]` : `profile=[${profileName}]`}`\n );\n const sourceCredsProvider = source_profile ? resolveProfileData(\n source_profile,\n profiles,\n options,\n {\n ...visitedProfiles,\n [source_profile]: true\n },\n isCredentialSourceWithoutRoleArn(profiles[source_profile] ?? {})\n ) : (await resolveCredentialSource(profileData.credential_source, profileName, options.logger)(options))();\n if (isCredentialSourceWithoutRoleArn(profileData)) {\n return sourceCredsProvider.then((creds) => (0, import_client.setCredentialFeature)(creds, \"CREDENTIALS_PROFILE_SOURCE_PROFILE\", \"o\"));\n } else {\n const params = {\n RoleArn: profileData.role_arn,\n RoleSessionName: profileData.role_session_name || `aws-sdk-js-${Date.now()}`,\n ExternalId: profileData.external_id,\n DurationSeconds: parseInt(profileData.duration_seconds || \"3600\", 10)\n };\n const { mfa_serial } = profileData;\n if (mfa_serial) {\n if (!options.mfaCodeProvider) {\n throw new import_property_provider.CredentialsProviderError(\n `Profile ${profileName} requires multi-factor authentication, but no MFA code callback was provided.`,\n { logger: options.logger, tryNextLink: false }\n );\n }\n params.SerialNumber = mfa_serial;\n params.TokenCode = await options.mfaCodeProvider(mfa_serial);\n }\n const sourceCreds = await sourceCredsProvider;\n return options.roleAssumer(sourceCreds, params).then(\n (creds) => (0, import_client.setCredentialFeature)(creds, \"CREDENTIALS_PROFILE_SOURCE_PROFILE\", \"o\")\n );\n }\n}, \"resolveAssumeRoleCredentials\");\nvar isCredentialSourceWithoutRoleArn = /* @__PURE__ */ __name((section) => {\n return !section.role_arn && !!section.credential_source;\n}, \"isCredentialSourceWithoutRoleArn\");\n\n// src/resolveProcessCredentials.ts\n\nvar isProcessProfile = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === \"object\" && typeof arg.credential_process === \"string\", \"isProcessProfile\");\nvar resolveProcessCredentials = /* @__PURE__ */ __name(async (options, profile) => Promise.resolve().then(() => __toESM(require(\"@aws-sdk/credential-provider-process\"))).then(\n ({ fromProcess }) => fromProcess({\n ...options,\n profile\n })().then((creds) => (0, import_client.setCredentialFeature)(creds, \"CREDENTIALS_PROFILE_PROCESS\", \"v\"))\n), \"resolveProcessCredentials\");\n\n// src/resolveSsoCredentials.ts\n\nvar resolveSsoCredentials = /* @__PURE__ */ __name(async (profile, profileData, options = {}) => {\n const { fromSSO } = await Promise.resolve().then(() => __toESM(require(\"@aws-sdk/credential-provider-sso\")));\n return fromSSO({\n profile,\n logger: options.logger,\n parentClientConfig: options.parentClientConfig,\n clientConfig: options.clientConfig\n })().then((creds) => {\n if (profileData.sso_session) {\n return (0, import_client.setCredentialFeature)(creds, \"CREDENTIALS_PROFILE_SSO\", \"r\");\n } else {\n return (0, import_client.setCredentialFeature)(creds, \"CREDENTIALS_PROFILE_SSO_LEGACY\", \"t\");\n }\n });\n}, \"resolveSsoCredentials\");\nvar isSsoProfile = /* @__PURE__ */ __name((arg) => arg && (typeof arg.sso_start_url === \"string\" || typeof arg.sso_account_id === \"string\" || typeof arg.sso_session === \"string\" || typeof arg.sso_region === \"string\" || typeof arg.sso_role_name === \"string\"), \"isSsoProfile\");\n\n// src/resolveStaticCredentials.ts\n\nvar isStaticCredsProfile = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === \"object\" && typeof arg.aws_access_key_id === \"string\" && typeof arg.aws_secret_access_key === \"string\" && [\"undefined\", \"string\"].indexOf(typeof arg.aws_session_token) > -1 && [\"undefined\", \"string\"].indexOf(typeof arg.aws_account_id) > -1, \"isStaticCredsProfile\");\nvar resolveStaticCredentials = /* @__PURE__ */ __name(async (profile, options) => {\n options?.logger?.debug(\"@aws-sdk/credential-provider-ini - resolveStaticCredentials\");\n const credentials = {\n accessKeyId: profile.aws_access_key_id,\n secretAccessKey: profile.aws_secret_access_key,\n sessionToken: profile.aws_session_token,\n ...profile.aws_credential_scope && { credentialScope: profile.aws_credential_scope },\n ...profile.aws_account_id && { accountId: profile.aws_account_id }\n };\n return (0, import_client.setCredentialFeature)(credentials, \"CREDENTIALS_PROFILE\", \"n\");\n}, \"resolveStaticCredentials\");\n\n// src/resolveWebIdentityCredentials.ts\n\nvar isWebIdentityProfile = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === \"object\" && typeof arg.web_identity_token_file === \"string\" && typeof arg.role_arn === \"string\" && [\"undefined\", \"string\"].indexOf(typeof arg.role_session_name) > -1, \"isWebIdentityProfile\");\nvar resolveWebIdentityCredentials = /* @__PURE__ */ __name(async (profile, options) => Promise.resolve().then(() => __toESM(require(\"@aws-sdk/credential-provider-web-identity\"))).then(\n ({ fromTokenFile }) => fromTokenFile({\n webIdentityTokenFile: profile.web_identity_token_file,\n roleArn: profile.role_arn,\n roleSessionName: profile.role_session_name,\n roleAssumerWithWebIdentity: options.roleAssumerWithWebIdentity,\n logger: options.logger,\n parentClientConfig: options.parentClientConfig\n })().then((creds) => (0, import_client.setCredentialFeature)(creds, \"CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN\", \"q\"))\n), \"resolveWebIdentityCredentials\");\n\n// src/resolveProfileData.ts\nvar resolveProfileData = /* @__PURE__ */ __name(async (profileName, profiles, options, visitedProfiles = {}, isAssumeRoleRecursiveCall = false) => {\n const data = profiles[profileName];\n if (Object.keys(visitedProfiles).length > 0 && isStaticCredsProfile(data)) {\n return resolveStaticCredentials(data, options);\n }\n if (isAssumeRoleRecursiveCall || isAssumeRoleProfile(data, { profile: profileName, logger: options.logger })) {\n return resolveAssumeRoleCredentials(profileName, profiles, options, visitedProfiles);\n }\n if (isStaticCredsProfile(data)) {\n return resolveStaticCredentials(data, options);\n }\n if (isWebIdentityProfile(data)) {\n return resolveWebIdentityCredentials(data, options);\n }\n if (isProcessProfile(data)) {\n return resolveProcessCredentials(options, profileName);\n }\n if (isSsoProfile(data)) {\n return await resolveSsoCredentials(profileName, data, options);\n }\n throw new import_property_provider.CredentialsProviderError(\n `Could not resolve credentials using profile: [${profileName}] in configuration/credentials file(s).`,\n { logger: options.logger }\n );\n}, \"resolveProfileData\");\n\n// src/fromIni.ts\nvar fromIni = /* @__PURE__ */ __name((_init = {}) => async ({ callerClientConfig } = {}) => {\n const init = {\n ..._init,\n parentClientConfig: {\n ...callerClientConfig,\n ..._init.parentClientConfig\n }\n };\n init.logger?.debug(\"@aws-sdk/credential-provider-ini - fromIni\");\n const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init);\n return resolveProfileData(\n (0, import_shared_ini_file_loader.getProfileName)({\n profile: _init.profile ?? callerClientConfig?.profile\n }),\n profiles,\n init\n );\n}, \"fromIni\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n fromIni\n});\n\n","\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar index_exports = {};\n__export(index_exports, {\n credentialsTreatedAsExpired: () => credentialsTreatedAsExpired,\n credentialsWillNeedRefresh: () => credentialsWillNeedRefresh,\n defaultProvider: () => defaultProvider\n});\nmodule.exports = __toCommonJS(index_exports);\n\n// src/defaultProvider.ts\nvar import_credential_provider_env = require(\"@aws-sdk/credential-provider-env\");\n\nvar import_shared_ini_file_loader = require(\"@smithy/shared-ini-file-loader\");\n\n// src/remoteProvider.ts\nvar import_property_provider = require(\"@smithy/property-provider\");\nvar ENV_IMDS_DISABLED = \"AWS_EC2_METADATA_DISABLED\";\nvar remoteProvider = /* @__PURE__ */ __name(async (init) => {\n const { ENV_CMDS_FULL_URI, ENV_CMDS_RELATIVE_URI, fromContainerMetadata, fromInstanceMetadata } = await Promise.resolve().then(() => __toESM(require(\"@smithy/credential-provider-imds\")));\n if (process.env[ENV_CMDS_RELATIVE_URI] || process.env[ENV_CMDS_FULL_URI]) {\n init.logger?.debug(\"@aws-sdk/credential-provider-node - remoteProvider::fromHttp/fromContainerMetadata\");\n const { fromHttp } = await Promise.resolve().then(() => __toESM(require(\"@aws-sdk/credential-provider-http\")));\n return (0, import_property_provider.chain)(fromHttp(init), fromContainerMetadata(init));\n }\n if (process.env[ENV_IMDS_DISABLED] && process.env[ENV_IMDS_DISABLED] !== \"false\") {\n return async () => {\n throw new import_property_provider.CredentialsProviderError(\"EC2 Instance Metadata Service access disabled\", { logger: init.logger });\n };\n }\n init.logger?.debug(\"@aws-sdk/credential-provider-node - remoteProvider::fromInstanceMetadata\");\n return fromInstanceMetadata(init);\n}, \"remoteProvider\");\n\n// src/defaultProvider.ts\nvar multipleCredentialSourceWarningEmitted = false;\nvar defaultProvider = /* @__PURE__ */ __name((init = {}) => (0, import_property_provider.memoize)(\n (0, import_property_provider.chain)(\n async () => {\n const profile = init.profile ?? process.env[import_shared_ini_file_loader.ENV_PROFILE];\n if (profile) {\n const envStaticCredentialsAreSet = process.env[import_credential_provider_env.ENV_KEY] && process.env[import_credential_provider_env.ENV_SECRET];\n if (envStaticCredentialsAreSet) {\n if (!multipleCredentialSourceWarningEmitted) {\n const warnFn = init.logger?.warn && init.logger?.constructor?.name !== \"NoOpLogger\" ? init.logger.warn : console.warn;\n warnFn(\n `@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING:\n Multiple credential sources detected: \n Both AWS_PROFILE and the pair AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY static credentials are set.\n This SDK will proceed with the AWS_PROFILE value.\n \n However, a future version may change this behavior to prefer the ENV static credentials.\n Please ensure that your environment only sets either the AWS_PROFILE or the\n AWS_ACCESS_KEY_ID/AWS_SECRET_ACCESS_KEY pair.\n`\n );\n multipleCredentialSourceWarningEmitted = true;\n }\n }\n throw new import_property_provider.CredentialsProviderError(\"AWS_PROFILE is set, skipping fromEnv provider.\", {\n logger: init.logger,\n tryNextLink: true\n });\n }\n init.logger?.debug(\"@aws-sdk/credential-provider-node - defaultProvider::fromEnv\");\n return (0, import_credential_provider_env.fromEnv)(init)();\n },\n async () => {\n init.logger?.debug(\"@aws-sdk/credential-provider-node - defaultProvider::fromSSO\");\n const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init;\n if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) {\n throw new import_property_provider.CredentialsProviderError(\n \"Skipping SSO provider in default chain (inputs do not include SSO fields).\",\n { logger: init.logger }\n );\n }\n const { fromSSO } = await Promise.resolve().then(() => __toESM(require(\"@aws-sdk/credential-provider-sso\")));\n return fromSSO(init)();\n },\n async () => {\n init.logger?.debug(\"@aws-sdk/credential-provider-node - defaultProvider::fromIni\");\n const { fromIni } = await Promise.resolve().then(() => __toESM(require(\"@aws-sdk/credential-provider-ini\")));\n return fromIni(init)();\n },\n async () => {\n init.logger?.debug(\"@aws-sdk/credential-provider-node - defaultProvider::fromProcess\");\n const { fromProcess } = await Promise.resolve().then(() => __toESM(require(\"@aws-sdk/credential-provider-process\")));\n return fromProcess(init)();\n },\n async () => {\n init.logger?.debug(\"@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile\");\n const { fromTokenFile } = await Promise.resolve().then(() => __toESM(require(\"@aws-sdk/credential-provider-web-identity\")));\n return fromTokenFile(init)();\n },\n async () => {\n init.logger?.debug(\"@aws-sdk/credential-provider-node - defaultProvider::remoteProvider\");\n return (await remoteProvider(init))();\n },\n async () => {\n throw new import_property_provider.CredentialsProviderError(\"Could not load credentials from any providers\", {\n tryNextLink: false,\n logger: init.logger\n });\n }\n ),\n credentialsTreatedAsExpired,\n credentialsWillNeedRefresh\n), \"defaultProvider\");\nvar credentialsWillNeedRefresh = /* @__PURE__ */ __name((credentials) => credentials?.expiration !== void 0, \"credentialsWillNeedRefresh\");\nvar credentialsTreatedAsExpired = /* @__PURE__ */ __name((credentials) => credentials?.expiration !== void 0 && credentials.expiration.getTime() - Date.now() < 3e5, \"credentialsTreatedAsExpired\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n defaultProvider,\n credentialsWillNeedRefresh,\n credentialsTreatedAsExpired\n});\n\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar index_exports = {};\n__export(index_exports, {\n fromProcess: () => fromProcess\n});\nmodule.exports = __toCommonJS(index_exports);\n\n// src/fromProcess.ts\nvar import_shared_ini_file_loader = require(\"@smithy/shared-ini-file-loader\");\n\n// src/resolveProcessCredentials.ts\nvar import_property_provider = require(\"@smithy/property-provider\");\nvar import_child_process = require(\"child_process\");\nvar import_util = require(\"util\");\n\n// src/getValidatedProcessCredentials.ts\nvar import_client = require(\"@aws-sdk/core/client\");\nvar getValidatedProcessCredentials = /* @__PURE__ */ __name((profileName, data, profiles) => {\n if (data.Version !== 1) {\n throw Error(`Profile ${profileName} credential_process did not return Version 1.`);\n }\n if (data.AccessKeyId === void 0 || data.SecretAccessKey === void 0) {\n throw Error(`Profile ${profileName} credential_process returned invalid credentials.`);\n }\n if (data.Expiration) {\n const currentTime = /* @__PURE__ */ new Date();\n const expireTime = new Date(data.Expiration);\n if (expireTime < currentTime) {\n throw Error(`Profile ${profileName} credential_process returned expired credentials.`);\n }\n }\n let accountId = data.AccountId;\n if (!accountId && profiles?.[profileName]?.aws_account_id) {\n accountId = profiles[profileName].aws_account_id;\n }\n const credentials = {\n accessKeyId: data.AccessKeyId,\n secretAccessKey: data.SecretAccessKey,\n ...data.SessionToken && { sessionToken: data.SessionToken },\n ...data.Expiration && { expiration: new Date(data.Expiration) },\n ...data.CredentialScope && { credentialScope: data.CredentialScope },\n ...accountId && { accountId }\n };\n (0, import_client.setCredentialFeature)(credentials, \"CREDENTIALS_PROCESS\", \"w\");\n return credentials;\n}, \"getValidatedProcessCredentials\");\n\n// src/resolveProcessCredentials.ts\nvar resolveProcessCredentials = /* @__PURE__ */ __name(async (profileName, profiles, logger) => {\n const profile = profiles[profileName];\n if (profiles[profileName]) {\n const credentialProcess = profile[\"credential_process\"];\n if (credentialProcess !== void 0) {\n const execPromise = (0, import_util.promisify)(import_child_process.exec);\n try {\n const { stdout } = await execPromise(credentialProcess);\n let data;\n try {\n data = JSON.parse(stdout.trim());\n } catch {\n throw Error(`Profile ${profileName} credential_process returned invalid JSON.`);\n }\n return getValidatedProcessCredentials(profileName, data, profiles);\n } catch (error) {\n throw new import_property_provider.CredentialsProviderError(error.message, { logger });\n }\n } else {\n throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} did not contain credential_process.`, { logger });\n }\n } else {\n throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} could not be found in shared credentials file.`, {\n logger\n });\n }\n}, \"resolveProcessCredentials\");\n\n// src/fromProcess.ts\nvar fromProcess = /* @__PURE__ */ __name((init = {}) => async ({ callerClientConfig } = {}) => {\n init.logger?.debug(\"@aws-sdk/credential-provider-process - fromProcess\");\n const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init);\n return resolveProcessCredentials(\n (0, import_shared_ini_file_loader.getProfileName)({\n profile: init.profile ?? callerClientConfig?.profile\n }),\n profiles,\n init.logger\n );\n}, \"fromProcess\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n fromProcess\n});\n\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __esm = (fn, res) => function __init() {\n return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;\n};\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/loadSso.ts\nvar loadSso_exports = {};\n__export(loadSso_exports, {\n GetRoleCredentialsCommand: () => import_client_sso.GetRoleCredentialsCommand,\n SSOClient: () => import_client_sso.SSOClient\n});\nvar import_client_sso;\nvar init_loadSso = __esm({\n \"src/loadSso.ts\"() {\n \"use strict\";\n import_client_sso = require(\"@aws-sdk/client-sso\");\n }\n});\n\n// src/index.ts\nvar index_exports = {};\n__export(index_exports, {\n fromSSO: () => fromSSO,\n isSsoProfile: () => isSsoProfile,\n validateSsoProfile: () => validateSsoProfile\n});\nmodule.exports = __toCommonJS(index_exports);\n\n// src/fromSSO.ts\n\n\n\n// src/isSsoProfile.ts\nvar isSsoProfile = /* @__PURE__ */ __name((arg) => arg && (typeof arg.sso_start_url === \"string\" || typeof arg.sso_account_id === \"string\" || typeof arg.sso_session === \"string\" || typeof arg.sso_region === \"string\" || typeof arg.sso_role_name === \"string\"), \"isSsoProfile\");\n\n// src/resolveSSOCredentials.ts\nvar import_client = require(\"@aws-sdk/core/client\");\nvar import_token_providers = require(\"@aws-sdk/token-providers\");\nvar import_property_provider = require(\"@smithy/property-provider\");\nvar import_shared_ini_file_loader = require(\"@smithy/shared-ini-file-loader\");\nvar SHOULD_FAIL_CREDENTIAL_CHAIN = false;\nvar resolveSSOCredentials = /* @__PURE__ */ __name(async ({\n ssoStartUrl,\n ssoSession,\n ssoAccountId,\n ssoRegion,\n ssoRoleName,\n ssoClient,\n clientConfig,\n parentClientConfig,\n profile,\n logger\n}) => {\n let token;\n const refreshMessage = `To refresh this SSO session run aws sso login with the corresponding profile.`;\n if (ssoSession) {\n try {\n const _token = await (0, import_token_providers.fromSso)({ profile })();\n token = {\n accessToken: _token.token,\n expiresAt: new Date(_token.expiration).toISOString()\n };\n } catch (e) {\n throw new import_property_provider.CredentialsProviderError(e.message, {\n tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,\n logger\n });\n }\n } else {\n try {\n token = await (0, import_shared_ini_file_loader.getSSOTokenFromFile)(ssoStartUrl);\n } catch (e) {\n throw new import_property_provider.CredentialsProviderError(`The SSO session associated with this profile is invalid. ${refreshMessage}`, {\n tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,\n logger\n });\n }\n }\n if (new Date(token.expiresAt).getTime() - Date.now() <= 0) {\n throw new import_property_provider.CredentialsProviderError(`The SSO session associated with this profile has expired. ${refreshMessage}`, {\n tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,\n logger\n });\n }\n const { accessToken } = token;\n const { SSOClient: SSOClient2, GetRoleCredentialsCommand: GetRoleCredentialsCommand2 } = await Promise.resolve().then(() => (init_loadSso(), loadSso_exports));\n const sso = ssoClient || new SSOClient2(\n Object.assign({}, clientConfig ?? {}, {\n logger: clientConfig?.logger ?? parentClientConfig?.logger,\n region: clientConfig?.region ?? ssoRegion\n })\n );\n let ssoResp;\n try {\n ssoResp = await sso.send(\n new GetRoleCredentialsCommand2({\n accountId: ssoAccountId,\n roleName: ssoRoleName,\n accessToken\n })\n );\n } catch (e) {\n throw new import_property_provider.CredentialsProviderError(e, {\n tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,\n logger\n });\n }\n const {\n roleCredentials: { accessKeyId, secretAccessKey, sessionToken, expiration, credentialScope, accountId } = {}\n } = ssoResp;\n if (!accessKeyId || !secretAccessKey || !sessionToken || !expiration) {\n throw new import_property_provider.CredentialsProviderError(\"SSO returns an invalid temporary credential.\", {\n tryNextLink: SHOULD_FAIL_CREDENTIAL_CHAIN,\n logger\n });\n }\n const credentials = {\n accessKeyId,\n secretAccessKey,\n sessionToken,\n expiration: new Date(expiration),\n ...credentialScope && { credentialScope },\n ...accountId && { accountId }\n };\n if (ssoSession) {\n (0, import_client.setCredentialFeature)(credentials, \"CREDENTIALS_SSO\", \"s\");\n } else {\n (0, import_client.setCredentialFeature)(credentials, \"CREDENTIALS_SSO_LEGACY\", \"u\");\n }\n return credentials;\n}, \"resolveSSOCredentials\");\n\n// src/validateSsoProfile.ts\n\nvar validateSsoProfile = /* @__PURE__ */ __name((profile, logger) => {\n const { sso_start_url, sso_account_id, sso_region, sso_role_name } = profile;\n if (!sso_start_url || !sso_account_id || !sso_region || !sso_role_name) {\n throw new import_property_provider.CredentialsProviderError(\n `Profile is configured with invalid SSO credentials. Required parameters \"sso_account_id\", \"sso_region\", \"sso_role_name\", \"sso_start_url\". Got ${Object.keys(profile).join(\n \", \"\n )}\nReference: https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-sso.html`,\n { tryNextLink: false, logger }\n );\n }\n return profile;\n}, \"validateSsoProfile\");\n\n// src/fromSSO.ts\nvar fromSSO = /* @__PURE__ */ __name((init = {}) => async ({ callerClientConfig } = {}) => {\n init.logger?.debug(\"@aws-sdk/credential-provider-sso - fromSSO\");\n const { ssoStartUrl, ssoAccountId, ssoRegion, ssoRoleName, ssoSession } = init;\n const { ssoClient } = init;\n const profileName = (0, import_shared_ini_file_loader.getProfileName)({\n profile: init.profile ?? callerClientConfig?.profile\n });\n if (!ssoStartUrl && !ssoAccountId && !ssoRegion && !ssoRoleName && !ssoSession) {\n const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init);\n const profile = profiles[profileName];\n if (!profile) {\n throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} was not found.`, { logger: init.logger });\n }\n if (!isSsoProfile(profile)) {\n throw new import_property_provider.CredentialsProviderError(`Profile ${profileName} is not configured with SSO credentials.`, {\n logger: init.logger\n });\n }\n if (profile?.sso_session) {\n const ssoSessions = await (0, import_shared_ini_file_loader.loadSsoSessionData)(init);\n const session = ssoSessions[profile.sso_session];\n const conflictMsg = ` configurations in profile ${profileName} and sso-session ${profile.sso_session}`;\n if (ssoRegion && ssoRegion !== session.sso_region) {\n throw new import_property_provider.CredentialsProviderError(`Conflicting SSO region` + conflictMsg, {\n tryNextLink: false,\n logger: init.logger\n });\n }\n if (ssoStartUrl && ssoStartUrl !== session.sso_start_url) {\n throw new import_property_provider.CredentialsProviderError(`Conflicting SSO start_url` + conflictMsg, {\n tryNextLink: false,\n logger: init.logger\n });\n }\n profile.sso_region = session.sso_region;\n profile.sso_start_url = session.sso_start_url;\n }\n const { sso_start_url, sso_account_id, sso_region, sso_role_name, sso_session } = validateSsoProfile(\n profile,\n init.logger\n );\n return resolveSSOCredentials({\n ssoStartUrl: sso_start_url,\n ssoSession: sso_session,\n ssoAccountId: sso_account_id,\n ssoRegion: sso_region,\n ssoRoleName: sso_role_name,\n ssoClient,\n clientConfig: init.clientConfig,\n parentClientConfig: init.parentClientConfig,\n profile: profileName\n });\n } else if (!ssoStartUrl || !ssoAccountId || !ssoRegion || !ssoRoleName) {\n throw new import_property_provider.CredentialsProviderError(\n 'Incomplete configuration. The fromSSO() argument hash must include \"ssoStartUrl\", \"ssoAccountId\", \"ssoRegion\", \"ssoRoleName\"',\n { tryNextLink: false, logger: init.logger }\n );\n } else {\n return resolveSSOCredentials({\n ssoStartUrl,\n ssoSession,\n ssoAccountId,\n ssoRegion,\n ssoRoleName,\n ssoClient,\n clientConfig: init.clientConfig,\n parentClientConfig: init.parentClientConfig,\n profile: profileName\n });\n }\n}, \"fromSSO\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n fromSSO,\n isSsoProfile,\n validateSsoProfile\n});\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromTokenFile = void 0;\nconst client_1 = require(\"@aws-sdk/core/client\");\nconst property_provider_1 = require(\"@smithy/property-provider\");\nconst fs_1 = require(\"fs\");\nconst fromWebToken_1 = require(\"./fromWebToken\");\nconst ENV_TOKEN_FILE = \"AWS_WEB_IDENTITY_TOKEN_FILE\";\nconst ENV_ROLE_ARN = \"AWS_ROLE_ARN\";\nconst ENV_ROLE_SESSION_NAME = \"AWS_ROLE_SESSION_NAME\";\nconst fromTokenFile = (init = {}) => async () => {\n init.logger?.debug(\"@aws-sdk/credential-provider-web-identity - fromTokenFile\");\n const webIdentityTokenFile = init?.webIdentityTokenFile ?? process.env[ENV_TOKEN_FILE];\n const roleArn = init?.roleArn ?? process.env[ENV_ROLE_ARN];\n const roleSessionName = init?.roleSessionName ?? process.env[ENV_ROLE_SESSION_NAME];\n if (!webIdentityTokenFile || !roleArn) {\n throw new property_provider_1.CredentialsProviderError(\"Web identity configuration not specified\", {\n logger: init.logger,\n });\n }\n const credentials = await (0, fromWebToken_1.fromWebToken)({\n ...init,\n webIdentityToken: (0, fs_1.readFileSync)(webIdentityTokenFile, { encoding: \"ascii\" }),\n roleArn,\n roleSessionName,\n })();\n if (webIdentityTokenFile === process.env[ENV_TOKEN_FILE]) {\n (0, client_1.setCredentialFeature)(credentials, \"CREDENTIALS_ENV_VARS_STS_WEB_ID_TOKEN\", \"h\");\n }\n return credentials;\n};\nexports.fromTokenFile = fromTokenFile;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || (function () {\n var ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n };\n return function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromWebToken = void 0;\nconst fromWebToken = (init) => async (awsIdentityProperties) => {\n init.logger?.debug(\"@aws-sdk/credential-provider-web-identity - fromWebToken\");\n const { roleArn, roleSessionName, webIdentityToken, providerId, policyArns, policy, durationSeconds } = init;\n let { roleAssumerWithWebIdentity } = init;\n if (!roleAssumerWithWebIdentity) {\n const { getDefaultRoleAssumerWithWebIdentity } = await Promise.resolve().then(() => __importStar(require(\"@aws-sdk/nested-clients/sts\")));\n roleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity({\n ...init.clientConfig,\n credentialProviderLogger: init.logger,\n parentClientConfig: {\n ...awsIdentityProperties?.callerClientConfig,\n ...init.parentClientConfig,\n },\n }, init.clientPlugins);\n }\n return roleAssumerWithWebIdentity({\n RoleArn: roleArn,\n RoleSessionName: roleSessionName ?? `aws-sdk-js-session-${Date.now()}`,\n WebIdentityToken: webIdentityToken,\n ProviderId: providerId,\n PolicyArns: policyArns,\n Policy: policy,\n DurationSeconds: durationSeconds,\n });\n};\nexports.fromWebToken = fromWebToken;\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar index_exports = {};\nmodule.exports = __toCommonJS(index_exports);\n__reExport(index_exports, require(\"././fromTokenFile\"), module.exports);\n__reExport(index_exports, require(\"././fromWebToken\"), module.exports);\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n fromTokenFile,\n fromWebToken\n});\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.propertyProviderChain = exports.createCredentialChain = void 0;\nconst property_provider_1 = require(\"@smithy/property-provider\");\nconst createCredentialChain = (...credentialProviders) => {\n let expireAfter = -1;\n const baseFunction = async (awsIdentityProperties) => {\n const credentials = await (0, exports.propertyProviderChain)(...credentialProviders)(awsIdentityProperties);\n if (!credentials.expiration && expireAfter !== -1) {\n credentials.expiration = new Date(Date.now() + expireAfter);\n }\n return credentials;\n };\n const withOptions = Object.assign(baseFunction, {\n expireAfter(milliseconds) {\n if (milliseconds < 5 * 60_000) {\n throw new Error(\"@aws-sdk/credential-providers - createCredentialChain(...).expireAfter(ms) may not be called with a duration lower than five minutes.\");\n }\n expireAfter = milliseconds;\n return withOptions;\n },\n });\n return withOptions;\n};\nexports.createCredentialChain = createCredentialChain;\nconst propertyProviderChain = (...providers) => async (awsIdentityProperties) => {\n if (providers.length === 0) {\n throw new property_provider_1.ProviderError(\"No providers in chain\");\n }\n let lastProviderError;\n for (const provider of providers) {\n try {\n const credentials = await provider(awsIdentityProperties);\n return credentials;\n }\n catch (err) {\n lastProviderError = err;\n if (err?.tryNextLink) {\n continue;\n }\n throw err;\n }\n }\n throw lastProviderError;\n};\nexports.propertyProviderChain = propertyProviderChain;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromCognitoIdentity = void 0;\nconst credential_provider_cognito_identity_1 = require(\"@aws-sdk/credential-provider-cognito-identity\");\nconst fromCognitoIdentity = (options) => (0, credential_provider_cognito_identity_1.fromCognitoIdentity)({\n ...options,\n});\nexports.fromCognitoIdentity = fromCognitoIdentity;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromCognitoIdentityPool = void 0;\nconst credential_provider_cognito_identity_1 = require(\"@aws-sdk/credential-provider-cognito-identity\");\nconst fromCognitoIdentityPool = (options) => (0, credential_provider_cognito_identity_1.fromCognitoIdentityPool)({\n ...options,\n});\nexports.fromCognitoIdentityPool = fromCognitoIdentityPool;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromContainerMetadata = void 0;\nconst credential_provider_imds_1 = require(\"@smithy/credential-provider-imds\");\nconst fromContainerMetadata = (init) => {\n init?.logger?.debug(\"@smithy/credential-provider-imds\", \"fromContainerMetadata\");\n return (0, credential_provider_imds_1.fromContainerMetadata)(init);\n};\nexports.fromContainerMetadata = fromContainerMetadata;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromEnv = void 0;\nconst credential_provider_env_1 = require(\"@aws-sdk/credential-provider-env\");\nconst fromEnv = (init) => (0, credential_provider_env_1.fromEnv)(init);\nexports.fromEnv = fromEnv;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromIni = void 0;\nconst credential_provider_ini_1 = require(\"@aws-sdk/credential-provider-ini\");\nconst fromIni = (init = {}) => (0, credential_provider_ini_1.fromIni)({\n ...init,\n});\nexports.fromIni = fromIni;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromInstanceMetadata = void 0;\nconst client_1 = require(\"@aws-sdk/core/client\");\nconst credential_provider_imds_1 = require(\"@smithy/credential-provider-imds\");\nconst fromInstanceMetadata = (init) => {\n init?.logger?.debug(\"@smithy/credential-provider-imds\", \"fromInstanceMetadata\");\n return async () => (0, credential_provider_imds_1.fromInstanceMetadata)(init)().then((creds) => (0, client_1.setCredentialFeature)(creds, \"CREDENTIALS_IMDS\", \"0\"));\n};\nexports.fromInstanceMetadata = fromInstanceMetadata;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromNodeProviderChain = void 0;\nconst credential_provider_node_1 = require(\"@aws-sdk/credential-provider-node\");\nconst fromNodeProviderChain = (init = {}) => (0, credential_provider_node_1.defaultProvider)({\n ...init,\n});\nexports.fromNodeProviderChain = fromNodeProviderChain;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromProcess = void 0;\nconst credential_provider_process_1 = require(\"@aws-sdk/credential-provider-process\");\nconst fromProcess = (init) => (0, credential_provider_process_1.fromProcess)(init);\nexports.fromProcess = fromProcess;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromSSO = void 0;\nconst credential_provider_sso_1 = require(\"@aws-sdk/credential-provider-sso\");\nconst fromSSO = (init = {}) => {\n return (0, credential_provider_sso_1.fromSSO)({ ...init });\n};\nexports.fromSSO = fromSSO;\n","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || (function () {\n var ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n };\n return function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n };\n})();\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromTemporaryCredentials = void 0;\nconst core_1 = require(\"@smithy/core\");\nconst property_provider_1 = require(\"@smithy/property-provider\");\nconst ASSUME_ROLE_DEFAULT_REGION = \"us-east-1\";\nconst fromTemporaryCredentials = (options, credentialDefaultProvider, regionProvider) => {\n let stsClient;\n return async (awsIdentityProperties = {}) => {\n const { callerClientConfig } = awsIdentityProperties;\n const profile = options.clientConfig?.profile ?? callerClientConfig?.profile;\n const logger = options.logger ?? callerClientConfig?.logger;\n logger?.debug(\"@aws-sdk/credential-providers - fromTemporaryCredentials (STS)\");\n const params = { ...options.params, RoleSessionName: options.params.RoleSessionName ?? \"aws-sdk-js-\" + Date.now() };\n if (params?.SerialNumber) {\n if (!options.mfaCodeProvider) {\n throw new property_provider_1.CredentialsProviderError(`Temporary credential requires multi-factor authentication, but no MFA code callback was provided.`, {\n tryNextLink: false,\n logger,\n });\n }\n params.TokenCode = await options.mfaCodeProvider(params?.SerialNumber);\n }\n const { AssumeRoleCommand, STSClient } = await Promise.resolve().then(() => __importStar(require(\"./loadSts\")));\n if (!stsClient) {\n const defaultCredentialsOrError = typeof credentialDefaultProvider === \"function\" ? credentialDefaultProvider() : undefined;\n const credentialSources = [\n options.masterCredentials,\n options.clientConfig?.credentials,\n void callerClientConfig?.credentials,\n callerClientConfig?.credentialDefaultProvider?.(),\n defaultCredentialsOrError,\n ];\n let credentialSource = \"STS client default credentials\";\n if (credentialSources[0]) {\n credentialSource = \"options.masterCredentials\";\n }\n else if (credentialSources[1]) {\n credentialSource = \"options.clientConfig.credentials\";\n }\n else if (credentialSources[2]) {\n credentialSource = \"caller client's credentials\";\n throw new Error(\"fromTemporaryCredentials recursion in callerClientConfig.credentials\");\n }\n else if (credentialSources[3]) {\n credentialSource = \"caller client's credentialDefaultProvider\";\n }\n else if (credentialSources[4]) {\n credentialSource = \"AWS SDK default credentials\";\n }\n const regionSources = [\n options.clientConfig?.region,\n callerClientConfig?.region,\n await regionProvider?.({\n profile,\n }),\n ASSUME_ROLE_DEFAULT_REGION,\n ];\n let regionSource = \"default partition's default region\";\n if (regionSources[0]) {\n regionSource = \"options.clientConfig.region\";\n }\n else if (regionSources[1]) {\n regionSource = \"caller client's region\";\n }\n else if (regionSources[2]) {\n regionSource = \"file or env region\";\n }\n const requestHandlerSources = [\n filterRequestHandler(options.clientConfig?.requestHandler),\n filterRequestHandler(callerClientConfig?.requestHandler),\n ];\n let requestHandlerSource = \"STS default requestHandler\";\n if (requestHandlerSources[0]) {\n requestHandlerSource = \"options.clientConfig.requestHandler\";\n }\n else if (requestHandlerSources[1]) {\n requestHandlerSource = \"caller client's requestHandler\";\n }\n logger?.debug?.(`@aws-sdk/credential-providers - fromTemporaryCredentials STS client init with ` +\n `${regionSource}=${await (0, core_1.normalizeProvider)(coalesce(regionSources))()}, ${credentialSource}, ${requestHandlerSource}.`);\n stsClient = new STSClient({\n ...options.clientConfig,\n credentials: coalesce(credentialSources),\n logger,\n profile,\n region: coalesce(regionSources),\n requestHandler: coalesce(requestHandlerSources),\n });\n }\n if (options.clientPlugins) {\n for (const plugin of options.clientPlugins) {\n stsClient.middlewareStack.use(plugin);\n }\n }\n const { Credentials } = await stsClient.send(new AssumeRoleCommand(params));\n if (!Credentials || !Credentials.AccessKeyId || !Credentials.SecretAccessKey) {\n throw new property_provider_1.CredentialsProviderError(`Invalid response from STS.assumeRole call with role ${params.RoleArn}`, {\n logger,\n });\n }\n return {\n accessKeyId: Credentials.AccessKeyId,\n secretAccessKey: Credentials.SecretAccessKey,\n sessionToken: Credentials.SessionToken,\n expiration: Credentials.Expiration,\n credentialScope: Credentials.CredentialScope,\n };\n };\n};\nexports.fromTemporaryCredentials = fromTemporaryCredentials;\nconst filterRequestHandler = (requestHandler) => {\n return requestHandler?.metadata?.handlerProtocol === \"h2\" ? undefined : requestHandler;\n};\nconst coalesce = (args) => {\n for (const item of args) {\n if (item !== undefined) {\n return item;\n }\n }\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromTemporaryCredentials = void 0;\nconst config_resolver_1 = require(\"@smithy/config-resolver\");\nconst node_config_provider_1 = require(\"@smithy/node-config-provider\");\nconst fromNodeProviderChain_1 = require(\"./fromNodeProviderChain\");\nconst fromTemporaryCredentials_base_1 = require(\"./fromTemporaryCredentials.base\");\nconst fromTemporaryCredentials = (options) => {\n return (0, fromTemporaryCredentials_base_1.fromTemporaryCredentials)(options, fromNodeProviderChain_1.fromNodeProviderChain, async ({ profile = process.env.AWS_PROFILE }) => (0, node_config_provider_1.loadConfig)({\n environmentVariableSelector: (env) => env.AWS_REGION,\n configFileSelector: (profileData) => {\n return profileData.region;\n },\n default: () => undefined,\n }, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, profile })());\n};\nexports.fromTemporaryCredentials = fromTemporaryCredentials;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromTokenFile = void 0;\nconst credential_provider_web_identity_1 = require(\"@aws-sdk/credential-provider-web-identity\");\nconst fromTokenFile = (init = {}) => (0, credential_provider_web_identity_1.fromTokenFile)({\n ...init,\n});\nexports.fromTokenFile = fromTokenFile;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromWebToken = void 0;\nconst credential_provider_web_identity_1 = require(\"@aws-sdk/credential-provider-web-identity\");\nconst fromWebToken = (init) => (0, credential_provider_web_identity_1.fromWebToken)({\n ...init,\n});\nexports.fromWebToken = fromWebToken;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromHttp = void 0;\nconst tslib_1 = require(\"tslib\");\ntslib_1.__exportStar(require(\"./createCredentialChain\"), exports);\ntslib_1.__exportStar(require(\"./fromCognitoIdentity\"), exports);\ntslib_1.__exportStar(require(\"./fromCognitoIdentityPool\"), exports);\ntslib_1.__exportStar(require(\"./fromContainerMetadata\"), exports);\nvar credential_provider_http_1 = require(\"@aws-sdk/credential-provider-http\");\nObject.defineProperty(exports, \"fromHttp\", { enumerable: true, get: function () { return credential_provider_http_1.fromHttp; } });\ntslib_1.__exportStar(require(\"./fromEnv\"), exports);\ntslib_1.__exportStar(require(\"./fromIni\"), exports);\ntslib_1.__exportStar(require(\"./fromInstanceMetadata\"), exports);\ntslib_1.__exportStar(require(\"./fromNodeProviderChain\"), exports);\ntslib_1.__exportStar(require(\"./fromProcess\"), exports);\ntslib_1.__exportStar(require(\"./fromSSO\"), exports);\ntslib_1.__exportStar(require(\"./fromTemporaryCredentials\"), exports);\ntslib_1.__exportStar(require(\"./fromTokenFile\"), exports);\ntslib_1.__exportStar(require(\"./fromWebToken\"), exports);\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.STSClient = exports.AssumeRoleCommand = void 0;\nconst sts_1 = require(\"@aws-sdk/nested-clients/sts\");\nObject.defineProperty(exports, \"AssumeRoleCommand\", { enumerable: true, get: function () { return sts_1.AssumeRoleCommand; } });\nObject.defineProperty(exports, \"STSClient\", { enumerable: true, get: function () { return sts_1.STSClient; } });\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar index_exports = {};\n__export(index_exports, {\n getHostHeaderPlugin: () => getHostHeaderPlugin,\n hostHeaderMiddleware: () => hostHeaderMiddleware,\n hostHeaderMiddlewareOptions: () => hostHeaderMiddlewareOptions,\n resolveHostHeaderConfig: () => resolveHostHeaderConfig\n});\nmodule.exports = __toCommonJS(index_exports);\nvar import_protocol_http = require(\"@smithy/protocol-http\");\nfunction resolveHostHeaderConfig(input) {\n return input;\n}\n__name(resolveHostHeaderConfig, \"resolveHostHeaderConfig\");\nvar hostHeaderMiddleware = /* @__PURE__ */ __name((options) => (next) => async (args) => {\n if (!import_protocol_http.HttpRequest.isInstance(args.request)) return next(args);\n const { request } = args;\n const { handlerProtocol = \"\" } = options.requestHandler.metadata || {};\n if (handlerProtocol.indexOf(\"h2\") >= 0 && !request.headers[\":authority\"]) {\n delete request.headers[\"host\"];\n request.headers[\":authority\"] = request.hostname + (request.port ? \":\" + request.port : \"\");\n } else if (!request.headers[\"host\"]) {\n let host = request.hostname;\n if (request.port != null) host += `:${request.port}`;\n request.headers[\"host\"] = host;\n }\n return next(args);\n}, \"hostHeaderMiddleware\");\nvar hostHeaderMiddlewareOptions = {\n name: \"hostHeaderMiddleware\",\n step: \"build\",\n priority: \"low\",\n tags: [\"HOST\"],\n override: true\n};\nvar getHostHeaderPlugin = /* @__PURE__ */ __name((options) => ({\n applyToStack: /* @__PURE__ */ __name((clientStack) => {\n clientStack.add(hostHeaderMiddleware(options), hostHeaderMiddlewareOptions);\n }, \"applyToStack\")\n}), \"getHostHeaderPlugin\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n hostHeaderMiddleware,\n hostHeaderMiddlewareOptions,\n getHostHeaderPlugin,\n resolveHostHeaderConfig\n});\n\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar index_exports = {};\n__export(index_exports, {\n getLoggerPlugin: () => getLoggerPlugin,\n loggerMiddleware: () => loggerMiddleware,\n loggerMiddlewareOptions: () => loggerMiddlewareOptions\n});\nmodule.exports = __toCommonJS(index_exports);\n\n// src/loggerMiddleware.ts\nvar loggerMiddleware = /* @__PURE__ */ __name(() => (next, context) => async (args) => {\n try {\n const response = await next(args);\n const { clientName, commandName, logger, dynamoDbDocumentClientOptions = {} } = context;\n const { overrideInputFilterSensitiveLog, overrideOutputFilterSensitiveLog } = dynamoDbDocumentClientOptions;\n const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog;\n const outputFilterSensitiveLog = overrideOutputFilterSensitiveLog ?? context.outputFilterSensitiveLog;\n const { $metadata, ...outputWithoutMetadata } = response.output;\n logger?.info?.({\n clientName,\n commandName,\n input: inputFilterSensitiveLog(args.input),\n output: outputFilterSensitiveLog(outputWithoutMetadata),\n metadata: $metadata\n });\n return response;\n } catch (error) {\n const { clientName, commandName, logger, dynamoDbDocumentClientOptions = {} } = context;\n const { overrideInputFilterSensitiveLog } = dynamoDbDocumentClientOptions;\n const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog;\n logger?.error?.({\n clientName,\n commandName,\n input: inputFilterSensitiveLog(args.input),\n error,\n metadata: error.$metadata\n });\n throw error;\n }\n}, \"loggerMiddleware\");\nvar loggerMiddlewareOptions = {\n name: \"loggerMiddleware\",\n tags: [\"LOGGER\"],\n step: \"initialize\",\n override: true\n};\nvar getLoggerPlugin = /* @__PURE__ */ __name((options) => ({\n applyToStack: /* @__PURE__ */ __name((clientStack) => {\n clientStack.add(loggerMiddleware(), loggerMiddlewareOptions);\n }, \"applyToStack\")\n}), \"getLoggerPlugin\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n loggerMiddleware,\n loggerMiddlewareOptions,\n getLoggerPlugin\n});\n\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar index_exports = {};\n__export(index_exports, {\n addRecursionDetectionMiddlewareOptions: () => addRecursionDetectionMiddlewareOptions,\n getRecursionDetectionPlugin: () => getRecursionDetectionPlugin,\n recursionDetectionMiddleware: () => recursionDetectionMiddleware\n});\nmodule.exports = __toCommonJS(index_exports);\nvar import_protocol_http = require(\"@smithy/protocol-http\");\nvar TRACE_ID_HEADER_NAME = \"X-Amzn-Trace-Id\";\nvar ENV_LAMBDA_FUNCTION_NAME = \"AWS_LAMBDA_FUNCTION_NAME\";\nvar ENV_TRACE_ID = \"_X_AMZN_TRACE_ID\";\nvar recursionDetectionMiddleware = /* @__PURE__ */ __name((options) => (next) => async (args) => {\n const { request } = args;\n if (!import_protocol_http.HttpRequest.isInstance(request) || options.runtime !== \"node\") {\n return next(args);\n }\n const traceIdHeader = Object.keys(request.headers ?? {}).find((h) => h.toLowerCase() === TRACE_ID_HEADER_NAME.toLowerCase()) ?? TRACE_ID_HEADER_NAME;\n if (request.headers.hasOwnProperty(traceIdHeader)) {\n return next(args);\n }\n const functionName = process.env[ENV_LAMBDA_FUNCTION_NAME];\n const traceId = process.env[ENV_TRACE_ID];\n const nonEmptyString = /* @__PURE__ */ __name((str) => typeof str === \"string\" && str.length > 0, \"nonEmptyString\");\n if (nonEmptyString(functionName) && nonEmptyString(traceId)) {\n request.headers[TRACE_ID_HEADER_NAME] = traceId;\n }\n return next({\n ...args,\n request\n });\n}, \"recursionDetectionMiddleware\");\nvar addRecursionDetectionMiddlewareOptions = {\n step: \"build\",\n tags: [\"RECURSION_DETECTION\"],\n name: \"recursionDetectionMiddleware\",\n override: true,\n priority: \"low\"\n};\nvar getRecursionDetectionPlugin = /* @__PURE__ */ __name((options) => ({\n applyToStack: /* @__PURE__ */ __name((clientStack) => {\n clientStack.add(recursionDetectionMiddleware(options), addRecursionDetectionMiddlewareOptions);\n }, \"applyToStack\")\n}), \"getRecursionDetectionPlugin\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n recursionDetectionMiddleware,\n addRecursionDetectionMiddlewareOptions,\n getRecursionDetectionPlugin\n});\n\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar index_exports = {};\n__export(index_exports, {\n DEFAULT_UA_APP_ID: () => DEFAULT_UA_APP_ID,\n getUserAgentMiddlewareOptions: () => getUserAgentMiddlewareOptions,\n getUserAgentPlugin: () => getUserAgentPlugin,\n resolveUserAgentConfig: () => resolveUserAgentConfig,\n userAgentMiddleware: () => userAgentMiddleware\n});\nmodule.exports = __toCommonJS(index_exports);\n\n// src/configurations.ts\nvar import_core = require(\"@smithy/core\");\nvar DEFAULT_UA_APP_ID = void 0;\nfunction isValidUserAgentAppId(appId) {\n if (appId === void 0) {\n return true;\n }\n return typeof appId === \"string\" && appId.length <= 50;\n}\n__name(isValidUserAgentAppId, \"isValidUserAgentAppId\");\nfunction resolveUserAgentConfig(input) {\n const normalizedAppIdProvider = (0, import_core.normalizeProvider)(input.userAgentAppId ?? DEFAULT_UA_APP_ID);\n const { customUserAgent } = input;\n return Object.assign(input, {\n customUserAgent: typeof customUserAgent === \"string\" ? [[customUserAgent]] : customUserAgent,\n userAgentAppId: /* @__PURE__ */ __name(async () => {\n const appId = await normalizedAppIdProvider();\n if (!isValidUserAgentAppId(appId)) {\n const logger = input.logger?.constructor?.name === \"NoOpLogger\" || !input.logger ? console : input.logger;\n if (typeof appId !== \"string\") {\n logger?.warn(\"userAgentAppId must be a string or undefined.\");\n } else if (appId.length > 50) {\n logger?.warn(\"The provided userAgentAppId exceeds the maximum length of 50 characters.\");\n }\n }\n return appId;\n }, \"userAgentAppId\")\n });\n}\n__name(resolveUserAgentConfig, \"resolveUserAgentConfig\");\n\n// src/user-agent-middleware.ts\nvar import_util_endpoints = require(\"@aws-sdk/util-endpoints\");\nvar import_protocol_http = require(\"@smithy/protocol-http\");\n\n// src/check-features.ts\nvar import_core2 = require(\"@aws-sdk/core\");\nvar ACCOUNT_ID_ENDPOINT_REGEX = /\\d{12}\\.ddb/;\nasync function checkFeatures(context, config, args) {\n const request = args.request;\n if (request?.headers?.[\"smithy-protocol\"] === \"rpc-v2-cbor\") {\n (0, import_core2.setFeature)(context, \"PROTOCOL_RPC_V2_CBOR\", \"M\");\n }\n if (typeof config.retryStrategy === \"function\") {\n const retryStrategy = await config.retryStrategy();\n if (typeof retryStrategy.acquireInitialRetryToken === \"function\") {\n if (retryStrategy.constructor?.name?.includes(\"Adaptive\")) {\n (0, import_core2.setFeature)(context, \"RETRY_MODE_ADAPTIVE\", \"F\");\n } else {\n (0, import_core2.setFeature)(context, \"RETRY_MODE_STANDARD\", \"E\");\n }\n } else {\n (0, import_core2.setFeature)(context, \"RETRY_MODE_LEGACY\", \"D\");\n }\n }\n if (typeof config.accountIdEndpointMode === \"function\") {\n const endpointV2 = context.endpointV2;\n if (String(endpointV2?.url?.hostname).match(ACCOUNT_ID_ENDPOINT_REGEX)) {\n (0, import_core2.setFeature)(context, \"ACCOUNT_ID_ENDPOINT\", \"O\");\n }\n switch (await config.accountIdEndpointMode?.()) {\n case \"disabled\":\n (0, import_core2.setFeature)(context, \"ACCOUNT_ID_MODE_DISABLED\", \"Q\");\n break;\n case \"preferred\":\n (0, import_core2.setFeature)(context, \"ACCOUNT_ID_MODE_PREFERRED\", \"P\");\n break;\n case \"required\":\n (0, import_core2.setFeature)(context, \"ACCOUNT_ID_MODE_REQUIRED\", \"R\");\n break;\n }\n }\n const identity = context.__smithy_context?.selectedHttpAuthScheme?.identity;\n if (identity?.$source) {\n const credentials = identity;\n if (credentials.accountId) {\n (0, import_core2.setFeature)(context, \"RESOLVED_ACCOUNT_ID\", \"T\");\n }\n for (const [key, value] of Object.entries(credentials.$source ?? {})) {\n (0, import_core2.setFeature)(context, key, value);\n }\n }\n}\n__name(checkFeatures, \"checkFeatures\");\n\n// src/constants.ts\nvar USER_AGENT = \"user-agent\";\nvar X_AMZ_USER_AGENT = \"x-amz-user-agent\";\nvar SPACE = \" \";\nvar UA_NAME_SEPARATOR = \"/\";\nvar UA_NAME_ESCAPE_REGEX = /[^\\!\\$\\%\\&\\'\\*\\+\\-\\.\\^\\_\\`\\|\\~\\d\\w]/g;\nvar UA_VALUE_ESCAPE_REGEX = /[^\\!\\$\\%\\&\\'\\*\\+\\-\\.\\^\\_\\`\\|\\~\\d\\w\\#]/g;\nvar UA_ESCAPE_CHAR = \"-\";\n\n// src/encode-features.ts\nvar BYTE_LIMIT = 1024;\nfunction encodeFeatures(features) {\n let buffer = \"\";\n for (const key in features) {\n const val = features[key];\n if (buffer.length + val.length + 1 <= BYTE_LIMIT) {\n if (buffer.length) {\n buffer += \",\" + val;\n } else {\n buffer += val;\n }\n continue;\n }\n break;\n }\n return buffer;\n}\n__name(encodeFeatures, \"encodeFeatures\");\n\n// src/user-agent-middleware.ts\nvar userAgentMiddleware = /* @__PURE__ */ __name((options) => (next, context) => async (args) => {\n const { request } = args;\n if (!import_protocol_http.HttpRequest.isInstance(request)) {\n return next(args);\n }\n const { headers } = request;\n const userAgent = context?.userAgent?.map(escapeUserAgent) || [];\n const defaultUserAgent = (await options.defaultUserAgentProvider()).map(escapeUserAgent);\n await checkFeatures(context, options, args);\n const awsContext = context;\n defaultUserAgent.push(\n `m/${encodeFeatures(\n Object.assign({}, context.__smithy_context?.features, awsContext.__aws_sdk_context?.features)\n )}`\n );\n const customUserAgent = options?.customUserAgent?.map(escapeUserAgent) || [];\n const appId = await options.userAgentAppId();\n if (appId) {\n defaultUserAgent.push(escapeUserAgent([`app/${appId}`]));\n }\n const prefix = (0, import_util_endpoints.getUserAgentPrefix)();\n const sdkUserAgentValue = (prefix ? [prefix] : []).concat([...defaultUserAgent, ...userAgent, ...customUserAgent]).join(SPACE);\n const normalUAValue = [\n ...defaultUserAgent.filter((section) => section.startsWith(\"aws-sdk-\")),\n ...customUserAgent\n ].join(SPACE);\n if (options.runtime !== \"browser\") {\n if (normalUAValue) {\n headers[X_AMZ_USER_AGENT] = headers[X_AMZ_USER_AGENT] ? `${headers[USER_AGENT]} ${normalUAValue}` : normalUAValue;\n }\n headers[USER_AGENT] = sdkUserAgentValue;\n } else {\n headers[X_AMZ_USER_AGENT] = sdkUserAgentValue;\n }\n return next({\n ...args,\n request\n });\n}, \"userAgentMiddleware\");\nvar escapeUserAgent = /* @__PURE__ */ __name((userAgentPair) => {\n const name = userAgentPair[0].split(UA_NAME_SEPARATOR).map((part) => part.replace(UA_NAME_ESCAPE_REGEX, UA_ESCAPE_CHAR)).join(UA_NAME_SEPARATOR);\n const version = userAgentPair[1]?.replace(UA_VALUE_ESCAPE_REGEX, UA_ESCAPE_CHAR);\n const prefixSeparatorIndex = name.indexOf(UA_NAME_SEPARATOR);\n const prefix = name.substring(0, prefixSeparatorIndex);\n let uaName = name.substring(prefixSeparatorIndex + 1);\n if (prefix === \"api\") {\n uaName = uaName.toLowerCase();\n }\n return [prefix, uaName, version].filter((item) => item && item.length > 0).reduce((acc, item, index) => {\n switch (index) {\n case 0:\n return item;\n case 1:\n return `${acc}/${item}`;\n default:\n return `${acc}#${item}`;\n }\n }, \"\");\n}, \"escapeUserAgent\");\nvar getUserAgentMiddlewareOptions = {\n name: \"getUserAgentMiddleware\",\n step: \"build\",\n priority: \"low\",\n tags: [\"SET_USER_AGENT\", \"USER_AGENT\"],\n override: true\n};\nvar getUserAgentPlugin = /* @__PURE__ */ __name((config) => ({\n applyToStack: /* @__PURE__ */ __name((clientStack) => {\n clientStack.add(userAgentMiddleware(config), getUserAgentMiddlewareOptions);\n }, \"applyToStack\")\n}), \"getUserAgentPlugin\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n DEFAULT_UA_APP_ID,\n resolveUserAgentConfig,\n userAgentMiddleware,\n getUserAgentMiddlewareOptions,\n getUserAgentPlugin\n});\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resolveHttpAuthSchemeConfig = exports.defaultSSOOIDCHttpAuthSchemeProvider = exports.defaultSSOOIDCHttpAuthSchemeParametersProvider = void 0;\nconst core_1 = require(\"@aws-sdk/core\");\nconst util_middleware_1 = require(\"@smithy/util-middleware\");\nconst defaultSSOOIDCHttpAuthSchemeParametersProvider = async (config, context, input) => {\n return {\n operation: (0, util_middleware_1.getSmithyContext)(context).operation,\n region: (await (0, util_middleware_1.normalizeProvider)(config.region)()) ||\n (() => {\n throw new Error(\"expected `region` to be configured for `aws.auth#sigv4`\");\n })(),\n };\n};\nexports.defaultSSOOIDCHttpAuthSchemeParametersProvider = defaultSSOOIDCHttpAuthSchemeParametersProvider;\nfunction createAwsAuthSigv4HttpAuthOption(authParameters) {\n return {\n schemeId: \"aws.auth#sigv4\",\n signingProperties: {\n name: \"sso-oauth\",\n region: authParameters.region,\n },\n propertiesExtractor: (config, context) => ({\n signingProperties: {\n config,\n context,\n },\n }),\n };\n}\nfunction createSmithyApiNoAuthHttpAuthOption(authParameters) {\n return {\n schemeId: \"smithy.api#noAuth\",\n };\n}\nconst defaultSSOOIDCHttpAuthSchemeProvider = (authParameters) => {\n const options = [];\n switch (authParameters.operation) {\n case \"CreateToken\": {\n options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));\n break;\n }\n default: {\n options.push(createAwsAuthSigv4HttpAuthOption(authParameters));\n }\n }\n return options;\n};\nexports.defaultSSOOIDCHttpAuthSchemeProvider = defaultSSOOIDCHttpAuthSchemeProvider;\nconst resolveHttpAuthSchemeConfig = (config) => {\n const config_0 = (0, core_1.resolveAwsSdkSigV4Config)(config);\n return Object.assign(config_0, {\n authSchemePreference: (0, util_middleware_1.normalizeProvider)(config.authSchemePreference ?? []),\n });\n};\nexports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.defaultEndpointResolver = void 0;\nconst util_endpoints_1 = require(\"@aws-sdk/util-endpoints\");\nconst util_endpoints_2 = require(\"@smithy/util-endpoints\");\nconst ruleset_1 = require(\"./ruleset\");\nconst cache = new util_endpoints_2.EndpointCache({\n size: 50,\n params: [\"Endpoint\", \"Region\", \"UseDualStack\", \"UseFIPS\"],\n});\nconst defaultEndpointResolver = (endpointParams, context = {}) => {\n return cache.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, {\n endpointParams: endpointParams,\n logger: context.logger,\n }));\n};\nexports.defaultEndpointResolver = defaultEndpointResolver;\nutil_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ruleSet = void 0;\nconst u = \"required\", v = \"fn\", w = \"argv\", x = \"ref\";\nconst a = true, b = \"isSet\", c = \"booleanEquals\", d = \"error\", e = \"endpoint\", f = \"tree\", g = \"PartitionResult\", h = \"getAttr\", i = { [u]: false, \"type\": \"String\" }, j = { [u]: true, \"default\": false, \"type\": \"Boolean\" }, k = { [x]: \"Endpoint\" }, l = { [v]: c, [w]: [{ [x]: \"UseFIPS\" }, true] }, m = { [v]: c, [w]: [{ [x]: \"UseDualStack\" }, true] }, n = {}, o = { [v]: h, [w]: [{ [x]: g }, \"supportsFIPS\"] }, p = { [x]: g }, q = { [v]: c, [w]: [true, { [v]: h, [w]: [p, \"supportsDualStack\"] }] }, r = [l], s = [m], t = [{ [x]: \"Region\" }];\nconst _data = { version: \"1.0\", parameters: { Region: i, UseDualStack: j, UseFIPS: j, Endpoint: i }, rules: [{ conditions: [{ [v]: b, [w]: [k] }], rules: [{ conditions: r, error: \"Invalid Configuration: FIPS and custom endpoint are not supported\", type: d }, { conditions: s, error: \"Invalid Configuration: Dualstack and custom endpoint are not supported\", type: d }, { endpoint: { url: k, properties: n, headers: n }, type: e }], type: f }, { conditions: [{ [v]: b, [w]: t }], rules: [{ conditions: [{ [v]: \"aws.partition\", [w]: t, assign: g }], rules: [{ conditions: [l, m], rules: [{ conditions: [{ [v]: c, [w]: [a, o] }, q], rules: [{ endpoint: { url: \"https://oidc-fips.{Region}.{PartitionResult#dualStackDnsSuffix}\", properties: n, headers: n }, type: e }], type: f }, { error: \"FIPS and DualStack are enabled, but this partition does not support one or both\", type: d }], type: f }, { conditions: r, rules: [{ conditions: [{ [v]: c, [w]: [o, a] }], rules: [{ conditions: [{ [v]: \"stringEquals\", [w]: [{ [v]: h, [w]: [p, \"name\"] }, \"aws-us-gov\"] }], endpoint: { url: \"https://oidc.{Region}.amazonaws.com\", properties: n, headers: n }, type: e }, { endpoint: { url: \"https://oidc-fips.{Region}.{PartitionResult#dnsSuffix}\", properties: n, headers: n }, type: e }], type: f }, { error: \"FIPS is enabled but this partition does not support FIPS\", type: d }], type: f }, { conditions: s, rules: [{ conditions: [q], rules: [{ endpoint: { url: \"https://oidc.{Region}.{PartitionResult#dualStackDnsSuffix}\", properties: n, headers: n }, type: e }], type: f }, { error: \"DualStack is enabled but this partition does not support DualStack\", type: d }], type: f }, { endpoint: { url: \"https://oidc.{Region}.{PartitionResult#dnsSuffix}\", properties: n, headers: n }, type: e }], type: f }], type: f }, { error: \"Invalid Configuration: Missing Region\", type: d }] };\nexports.ruleSet = _data;\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/submodules/sso-oidc/index.ts\nvar index_exports = {};\n__export(index_exports, {\n $Command: () => import_smithy_client6.Command,\n AccessDeniedException: () => AccessDeniedException,\n AuthorizationPendingException: () => AuthorizationPendingException,\n CreateTokenCommand: () => CreateTokenCommand,\n CreateTokenRequestFilterSensitiveLog: () => CreateTokenRequestFilterSensitiveLog,\n CreateTokenResponseFilterSensitiveLog: () => CreateTokenResponseFilterSensitiveLog,\n ExpiredTokenException: () => ExpiredTokenException,\n InternalServerException: () => InternalServerException,\n InvalidClientException: () => InvalidClientException,\n InvalidGrantException: () => InvalidGrantException,\n InvalidRequestException: () => InvalidRequestException,\n InvalidScopeException: () => InvalidScopeException,\n SSOOIDC: () => SSOOIDC,\n SSOOIDCClient: () => SSOOIDCClient,\n SSOOIDCServiceException: () => SSOOIDCServiceException,\n SlowDownException: () => SlowDownException,\n UnauthorizedClientException: () => UnauthorizedClientException,\n UnsupportedGrantTypeException: () => UnsupportedGrantTypeException,\n __Client: () => import_smithy_client2.Client\n});\nmodule.exports = __toCommonJS(index_exports);\n\n// src/submodules/sso-oidc/SSOOIDCClient.ts\nvar import_middleware_host_header = require(\"@aws-sdk/middleware-host-header\");\nvar import_middleware_logger = require(\"@aws-sdk/middleware-logger\");\nvar import_middleware_recursion_detection = require(\"@aws-sdk/middleware-recursion-detection\");\nvar import_middleware_user_agent = require(\"@aws-sdk/middleware-user-agent\");\nvar import_config_resolver = require(\"@smithy/config-resolver\");\nvar import_core = require(\"@smithy/core\");\nvar import_middleware_content_length = require(\"@smithy/middleware-content-length\");\nvar import_middleware_endpoint = require(\"@smithy/middleware-endpoint\");\nvar import_middleware_retry = require(\"@smithy/middleware-retry\");\nvar import_smithy_client2 = require(\"@smithy/smithy-client\");\nvar import_httpAuthSchemeProvider = require(\"./auth/httpAuthSchemeProvider\");\n\n// src/submodules/sso-oidc/endpoint/EndpointParameters.ts\nvar resolveClientEndpointParameters = /* @__PURE__ */ __name((options) => {\n return Object.assign(options, {\n useDualstackEndpoint: options.useDualstackEndpoint ?? false,\n useFipsEndpoint: options.useFipsEndpoint ?? false,\n defaultSigningName: \"sso-oauth\"\n });\n}, \"resolveClientEndpointParameters\");\nvar commonParams = {\n UseFIPS: { type: \"builtInParams\", name: \"useFipsEndpoint\" },\n Endpoint: { type: \"builtInParams\", name: \"endpoint\" },\n Region: { type: \"builtInParams\", name: \"region\" },\n UseDualStack: { type: \"builtInParams\", name: \"useDualstackEndpoint\" }\n};\n\n// src/submodules/sso-oidc/SSOOIDCClient.ts\nvar import_runtimeConfig = require(\"./runtimeConfig\");\n\n// src/submodules/sso-oidc/runtimeExtensions.ts\nvar import_region_config_resolver = require(\"@aws-sdk/region-config-resolver\");\nvar import_protocol_http = require(\"@smithy/protocol-http\");\nvar import_smithy_client = require(\"@smithy/smithy-client\");\n\n// src/submodules/sso-oidc/auth/httpAuthExtensionConfiguration.ts\nvar getHttpAuthExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {\n const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;\n let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;\n let _credentials = runtimeConfig.credentials;\n return {\n setHttpAuthScheme(httpAuthScheme) {\n const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);\n if (index === -1) {\n _httpAuthSchemes.push(httpAuthScheme);\n } else {\n _httpAuthSchemes.splice(index, 1, httpAuthScheme);\n }\n },\n httpAuthSchemes() {\n return _httpAuthSchemes;\n },\n setHttpAuthSchemeProvider(httpAuthSchemeProvider) {\n _httpAuthSchemeProvider = httpAuthSchemeProvider;\n },\n httpAuthSchemeProvider() {\n return _httpAuthSchemeProvider;\n },\n setCredentials(credentials) {\n _credentials = credentials;\n },\n credentials() {\n return _credentials;\n }\n };\n}, \"getHttpAuthExtensionConfiguration\");\nvar resolveHttpAuthRuntimeConfig = /* @__PURE__ */ __name((config) => {\n return {\n httpAuthSchemes: config.httpAuthSchemes(),\n httpAuthSchemeProvider: config.httpAuthSchemeProvider(),\n credentials: config.credentials()\n };\n}, \"resolveHttpAuthRuntimeConfig\");\n\n// src/submodules/sso-oidc/runtimeExtensions.ts\nvar resolveRuntimeExtensions = /* @__PURE__ */ __name((runtimeConfig, extensions) => {\n const extensionConfiguration = Object.assign(\n (0, import_region_config_resolver.getAwsRegionExtensionConfiguration)(runtimeConfig),\n (0, import_smithy_client.getDefaultExtensionConfiguration)(runtimeConfig),\n (0, import_protocol_http.getHttpHandlerExtensionConfiguration)(runtimeConfig),\n getHttpAuthExtensionConfiguration(runtimeConfig)\n );\n extensions.forEach((extension) => extension.configure(extensionConfiguration));\n return Object.assign(\n runtimeConfig,\n (0, import_region_config_resolver.resolveAwsRegionExtensionConfiguration)(extensionConfiguration),\n (0, import_smithy_client.resolveDefaultRuntimeConfig)(extensionConfiguration),\n (0, import_protocol_http.resolveHttpHandlerRuntimeConfig)(extensionConfiguration),\n resolveHttpAuthRuntimeConfig(extensionConfiguration)\n );\n}, \"resolveRuntimeExtensions\");\n\n// src/submodules/sso-oidc/SSOOIDCClient.ts\nvar SSOOIDCClient = class extends import_smithy_client2.Client {\n static {\n __name(this, \"SSOOIDCClient\");\n }\n /**\n * The resolved configuration of SSOOIDCClient class. This is resolved and normalized from the {@link SSOOIDCClientConfig | constructor configuration interface}.\n */\n config;\n constructor(...[configuration]) {\n const _config_0 = (0, import_runtimeConfig.getRuntimeConfig)(configuration || {});\n super(_config_0);\n this.initConfig = _config_0;\n const _config_1 = resolveClientEndpointParameters(_config_0);\n const _config_2 = (0, import_middleware_user_agent.resolveUserAgentConfig)(_config_1);\n const _config_3 = (0, import_middleware_retry.resolveRetryConfig)(_config_2);\n const _config_4 = (0, import_config_resolver.resolveRegionConfig)(_config_3);\n const _config_5 = (0, import_middleware_host_header.resolveHostHeaderConfig)(_config_4);\n const _config_6 = (0, import_middleware_endpoint.resolveEndpointConfig)(_config_5);\n const _config_7 = (0, import_httpAuthSchemeProvider.resolveHttpAuthSchemeConfig)(_config_6);\n const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);\n this.config = _config_8;\n this.middlewareStack.use((0, import_middleware_user_agent.getUserAgentPlugin)(this.config));\n this.middlewareStack.use((0, import_middleware_retry.getRetryPlugin)(this.config));\n this.middlewareStack.use((0, import_middleware_content_length.getContentLengthPlugin)(this.config));\n this.middlewareStack.use((0, import_middleware_host_header.getHostHeaderPlugin)(this.config));\n this.middlewareStack.use((0, import_middleware_logger.getLoggerPlugin)(this.config));\n this.middlewareStack.use((0, import_middleware_recursion_detection.getRecursionDetectionPlugin)(this.config));\n this.middlewareStack.use(\n (0, import_core.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {\n httpAuthSchemeParametersProvider: import_httpAuthSchemeProvider.defaultSSOOIDCHttpAuthSchemeParametersProvider,\n identityProviderConfigProvider: /* @__PURE__ */ __name(async (config) => new import_core.DefaultIdentityProviderConfig({\n \"aws.auth#sigv4\": config.credentials\n }), \"identityProviderConfigProvider\")\n })\n );\n this.middlewareStack.use((0, import_core.getHttpSigningPlugin)(this.config));\n }\n /**\n * Destroy underlying resources, like sockets. It's usually not necessary to do this.\n * However in Node.js, it's best to explicitly shut down the client's agent when it is no longer needed.\n * Otherwise, sockets might stay open for quite a long time before the server terminates them.\n */\n destroy() {\n super.destroy();\n }\n};\n\n// src/submodules/sso-oidc/SSOOIDC.ts\nvar import_smithy_client7 = require(\"@smithy/smithy-client\");\n\n// src/submodules/sso-oidc/commands/CreateTokenCommand.ts\nvar import_middleware_endpoint2 = require(\"@smithy/middleware-endpoint\");\nvar import_middleware_serde = require(\"@smithy/middleware-serde\");\nvar import_smithy_client6 = require(\"@smithy/smithy-client\");\n\n// src/submodules/sso-oidc/models/models_0.ts\nvar import_smithy_client4 = require(\"@smithy/smithy-client\");\n\n// src/submodules/sso-oidc/models/SSOOIDCServiceException.ts\nvar import_smithy_client3 = require(\"@smithy/smithy-client\");\nvar SSOOIDCServiceException = class _SSOOIDCServiceException extends import_smithy_client3.ServiceException {\n static {\n __name(this, \"SSOOIDCServiceException\");\n }\n /**\n * @internal\n */\n constructor(options) {\n super(options);\n Object.setPrototypeOf(this, _SSOOIDCServiceException.prototype);\n }\n};\n\n// src/submodules/sso-oidc/models/models_0.ts\nvar AccessDeniedException = class _AccessDeniedException extends SSOOIDCServiceException {\n static {\n __name(this, \"AccessDeniedException\");\n }\n name = \"AccessDeniedException\";\n $fault = \"client\";\n /**\n *Single error code. For this exception the value will be access_denied.
Human-readable text providing additional information, used to assist the client developer\n * in understanding the error that occurred.
\n * @public\n */\n error_description;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"AccessDeniedException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _AccessDeniedException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n};\nvar AuthorizationPendingException = class _AuthorizationPendingException extends SSOOIDCServiceException {\n static {\n __name(this, \"AuthorizationPendingException\");\n }\n name = \"AuthorizationPendingException\";\n $fault = \"client\";\n /**\n *Single error code. For this exception the value will be\n * authorization_pending.
Human-readable text providing additional information, used to assist the client developer\n * in understanding the error that occurred.
\n * @public\n */\n error_description;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"AuthorizationPendingException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _AuthorizationPendingException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n};\nvar CreateTokenRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.clientSecret && { clientSecret: import_smithy_client4.SENSITIVE_STRING },\n ...obj.refreshToken && { refreshToken: import_smithy_client4.SENSITIVE_STRING },\n ...obj.codeVerifier && { codeVerifier: import_smithy_client4.SENSITIVE_STRING }\n}), \"CreateTokenRequestFilterSensitiveLog\");\nvar CreateTokenResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.accessToken && { accessToken: import_smithy_client4.SENSITIVE_STRING },\n ...obj.refreshToken && { refreshToken: import_smithy_client4.SENSITIVE_STRING },\n ...obj.idToken && { idToken: import_smithy_client4.SENSITIVE_STRING }\n}), \"CreateTokenResponseFilterSensitiveLog\");\nvar ExpiredTokenException = class _ExpiredTokenException extends SSOOIDCServiceException {\n static {\n __name(this, \"ExpiredTokenException\");\n }\n name = \"ExpiredTokenException\";\n $fault = \"client\";\n /**\n *Single error code. For this exception the value will be expired_token.
Human-readable text providing additional information, used to assist the client developer\n * in understanding the error that occurred.
\n * @public\n */\n error_description;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"ExpiredTokenException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _ExpiredTokenException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n};\nvar InternalServerException = class _InternalServerException extends SSOOIDCServiceException {\n static {\n __name(this, \"InternalServerException\");\n }\n name = \"InternalServerException\";\n $fault = \"server\";\n /**\n *Single error code. For this exception the value will be server_error.
Human-readable text providing additional information, used to assist the client developer\n * in understanding the error that occurred.
\n * @public\n */\n error_description;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"InternalServerException\",\n $fault: \"server\",\n ...opts\n });\n Object.setPrototypeOf(this, _InternalServerException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n};\nvar InvalidClientException = class _InvalidClientException extends SSOOIDCServiceException {\n static {\n __name(this, \"InvalidClientException\");\n }\n name = \"InvalidClientException\";\n $fault = \"client\";\n /**\n *Single error code. For this exception the value will be\n * invalid_client.
Human-readable text providing additional information, used to assist the client developer\n * in understanding the error that occurred.
\n * @public\n */\n error_description;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"InvalidClientException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _InvalidClientException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n};\nvar InvalidGrantException = class _InvalidGrantException extends SSOOIDCServiceException {\n static {\n __name(this, \"InvalidGrantException\");\n }\n name = \"InvalidGrantException\";\n $fault = \"client\";\n /**\n *Single error code. For this exception the value will be invalid_grant.
Human-readable text providing additional information, used to assist the client developer\n * in understanding the error that occurred.
\n * @public\n */\n error_description;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"InvalidGrantException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _InvalidGrantException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n};\nvar InvalidRequestException = class _InvalidRequestException extends SSOOIDCServiceException {\n static {\n __name(this, \"InvalidRequestException\");\n }\n name = \"InvalidRequestException\";\n $fault = \"client\";\n /**\n *Single error code. For this exception the value will be\n * invalid_request.
Human-readable text providing additional information, used to assist the client developer\n * in understanding the error that occurred.
\n * @public\n */\n error_description;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"InvalidRequestException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _InvalidRequestException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n};\nvar InvalidScopeException = class _InvalidScopeException extends SSOOIDCServiceException {\n static {\n __name(this, \"InvalidScopeException\");\n }\n name = \"InvalidScopeException\";\n $fault = \"client\";\n /**\n *Single error code. For this exception the value will be invalid_scope.
Human-readable text providing additional information, used to assist the client developer\n * in understanding the error that occurred.
\n * @public\n */\n error_description;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"InvalidScopeException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _InvalidScopeException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n};\nvar SlowDownException = class _SlowDownException extends SSOOIDCServiceException {\n static {\n __name(this, \"SlowDownException\");\n }\n name = \"SlowDownException\";\n $fault = \"client\";\n /**\n *Single error code. For this exception the value will be slow_down.
Human-readable text providing additional information, used to assist the client developer\n * in understanding the error that occurred.
\n * @public\n */\n error_description;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"SlowDownException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _SlowDownException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n};\nvar UnauthorizedClientException = class _UnauthorizedClientException extends SSOOIDCServiceException {\n static {\n __name(this, \"UnauthorizedClientException\");\n }\n name = \"UnauthorizedClientException\";\n $fault = \"client\";\n /**\n *Single error code. For this exception the value will be\n * unauthorized_client.
Human-readable text providing additional information, used to assist the client developer\n * in understanding the error that occurred.
\n * @public\n */\n error_description;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"UnauthorizedClientException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _UnauthorizedClientException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n};\nvar UnsupportedGrantTypeException = class _UnsupportedGrantTypeException extends SSOOIDCServiceException {\n static {\n __name(this, \"UnsupportedGrantTypeException\");\n }\n name = \"UnsupportedGrantTypeException\";\n $fault = \"client\";\n /**\n *Single error code. For this exception the value will be\n * unsupported_grant_type.
Human-readable text providing additional information, used to assist the client developer\n * in understanding the error that occurred.
\n * @public\n */\n error_description;\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"UnsupportedGrantTypeException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _UnsupportedGrantTypeException.prototype);\n this.error = opts.error;\n this.error_description = opts.error_description;\n }\n};\n\n// src/submodules/sso-oidc/protocols/Aws_restJson1.ts\nvar import_core2 = require(\"@aws-sdk/core\");\nvar import_core3 = require(\"@smithy/core\");\nvar import_smithy_client5 = require(\"@smithy/smithy-client\");\nvar se_CreateTokenCommand = /* @__PURE__ */ __name(async (input, context) => {\n const b = (0, import_core3.requestBuilder)(input, context);\n const headers = {\n \"content-type\": \"application/json\"\n };\n b.bp(\"/token\");\n let body;\n body = JSON.stringify(\n (0, import_smithy_client5.take)(input, {\n clientId: [],\n clientSecret: [],\n code: [],\n codeVerifier: [],\n deviceCode: [],\n grantType: [],\n redirectUri: [],\n refreshToken: [],\n scope: /* @__PURE__ */ __name((_) => (0, import_smithy_client5._json)(_), \"scope\")\n })\n );\n b.m(\"POST\").h(headers).b(body);\n return b.build();\n}, \"se_CreateTokenCommand\");\nvar de_CreateTokenCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode !== 200 && output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const contents = (0, import_smithy_client5.map)({\n $metadata: deserializeMetadata(output)\n });\n const data = (0, import_smithy_client5.expectNonNull)((0, import_smithy_client5.expectObject)(await (0, import_core2.parseJsonBody)(output.body, context)), \"body\");\n const doc = (0, import_smithy_client5.take)(data, {\n accessToken: import_smithy_client5.expectString,\n expiresIn: import_smithy_client5.expectInt32,\n idToken: import_smithy_client5.expectString,\n refreshToken: import_smithy_client5.expectString,\n tokenType: import_smithy_client5.expectString\n });\n Object.assign(contents, doc);\n return contents;\n}, \"de_CreateTokenCommand\");\nvar de_CommandError = /* @__PURE__ */ __name(async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await (0, import_core2.parseJsonErrorBody)(output.body, context)\n };\n const errorCode = (0, import_core2.loadRestJsonErrorCode)(output, parsedOutput.body);\n switch (errorCode) {\n case \"AccessDeniedException\":\n case \"com.amazonaws.ssooidc#AccessDeniedException\":\n throw await de_AccessDeniedExceptionRes(parsedOutput, context);\n case \"AuthorizationPendingException\":\n case \"com.amazonaws.ssooidc#AuthorizationPendingException\":\n throw await de_AuthorizationPendingExceptionRes(parsedOutput, context);\n case \"ExpiredTokenException\":\n case \"com.amazonaws.ssooidc#ExpiredTokenException\":\n throw await de_ExpiredTokenExceptionRes(parsedOutput, context);\n case \"InternalServerException\":\n case \"com.amazonaws.ssooidc#InternalServerException\":\n throw await de_InternalServerExceptionRes(parsedOutput, context);\n case \"InvalidClientException\":\n case \"com.amazonaws.ssooidc#InvalidClientException\":\n throw await de_InvalidClientExceptionRes(parsedOutput, context);\n case \"InvalidGrantException\":\n case \"com.amazonaws.ssooidc#InvalidGrantException\":\n throw await de_InvalidGrantExceptionRes(parsedOutput, context);\n case \"InvalidRequestException\":\n case \"com.amazonaws.ssooidc#InvalidRequestException\":\n throw await de_InvalidRequestExceptionRes(parsedOutput, context);\n case \"InvalidScopeException\":\n case \"com.amazonaws.ssooidc#InvalidScopeException\":\n throw await de_InvalidScopeExceptionRes(parsedOutput, context);\n case \"SlowDownException\":\n case \"com.amazonaws.ssooidc#SlowDownException\":\n throw await de_SlowDownExceptionRes(parsedOutput, context);\n case \"UnauthorizedClientException\":\n case \"com.amazonaws.ssooidc#UnauthorizedClientException\":\n throw await de_UnauthorizedClientExceptionRes(parsedOutput, context);\n case \"UnsupportedGrantTypeException\":\n case \"com.amazonaws.ssooidc#UnsupportedGrantTypeException\":\n throw await de_UnsupportedGrantTypeExceptionRes(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n return throwDefaultError({\n output,\n parsedBody,\n errorCode\n });\n }\n}, \"de_CommandError\");\nvar throwDefaultError = (0, import_smithy_client5.withBaseException)(SSOOIDCServiceException);\nvar de_AccessDeniedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client5.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client5.take)(data, {\n error: import_smithy_client5.expectString,\n error_description: import_smithy_client5.expectString\n });\n Object.assign(contents, doc);\n const exception = new AccessDeniedException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_AccessDeniedExceptionRes\");\nvar de_AuthorizationPendingExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client5.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client5.take)(data, {\n error: import_smithy_client5.expectString,\n error_description: import_smithy_client5.expectString\n });\n Object.assign(contents, doc);\n const exception = new AuthorizationPendingException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_AuthorizationPendingExceptionRes\");\nvar de_ExpiredTokenExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client5.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client5.take)(data, {\n error: import_smithy_client5.expectString,\n error_description: import_smithy_client5.expectString\n });\n Object.assign(contents, doc);\n const exception = new ExpiredTokenException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_ExpiredTokenExceptionRes\");\nvar de_InternalServerExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client5.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client5.take)(data, {\n error: import_smithy_client5.expectString,\n error_description: import_smithy_client5.expectString\n });\n Object.assign(contents, doc);\n const exception = new InternalServerException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_InternalServerExceptionRes\");\nvar de_InvalidClientExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client5.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client5.take)(data, {\n error: import_smithy_client5.expectString,\n error_description: import_smithy_client5.expectString\n });\n Object.assign(contents, doc);\n const exception = new InvalidClientException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_InvalidClientExceptionRes\");\nvar de_InvalidGrantExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client5.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client5.take)(data, {\n error: import_smithy_client5.expectString,\n error_description: import_smithy_client5.expectString\n });\n Object.assign(contents, doc);\n const exception = new InvalidGrantException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_InvalidGrantExceptionRes\");\nvar de_InvalidRequestExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client5.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client5.take)(data, {\n error: import_smithy_client5.expectString,\n error_description: import_smithy_client5.expectString\n });\n Object.assign(contents, doc);\n const exception = new InvalidRequestException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_InvalidRequestExceptionRes\");\nvar de_InvalidScopeExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client5.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client5.take)(data, {\n error: import_smithy_client5.expectString,\n error_description: import_smithy_client5.expectString\n });\n Object.assign(contents, doc);\n const exception = new InvalidScopeException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_InvalidScopeExceptionRes\");\nvar de_SlowDownExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client5.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client5.take)(data, {\n error: import_smithy_client5.expectString,\n error_description: import_smithy_client5.expectString\n });\n Object.assign(contents, doc);\n const exception = new SlowDownException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_SlowDownExceptionRes\");\nvar de_UnauthorizedClientExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client5.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client5.take)(data, {\n error: import_smithy_client5.expectString,\n error_description: import_smithy_client5.expectString\n });\n Object.assign(contents, doc);\n const exception = new UnauthorizedClientException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_UnauthorizedClientExceptionRes\");\nvar de_UnsupportedGrantTypeExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const contents = (0, import_smithy_client5.map)({});\n const data = parsedOutput.body;\n const doc = (0, import_smithy_client5.take)(data, {\n error: import_smithy_client5.expectString,\n error_description: import_smithy_client5.expectString\n });\n Object.assign(contents, doc);\n const exception = new UnsupportedGrantTypeException({\n $metadata: deserializeMetadata(parsedOutput),\n ...contents\n });\n return (0, import_smithy_client5.decorateServiceException)(exception, parsedOutput.body);\n}, \"de_UnsupportedGrantTypeExceptionRes\");\nvar deserializeMetadata = /* @__PURE__ */ __name((output) => ({\n httpStatusCode: output.statusCode,\n requestId: output.headers[\"x-amzn-requestid\"] ?? output.headers[\"x-amzn-request-id\"] ?? output.headers[\"x-amz-request-id\"],\n extendedRequestId: output.headers[\"x-amz-id-2\"],\n cfId: output.headers[\"x-amz-cf-id\"]\n}), \"deserializeMetadata\");\n\n// src/submodules/sso-oidc/commands/CreateTokenCommand.ts\nvar CreateTokenCommand = class extends import_smithy_client6.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSSSOOIDCService\", \"CreateToken\", {}).n(\"SSOOIDCClient\", \"CreateTokenCommand\").f(CreateTokenRequestFilterSensitiveLog, CreateTokenResponseFilterSensitiveLog).ser(se_CreateTokenCommand).de(de_CreateTokenCommand).build() {\n static {\n __name(this, \"CreateTokenCommand\");\n }\n};\n\n// src/submodules/sso-oidc/SSOOIDC.ts\nvar commands = {\n CreateTokenCommand\n};\nvar SSOOIDC = class extends SSOOIDCClient {\n static {\n __name(this, \"SSOOIDC\");\n }\n};\n(0, import_smithy_client7.createAggregatedClient)(commands, SSOOIDC);\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n $Command,\n AccessDeniedException,\n AuthorizationPendingException,\n CreateTokenCommand,\n CreateTokenRequestFilterSensitiveLog,\n CreateTokenResponseFilterSensitiveLog,\n ExpiredTokenException,\n InternalServerException,\n InvalidClientException,\n InvalidGrantException,\n InvalidRequestException,\n InvalidScopeException,\n SSOOIDC,\n SSOOIDCClient,\n SSOOIDCServiceException,\n SlowDownException,\n UnauthorizedClientException,\n UnsupportedGrantTypeException,\n __Client\n});\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getRuntimeConfig = void 0;\nconst tslib_1 = require(\"tslib\");\nconst package_json_1 = tslib_1.__importDefault(require(\"../../../package.json\"));\nconst core_1 = require(\"@aws-sdk/core\");\nconst util_user_agent_node_1 = require(\"@aws-sdk/util-user-agent-node\");\nconst config_resolver_1 = require(\"@smithy/config-resolver\");\nconst hash_node_1 = require(\"@smithy/hash-node\");\nconst middleware_retry_1 = require(\"@smithy/middleware-retry\");\nconst node_config_provider_1 = require(\"@smithy/node-config-provider\");\nconst node_http_handler_1 = require(\"@smithy/node-http-handler\");\nconst util_body_length_node_1 = require(\"@smithy/util-body-length-node\");\nconst util_retry_1 = require(\"@smithy/util-retry\");\nconst runtimeConfig_shared_1 = require(\"./runtimeConfig.shared\");\nconst smithy_client_1 = require(\"@smithy/smithy-client\");\nconst util_defaults_mode_node_1 = require(\"@smithy/util-defaults-mode-node\");\nconst smithy_client_2 = require(\"@smithy/smithy-client\");\nconst getRuntimeConfig = (config) => {\n (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);\n const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);\n const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);\n const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);\n (0, core_1.emitWarningIfUnsupportedVersion)(process.version);\n const loaderConfig = {\n profile: config?.profile,\n logger: clientSharedValues.logger,\n };\n return {\n ...clientSharedValues,\n ...config,\n runtime: \"node\",\n defaultsMode,\n authSchemePreference: config?.authSchemePreference ?? (0, node_config_provider_1.loadConfig)(core_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),\n bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,\n defaultUserAgentProvider: config?.defaultUserAgentProvider ??\n (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),\n maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),\n region: config?.region ??\n (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),\n requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),\n retryMode: config?.retryMode ??\n (0, node_config_provider_1.loadConfig)({\n ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,\n default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE,\n }, config),\n sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, \"sha256\"),\n streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,\n useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),\n };\n};\nexports.getRuntimeConfig = getRuntimeConfig;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getRuntimeConfig = void 0;\nconst core_1 = require(\"@aws-sdk/core\");\nconst core_2 = require(\"@smithy/core\");\nconst smithy_client_1 = require(\"@smithy/smithy-client\");\nconst url_parser_1 = require(\"@smithy/url-parser\");\nconst util_base64_1 = require(\"@smithy/util-base64\");\nconst util_utf8_1 = require(\"@smithy/util-utf8\");\nconst httpAuthSchemeProvider_1 = require(\"./auth/httpAuthSchemeProvider\");\nconst endpointResolver_1 = require(\"./endpoint/endpointResolver\");\nconst getRuntimeConfig = (config) => {\n return {\n apiVersion: \"2019-06-10\",\n base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64,\n base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,\n disableHostPrefix: config?.disableHostPrefix ?? false,\n endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,\n extensions: config?.extensions ?? [],\n httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSSOOIDCHttpAuthSchemeProvider,\n httpAuthSchemes: config?.httpAuthSchemes ?? [\n {\n schemeId: \"aws.auth#sigv4\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"aws.auth#sigv4\"),\n signer: new core_1.AwsSdkSigV4Signer(),\n },\n {\n schemeId: \"smithy.api#noAuth\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"smithy.api#noAuth\") || (async () => ({})),\n signer: new core_2.NoAuthSigner(),\n },\n ],\n logger: config?.logger ?? new smithy_client_1.NoOpLogger(),\n serviceId: config?.serviceId ?? \"SSO OIDC\",\n urlParser: config?.urlParser ?? url_parser_1.parseUrl,\n utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,\n utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8,\n };\n};\nexports.getRuntimeConfig = getRuntimeConfig;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.STSClient = exports.__Client = void 0;\nconst middleware_host_header_1 = require(\"@aws-sdk/middleware-host-header\");\nconst middleware_logger_1 = require(\"@aws-sdk/middleware-logger\");\nconst middleware_recursion_detection_1 = require(\"@aws-sdk/middleware-recursion-detection\");\nconst middleware_user_agent_1 = require(\"@aws-sdk/middleware-user-agent\");\nconst config_resolver_1 = require(\"@smithy/config-resolver\");\nconst core_1 = require(\"@smithy/core\");\nconst middleware_content_length_1 = require(\"@smithy/middleware-content-length\");\nconst middleware_endpoint_1 = require(\"@smithy/middleware-endpoint\");\nconst middleware_retry_1 = require(\"@smithy/middleware-retry\");\nconst smithy_client_1 = require(\"@smithy/smithy-client\");\nObject.defineProperty(exports, \"__Client\", { enumerable: true, get: function () { return smithy_client_1.Client; } });\nconst httpAuthSchemeProvider_1 = require(\"./auth/httpAuthSchemeProvider\");\nconst EndpointParameters_1 = require(\"./endpoint/EndpointParameters\");\nconst runtimeConfig_1 = require(\"./runtimeConfig\");\nconst runtimeExtensions_1 = require(\"./runtimeExtensions\");\nclass STSClient extends smithy_client_1.Client {\n config;\n constructor(...[configuration]) {\n const _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration || {});\n super(_config_0);\n this.initConfig = _config_0;\n const _config_1 = (0, EndpointParameters_1.resolveClientEndpointParameters)(_config_0);\n const _config_2 = (0, middleware_user_agent_1.resolveUserAgentConfig)(_config_1);\n const _config_3 = (0, middleware_retry_1.resolveRetryConfig)(_config_2);\n const _config_4 = (0, config_resolver_1.resolveRegionConfig)(_config_3);\n const _config_5 = (0, middleware_host_header_1.resolveHostHeaderConfig)(_config_4);\n const _config_6 = (0, middleware_endpoint_1.resolveEndpointConfig)(_config_5);\n const _config_7 = (0, httpAuthSchemeProvider_1.resolveHttpAuthSchemeConfig)(_config_6);\n const _config_8 = (0, runtimeExtensions_1.resolveRuntimeExtensions)(_config_7, configuration?.extensions || []);\n this.config = _config_8;\n this.middlewareStack.use((0, middleware_user_agent_1.getUserAgentPlugin)(this.config));\n this.middlewareStack.use((0, middleware_retry_1.getRetryPlugin)(this.config));\n this.middlewareStack.use((0, middleware_content_length_1.getContentLengthPlugin)(this.config));\n this.middlewareStack.use((0, middleware_host_header_1.getHostHeaderPlugin)(this.config));\n this.middlewareStack.use((0, middleware_logger_1.getLoggerPlugin)(this.config));\n this.middlewareStack.use((0, middleware_recursion_detection_1.getRecursionDetectionPlugin)(this.config));\n this.middlewareStack.use((0, core_1.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {\n httpAuthSchemeParametersProvider: httpAuthSchemeProvider_1.defaultSTSHttpAuthSchemeParametersProvider,\n identityProviderConfigProvider: async (config) => new core_1.DefaultIdentityProviderConfig({\n \"aws.auth#sigv4\": config.credentials,\n }),\n }));\n this.middlewareStack.use((0, core_1.getHttpSigningPlugin)(this.config));\n }\n destroy() {\n super.destroy();\n }\n}\nexports.STSClient = STSClient;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resolveHttpAuthRuntimeConfig = exports.getHttpAuthExtensionConfiguration = void 0;\nconst getHttpAuthExtensionConfiguration = (runtimeConfig) => {\n const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;\n let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;\n let _credentials = runtimeConfig.credentials;\n return {\n setHttpAuthScheme(httpAuthScheme) {\n const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);\n if (index === -1) {\n _httpAuthSchemes.push(httpAuthScheme);\n }\n else {\n _httpAuthSchemes.splice(index, 1, httpAuthScheme);\n }\n },\n httpAuthSchemes() {\n return _httpAuthSchemes;\n },\n setHttpAuthSchemeProvider(httpAuthSchemeProvider) {\n _httpAuthSchemeProvider = httpAuthSchemeProvider;\n },\n httpAuthSchemeProvider() {\n return _httpAuthSchemeProvider;\n },\n setCredentials(credentials) {\n _credentials = credentials;\n },\n credentials() {\n return _credentials;\n },\n };\n};\nexports.getHttpAuthExtensionConfiguration = getHttpAuthExtensionConfiguration;\nconst resolveHttpAuthRuntimeConfig = (config) => {\n return {\n httpAuthSchemes: config.httpAuthSchemes(),\n httpAuthSchemeProvider: config.httpAuthSchemeProvider(),\n credentials: config.credentials(),\n };\n};\nexports.resolveHttpAuthRuntimeConfig = resolveHttpAuthRuntimeConfig;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resolveHttpAuthSchemeConfig = exports.resolveStsAuthConfig = exports.defaultSTSHttpAuthSchemeProvider = exports.defaultSTSHttpAuthSchemeParametersProvider = void 0;\nconst core_1 = require(\"@aws-sdk/core\");\nconst util_middleware_1 = require(\"@smithy/util-middleware\");\nconst STSClient_1 = require(\"../STSClient\");\nconst defaultSTSHttpAuthSchemeParametersProvider = async (config, context, input) => {\n return {\n operation: (0, util_middleware_1.getSmithyContext)(context).operation,\n region: (await (0, util_middleware_1.normalizeProvider)(config.region)()) ||\n (() => {\n throw new Error(\"expected `region` to be configured for `aws.auth#sigv4`\");\n })(),\n };\n};\nexports.defaultSTSHttpAuthSchemeParametersProvider = defaultSTSHttpAuthSchemeParametersProvider;\nfunction createAwsAuthSigv4HttpAuthOption(authParameters) {\n return {\n schemeId: \"aws.auth#sigv4\",\n signingProperties: {\n name: \"sts\",\n region: authParameters.region,\n },\n propertiesExtractor: (config, context) => ({\n signingProperties: {\n config,\n context,\n },\n }),\n };\n}\nfunction createSmithyApiNoAuthHttpAuthOption(authParameters) {\n return {\n schemeId: \"smithy.api#noAuth\",\n };\n}\nconst defaultSTSHttpAuthSchemeProvider = (authParameters) => {\n const options = [];\n switch (authParameters.operation) {\n case \"AssumeRoleWithWebIdentity\": {\n options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));\n break;\n }\n default: {\n options.push(createAwsAuthSigv4HttpAuthOption(authParameters));\n }\n }\n return options;\n};\nexports.defaultSTSHttpAuthSchemeProvider = defaultSTSHttpAuthSchemeProvider;\nconst resolveStsAuthConfig = (input) => Object.assign(input, {\n stsClientCtor: STSClient_1.STSClient,\n});\nexports.resolveStsAuthConfig = resolveStsAuthConfig;\nconst resolveHttpAuthSchemeConfig = (config) => {\n const config_0 = (0, exports.resolveStsAuthConfig)(config);\n const config_1 = (0, core_1.resolveAwsSdkSigV4Config)(config_0);\n return Object.assign(config_1, {\n authSchemePreference: (0, util_middleware_1.normalizeProvider)(config.authSchemePreference ?? []),\n });\n};\nexports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.commonParams = exports.resolveClientEndpointParameters = void 0;\nconst resolveClientEndpointParameters = (options) => {\n return Object.assign(options, {\n useDualstackEndpoint: options.useDualstackEndpoint ?? false,\n useFipsEndpoint: options.useFipsEndpoint ?? false,\n useGlobalEndpoint: options.useGlobalEndpoint ?? false,\n defaultSigningName: \"sts\",\n });\n};\nexports.resolveClientEndpointParameters = resolveClientEndpointParameters;\nexports.commonParams = {\n UseGlobalEndpoint: { type: \"builtInParams\", name: \"useGlobalEndpoint\" },\n UseFIPS: { type: \"builtInParams\", name: \"useFipsEndpoint\" },\n Endpoint: { type: \"builtInParams\", name: \"endpoint\" },\n Region: { type: \"builtInParams\", name: \"region\" },\n UseDualStack: { type: \"builtInParams\", name: \"useDualstackEndpoint\" },\n};\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.defaultEndpointResolver = void 0;\nconst util_endpoints_1 = require(\"@aws-sdk/util-endpoints\");\nconst util_endpoints_2 = require(\"@smithy/util-endpoints\");\nconst ruleset_1 = require(\"./ruleset\");\nconst cache = new util_endpoints_2.EndpointCache({\n size: 50,\n params: [\"Endpoint\", \"Region\", \"UseDualStack\", \"UseFIPS\", \"UseGlobalEndpoint\"],\n});\nconst defaultEndpointResolver = (endpointParams, context = {}) => {\n return cache.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, {\n endpointParams: endpointParams,\n logger: context.logger,\n }));\n};\nexports.defaultEndpointResolver = defaultEndpointResolver;\nutil_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ruleSet = void 0;\nconst F = \"required\", G = \"type\", H = \"fn\", I = \"argv\", J = \"ref\";\nconst a = false, b = true, c = \"booleanEquals\", d = \"stringEquals\", e = \"sigv4\", f = \"sts\", g = \"us-east-1\", h = \"endpoint\", i = \"https://sts.{Region}.{PartitionResult#dnsSuffix}\", j = \"tree\", k = \"error\", l = \"getAttr\", m = { [F]: false, [G]: \"String\" }, n = { [F]: true, \"default\": false, [G]: \"Boolean\" }, o = { [J]: \"Endpoint\" }, p = { [H]: \"isSet\", [I]: [{ [J]: \"Region\" }] }, q = { [J]: \"Region\" }, r = { [H]: \"aws.partition\", [I]: [q], \"assign\": \"PartitionResult\" }, s = { [J]: \"UseFIPS\" }, t = { [J]: \"UseDualStack\" }, u = { \"url\": \"https://sts.amazonaws.com\", \"properties\": { \"authSchemes\": [{ \"name\": e, \"signingName\": f, \"signingRegion\": g }] }, \"headers\": {} }, v = {}, w = { \"conditions\": [{ [H]: d, [I]: [q, \"aws-global\"] }], [h]: u, [G]: h }, x = { [H]: c, [I]: [s, true] }, y = { [H]: c, [I]: [t, true] }, z = { [H]: l, [I]: [{ [J]: \"PartitionResult\" }, \"supportsFIPS\"] }, A = { [J]: \"PartitionResult\" }, B = { [H]: c, [I]: [true, { [H]: l, [I]: [A, \"supportsDualStack\"] }] }, C = [{ [H]: \"isSet\", [I]: [o] }], D = [x], E = [y];\nconst _data = { version: \"1.0\", parameters: { Region: m, UseDualStack: n, UseFIPS: n, Endpoint: m, UseGlobalEndpoint: n }, rules: [{ conditions: [{ [H]: c, [I]: [{ [J]: \"UseGlobalEndpoint\" }, b] }, { [H]: \"not\", [I]: C }, p, r, { [H]: c, [I]: [s, a] }, { [H]: c, [I]: [t, a] }], rules: [{ conditions: [{ [H]: d, [I]: [q, \"ap-northeast-1\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"ap-south-1\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"ap-southeast-1\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"ap-southeast-2\"] }], endpoint: u, [G]: h }, w, { conditions: [{ [H]: d, [I]: [q, \"ca-central-1\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"eu-central-1\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"eu-north-1\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"eu-west-1\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"eu-west-2\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"eu-west-3\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"sa-east-1\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, g] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"us-east-2\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"us-west-1\"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, \"us-west-2\"] }], endpoint: u, [G]: h }, { endpoint: { url: i, properties: { authSchemes: [{ name: e, signingName: f, signingRegion: \"{Region}\" }] }, headers: v }, [G]: h }], [G]: j }, { conditions: C, rules: [{ conditions: D, error: \"Invalid Configuration: FIPS and custom endpoint are not supported\", [G]: k }, { conditions: E, error: \"Invalid Configuration: Dualstack and custom endpoint are not supported\", [G]: k }, { endpoint: { url: o, properties: v, headers: v }, [G]: h }], [G]: j }, { conditions: [p], rules: [{ conditions: [r], rules: [{ conditions: [x, y], rules: [{ conditions: [{ [H]: c, [I]: [b, z] }, B], rules: [{ endpoint: { url: \"https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}\", properties: v, headers: v }, [G]: h }], [G]: j }, { error: \"FIPS and DualStack are enabled, but this partition does not support one or both\", [G]: k }], [G]: j }, { conditions: D, rules: [{ conditions: [{ [H]: c, [I]: [z, b] }], rules: [{ conditions: [{ [H]: d, [I]: [{ [H]: l, [I]: [A, \"name\"] }, \"aws-us-gov\"] }], endpoint: { url: \"https://sts.{Region}.amazonaws.com\", properties: v, headers: v }, [G]: h }, { endpoint: { url: \"https://sts-fips.{Region}.{PartitionResult#dnsSuffix}\", properties: v, headers: v }, [G]: h }], [G]: j }, { error: \"FIPS is enabled but this partition does not support FIPS\", [G]: k }], [G]: j }, { conditions: E, rules: [{ conditions: [B], rules: [{ endpoint: { url: \"https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}\", properties: v, headers: v }, [G]: h }], [G]: j }, { error: \"DualStack is enabled but this partition does not support DualStack\", [G]: k }], [G]: j }, w, { endpoint: { url: i, properties: v, headers: v }, [G]: h }], [G]: j }], [G]: j }, { error: \"Invalid Configuration: Missing Region\", [G]: k }] };\nexports.ruleSet = _data;\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/submodules/sts/index.ts\nvar index_exports = {};\n__export(index_exports, {\n AssumeRoleCommand: () => AssumeRoleCommand,\n AssumeRoleResponseFilterSensitiveLog: () => AssumeRoleResponseFilterSensitiveLog,\n AssumeRoleWithWebIdentityCommand: () => AssumeRoleWithWebIdentityCommand,\n AssumeRoleWithWebIdentityRequestFilterSensitiveLog: () => AssumeRoleWithWebIdentityRequestFilterSensitiveLog,\n AssumeRoleWithWebIdentityResponseFilterSensitiveLog: () => AssumeRoleWithWebIdentityResponseFilterSensitiveLog,\n ClientInputEndpointParameters: () => import_EndpointParameters3.ClientInputEndpointParameters,\n CredentialsFilterSensitiveLog: () => CredentialsFilterSensitiveLog,\n ExpiredTokenException: () => ExpiredTokenException,\n IDPCommunicationErrorException: () => IDPCommunicationErrorException,\n IDPRejectedClaimException: () => IDPRejectedClaimException,\n InvalidIdentityTokenException: () => InvalidIdentityTokenException,\n MalformedPolicyDocumentException: () => MalformedPolicyDocumentException,\n PackedPolicyTooLargeException: () => PackedPolicyTooLargeException,\n RegionDisabledException: () => RegionDisabledException,\n STS: () => STS,\n STSServiceException: () => STSServiceException,\n decorateDefaultCredentialProvider: () => decorateDefaultCredentialProvider,\n getDefaultRoleAssumer: () => getDefaultRoleAssumer2,\n getDefaultRoleAssumerWithWebIdentity: () => getDefaultRoleAssumerWithWebIdentity2\n});\nmodule.exports = __toCommonJS(index_exports);\n__reExport(index_exports, require(\"./STSClient\"), module.exports);\n\n// src/submodules/sts/STS.ts\nvar import_smithy_client6 = require(\"@smithy/smithy-client\");\n\n// src/submodules/sts/commands/AssumeRoleCommand.ts\nvar import_middleware_endpoint = require(\"@smithy/middleware-endpoint\");\nvar import_middleware_serde = require(\"@smithy/middleware-serde\");\nvar import_smithy_client4 = require(\"@smithy/smithy-client\");\nvar import_EndpointParameters = require(\"./endpoint/EndpointParameters\");\n\n// src/submodules/sts/models/models_0.ts\nvar import_smithy_client2 = require(\"@smithy/smithy-client\");\n\n// src/submodules/sts/models/STSServiceException.ts\nvar import_smithy_client = require(\"@smithy/smithy-client\");\nvar STSServiceException = class _STSServiceException extends import_smithy_client.ServiceException {\n static {\n __name(this, \"STSServiceException\");\n }\n /**\n * @internal\n */\n constructor(options) {\n super(options);\n Object.setPrototypeOf(this, _STSServiceException.prototype);\n }\n};\n\n// src/submodules/sts/models/models_0.ts\nvar CredentialsFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.SecretAccessKey && { SecretAccessKey: import_smithy_client2.SENSITIVE_STRING }\n}), \"CredentialsFilterSensitiveLog\");\nvar AssumeRoleResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) }\n}), \"AssumeRoleResponseFilterSensitiveLog\");\nvar ExpiredTokenException = class _ExpiredTokenException extends STSServiceException {\n static {\n __name(this, \"ExpiredTokenException\");\n }\n name = \"ExpiredTokenException\";\n $fault = \"client\";\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"ExpiredTokenException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _ExpiredTokenException.prototype);\n }\n};\nvar MalformedPolicyDocumentException = class _MalformedPolicyDocumentException extends STSServiceException {\n static {\n __name(this, \"MalformedPolicyDocumentException\");\n }\n name = \"MalformedPolicyDocumentException\";\n $fault = \"client\";\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"MalformedPolicyDocumentException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _MalformedPolicyDocumentException.prototype);\n }\n};\nvar PackedPolicyTooLargeException = class _PackedPolicyTooLargeException extends STSServiceException {\n static {\n __name(this, \"PackedPolicyTooLargeException\");\n }\n name = \"PackedPolicyTooLargeException\";\n $fault = \"client\";\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"PackedPolicyTooLargeException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _PackedPolicyTooLargeException.prototype);\n }\n};\nvar RegionDisabledException = class _RegionDisabledException extends STSServiceException {\n static {\n __name(this, \"RegionDisabledException\");\n }\n name = \"RegionDisabledException\";\n $fault = \"client\";\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"RegionDisabledException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _RegionDisabledException.prototype);\n }\n};\nvar IDPRejectedClaimException = class _IDPRejectedClaimException extends STSServiceException {\n static {\n __name(this, \"IDPRejectedClaimException\");\n }\n name = \"IDPRejectedClaimException\";\n $fault = \"client\";\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"IDPRejectedClaimException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _IDPRejectedClaimException.prototype);\n }\n};\nvar InvalidIdentityTokenException = class _InvalidIdentityTokenException extends STSServiceException {\n static {\n __name(this, \"InvalidIdentityTokenException\");\n }\n name = \"InvalidIdentityTokenException\";\n $fault = \"client\";\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"InvalidIdentityTokenException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _InvalidIdentityTokenException.prototype);\n }\n};\nvar AssumeRoleWithWebIdentityRequestFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.WebIdentityToken && { WebIdentityToken: import_smithy_client2.SENSITIVE_STRING }\n}), \"AssumeRoleWithWebIdentityRequestFilterSensitiveLog\");\nvar AssumeRoleWithWebIdentityResponseFilterSensitiveLog = /* @__PURE__ */ __name((obj) => ({\n ...obj,\n ...obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) }\n}), \"AssumeRoleWithWebIdentityResponseFilterSensitiveLog\");\nvar IDPCommunicationErrorException = class _IDPCommunicationErrorException extends STSServiceException {\n static {\n __name(this, \"IDPCommunicationErrorException\");\n }\n name = \"IDPCommunicationErrorException\";\n $fault = \"client\";\n /**\n * @internal\n */\n constructor(opts) {\n super({\n name: \"IDPCommunicationErrorException\",\n $fault: \"client\",\n ...opts\n });\n Object.setPrototypeOf(this, _IDPCommunicationErrorException.prototype);\n }\n};\n\n// src/submodules/sts/protocols/Aws_query.ts\nvar import_core = require(\"@aws-sdk/core\");\nvar import_protocol_http = require(\"@smithy/protocol-http\");\nvar import_smithy_client3 = require(\"@smithy/smithy-client\");\nvar se_AssumeRoleCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_AssumeRoleRequest(input, context),\n [_A]: _AR,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_AssumeRoleCommand\");\nvar se_AssumeRoleWithWebIdentityCommand = /* @__PURE__ */ __name(async (input, context) => {\n const headers = SHARED_HEADERS;\n let body;\n body = buildFormUrlencodedString({\n ...se_AssumeRoleWithWebIdentityRequest(input, context),\n [_A]: _ARWWI,\n [_V]: _\n });\n return buildHttpRpcRequest(context, headers, \"/\", void 0, body);\n}, \"se_AssumeRoleWithWebIdentityCommand\");\nvar de_AssumeRoleCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_AssumeRoleResponse(data.AssumeRoleResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_AssumeRoleCommand\");\nvar de_AssumeRoleWithWebIdentityCommand = /* @__PURE__ */ __name(async (output, context) => {\n if (output.statusCode >= 300) {\n return de_CommandError(output, context);\n }\n const data = await (0, import_core.parseXmlBody)(output.body, context);\n let contents = {};\n contents = de_AssumeRoleWithWebIdentityResponse(data.AssumeRoleWithWebIdentityResult, context);\n const response = {\n $metadata: deserializeMetadata(output),\n ...contents\n };\n return response;\n}, \"de_AssumeRoleWithWebIdentityCommand\");\nvar de_CommandError = /* @__PURE__ */ __name(async (output, context) => {\n const parsedOutput = {\n ...output,\n body: await (0, import_core.parseXmlErrorBody)(output.body, context)\n };\n const errorCode = loadQueryErrorCode(output, parsedOutput.body);\n switch (errorCode) {\n case \"ExpiredTokenException\":\n case \"com.amazonaws.sts#ExpiredTokenException\":\n throw await de_ExpiredTokenExceptionRes(parsedOutput, context);\n case \"MalformedPolicyDocument\":\n case \"com.amazonaws.sts#MalformedPolicyDocumentException\":\n throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput, context);\n case \"PackedPolicyTooLarge\":\n case \"com.amazonaws.sts#PackedPolicyTooLargeException\":\n throw await de_PackedPolicyTooLargeExceptionRes(parsedOutput, context);\n case \"RegionDisabledException\":\n case \"com.amazonaws.sts#RegionDisabledException\":\n throw await de_RegionDisabledExceptionRes(parsedOutput, context);\n case \"IDPCommunicationError\":\n case \"com.amazonaws.sts#IDPCommunicationErrorException\":\n throw await de_IDPCommunicationErrorExceptionRes(parsedOutput, context);\n case \"IDPRejectedClaim\":\n case \"com.amazonaws.sts#IDPRejectedClaimException\":\n throw await de_IDPRejectedClaimExceptionRes(parsedOutput, context);\n case \"InvalidIdentityToken\":\n case \"com.amazonaws.sts#InvalidIdentityTokenException\":\n throw await de_InvalidIdentityTokenExceptionRes(parsedOutput, context);\n default:\n const parsedBody = parsedOutput.body;\n return throwDefaultError({\n output,\n parsedBody: parsedBody.Error,\n errorCode\n });\n }\n}, \"de_CommandError\");\nvar de_ExpiredTokenExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_ExpiredTokenException(body.Error, context);\n const exception = new ExpiredTokenException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client3.decorateServiceException)(exception, body);\n}, \"de_ExpiredTokenExceptionRes\");\nvar de_IDPCommunicationErrorExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_IDPCommunicationErrorException(body.Error, context);\n const exception = new IDPCommunicationErrorException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client3.decorateServiceException)(exception, body);\n}, \"de_IDPCommunicationErrorExceptionRes\");\nvar de_IDPRejectedClaimExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_IDPRejectedClaimException(body.Error, context);\n const exception = new IDPRejectedClaimException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client3.decorateServiceException)(exception, body);\n}, \"de_IDPRejectedClaimExceptionRes\");\nvar de_InvalidIdentityTokenExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_InvalidIdentityTokenException(body.Error, context);\n const exception = new InvalidIdentityTokenException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client3.decorateServiceException)(exception, body);\n}, \"de_InvalidIdentityTokenExceptionRes\");\nvar de_MalformedPolicyDocumentExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_MalformedPolicyDocumentException(body.Error, context);\n const exception = new MalformedPolicyDocumentException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client3.decorateServiceException)(exception, body);\n}, \"de_MalformedPolicyDocumentExceptionRes\");\nvar de_PackedPolicyTooLargeExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_PackedPolicyTooLargeException(body.Error, context);\n const exception = new PackedPolicyTooLargeException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client3.decorateServiceException)(exception, body);\n}, \"de_PackedPolicyTooLargeExceptionRes\");\nvar de_RegionDisabledExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {\n const body = parsedOutput.body;\n const deserialized = de_RegionDisabledException(body.Error, context);\n const exception = new RegionDisabledException({\n $metadata: deserializeMetadata(parsedOutput),\n ...deserialized\n });\n return (0, import_smithy_client3.decorateServiceException)(exception, body);\n}, \"de_RegionDisabledExceptionRes\");\nvar se_AssumeRoleRequest = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_RA] != null) {\n entries[_RA] = input[_RA];\n }\n if (input[_RSN] != null) {\n entries[_RSN] = input[_RSN];\n }\n if (input[_PA] != null) {\n const memberEntries = se_policyDescriptorListType(input[_PA], context);\n if (input[_PA]?.length === 0) {\n entries.PolicyArns = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `PolicyArns.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_P] != null) {\n entries[_P] = input[_P];\n }\n if (input[_DS] != null) {\n entries[_DS] = input[_DS];\n }\n if (input[_T] != null) {\n const memberEntries = se_tagListType(input[_T], context);\n if (input[_T]?.length === 0) {\n entries.Tags = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `Tags.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_TTK] != null) {\n const memberEntries = se_tagKeyListType(input[_TTK], context);\n if (input[_TTK]?.length === 0) {\n entries.TransitiveTagKeys = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `TransitiveTagKeys.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_EI] != null) {\n entries[_EI] = input[_EI];\n }\n if (input[_SN] != null) {\n entries[_SN] = input[_SN];\n }\n if (input[_TC] != null) {\n entries[_TC] = input[_TC];\n }\n if (input[_SI] != null) {\n entries[_SI] = input[_SI];\n }\n if (input[_PC] != null) {\n const memberEntries = se_ProvidedContextsListType(input[_PC], context);\n if (input[_PC]?.length === 0) {\n entries.ProvidedContexts = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `ProvidedContexts.${key}`;\n entries[loc] = value;\n });\n }\n return entries;\n}, \"se_AssumeRoleRequest\");\nvar se_AssumeRoleWithWebIdentityRequest = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_RA] != null) {\n entries[_RA] = input[_RA];\n }\n if (input[_RSN] != null) {\n entries[_RSN] = input[_RSN];\n }\n if (input[_WIT] != null) {\n entries[_WIT] = input[_WIT];\n }\n if (input[_PI] != null) {\n entries[_PI] = input[_PI];\n }\n if (input[_PA] != null) {\n const memberEntries = se_policyDescriptorListType(input[_PA], context);\n if (input[_PA]?.length === 0) {\n entries.PolicyArns = [];\n }\n Object.entries(memberEntries).forEach(([key, value]) => {\n const loc = `PolicyArns.${key}`;\n entries[loc] = value;\n });\n }\n if (input[_P] != null) {\n entries[_P] = input[_P];\n }\n if (input[_DS] != null) {\n entries[_DS] = input[_DS];\n }\n return entries;\n}, \"se_AssumeRoleWithWebIdentityRequest\");\nvar se_policyDescriptorListType = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n const memberEntries = se_PolicyDescriptorType(entry, context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n entries[`member.${counter}.${key}`] = value;\n });\n counter++;\n }\n return entries;\n}, \"se_policyDescriptorListType\");\nvar se_PolicyDescriptorType = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_a] != null) {\n entries[_a] = input[_a];\n }\n return entries;\n}, \"se_PolicyDescriptorType\");\nvar se_ProvidedContext = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_PAr] != null) {\n entries[_PAr] = input[_PAr];\n }\n if (input[_CA] != null) {\n entries[_CA] = input[_CA];\n }\n return entries;\n}, \"se_ProvidedContext\");\nvar se_ProvidedContextsListType = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n const memberEntries = se_ProvidedContext(entry, context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n entries[`member.${counter}.${key}`] = value;\n });\n counter++;\n }\n return entries;\n}, \"se_ProvidedContextsListType\");\nvar se_Tag = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n if (input[_K] != null) {\n entries[_K] = input[_K];\n }\n if (input[_Va] != null) {\n entries[_Va] = input[_Va];\n }\n return entries;\n}, \"se_Tag\");\nvar se_tagKeyListType = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n entries[`member.${counter}`] = entry;\n counter++;\n }\n return entries;\n}, \"se_tagKeyListType\");\nvar se_tagListType = /* @__PURE__ */ __name((input, context) => {\n const entries = {};\n let counter = 1;\n for (const entry of input) {\n if (entry === null) {\n continue;\n }\n const memberEntries = se_Tag(entry, context);\n Object.entries(memberEntries).forEach(([key, value]) => {\n entries[`member.${counter}.${key}`] = value;\n });\n counter++;\n }\n return entries;\n}, \"se_tagListType\");\nvar de_AssumedRoleUser = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_ARI] != null) {\n contents[_ARI] = (0, import_smithy_client3.expectString)(output[_ARI]);\n }\n if (output[_Ar] != null) {\n contents[_Ar] = (0, import_smithy_client3.expectString)(output[_Ar]);\n }\n return contents;\n}, \"de_AssumedRoleUser\");\nvar de_AssumeRoleResponse = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_C] != null) {\n contents[_C] = de_Credentials(output[_C], context);\n }\n if (output[_ARU] != null) {\n contents[_ARU] = de_AssumedRoleUser(output[_ARU], context);\n }\n if (output[_PPS] != null) {\n contents[_PPS] = (0, import_smithy_client3.strictParseInt32)(output[_PPS]);\n }\n if (output[_SI] != null) {\n contents[_SI] = (0, import_smithy_client3.expectString)(output[_SI]);\n }\n return contents;\n}, \"de_AssumeRoleResponse\");\nvar de_AssumeRoleWithWebIdentityResponse = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_C] != null) {\n contents[_C] = de_Credentials(output[_C], context);\n }\n if (output[_SFWIT] != null) {\n contents[_SFWIT] = (0, import_smithy_client3.expectString)(output[_SFWIT]);\n }\n if (output[_ARU] != null) {\n contents[_ARU] = de_AssumedRoleUser(output[_ARU], context);\n }\n if (output[_PPS] != null) {\n contents[_PPS] = (0, import_smithy_client3.strictParseInt32)(output[_PPS]);\n }\n if (output[_Pr] != null) {\n contents[_Pr] = (0, import_smithy_client3.expectString)(output[_Pr]);\n }\n if (output[_Au] != null) {\n contents[_Au] = (0, import_smithy_client3.expectString)(output[_Au]);\n }\n if (output[_SI] != null) {\n contents[_SI] = (0, import_smithy_client3.expectString)(output[_SI]);\n }\n return contents;\n}, \"de_AssumeRoleWithWebIdentityResponse\");\nvar de_Credentials = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_AKI] != null) {\n contents[_AKI] = (0, import_smithy_client3.expectString)(output[_AKI]);\n }\n if (output[_SAK] != null) {\n contents[_SAK] = (0, import_smithy_client3.expectString)(output[_SAK]);\n }\n if (output[_ST] != null) {\n contents[_ST] = (0, import_smithy_client3.expectString)(output[_ST]);\n }\n if (output[_E] != null) {\n contents[_E] = (0, import_smithy_client3.expectNonNull)((0, import_smithy_client3.parseRfc3339DateTimeWithOffset)(output[_E]));\n }\n return contents;\n}, \"de_Credentials\");\nvar de_ExpiredTokenException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_m] != null) {\n contents[_m] = (0, import_smithy_client3.expectString)(output[_m]);\n }\n return contents;\n}, \"de_ExpiredTokenException\");\nvar de_IDPCommunicationErrorException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_m] != null) {\n contents[_m] = (0, import_smithy_client3.expectString)(output[_m]);\n }\n return contents;\n}, \"de_IDPCommunicationErrorException\");\nvar de_IDPRejectedClaimException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_m] != null) {\n contents[_m] = (0, import_smithy_client3.expectString)(output[_m]);\n }\n return contents;\n}, \"de_IDPRejectedClaimException\");\nvar de_InvalidIdentityTokenException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_m] != null) {\n contents[_m] = (0, import_smithy_client3.expectString)(output[_m]);\n }\n return contents;\n}, \"de_InvalidIdentityTokenException\");\nvar de_MalformedPolicyDocumentException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_m] != null) {\n contents[_m] = (0, import_smithy_client3.expectString)(output[_m]);\n }\n return contents;\n}, \"de_MalformedPolicyDocumentException\");\nvar de_PackedPolicyTooLargeException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_m] != null) {\n contents[_m] = (0, import_smithy_client3.expectString)(output[_m]);\n }\n return contents;\n}, \"de_PackedPolicyTooLargeException\");\nvar de_RegionDisabledException = /* @__PURE__ */ __name((output, context) => {\n const contents = {};\n if (output[_m] != null) {\n contents[_m] = (0, import_smithy_client3.expectString)(output[_m]);\n }\n return contents;\n}, \"de_RegionDisabledException\");\nvar deserializeMetadata = /* @__PURE__ */ __name((output) => ({\n httpStatusCode: output.statusCode,\n requestId: output.headers[\"x-amzn-requestid\"] ?? output.headers[\"x-amzn-request-id\"] ?? output.headers[\"x-amz-request-id\"],\n extendedRequestId: output.headers[\"x-amz-id-2\"],\n cfId: output.headers[\"x-amz-cf-id\"]\n}), \"deserializeMetadata\");\nvar throwDefaultError = (0, import_smithy_client3.withBaseException)(STSServiceException);\nvar buildHttpRpcRequest = /* @__PURE__ */ __name(async (context, headers, path, resolvedHostname, body) => {\n const { hostname, protocol = \"https\", port, path: basePath } = await context.endpoint();\n const contents = {\n protocol,\n hostname,\n port,\n method: \"POST\",\n path: basePath.endsWith(\"/\") ? basePath.slice(0, -1) + path : basePath + path,\n headers\n };\n if (resolvedHostname !== void 0) {\n contents.hostname = resolvedHostname;\n }\n if (body !== void 0) {\n contents.body = body;\n }\n return new import_protocol_http.HttpRequest(contents);\n}, \"buildHttpRpcRequest\");\nvar SHARED_HEADERS = {\n \"content-type\": \"application/x-www-form-urlencoded\"\n};\nvar _ = \"2011-06-15\";\nvar _A = \"Action\";\nvar _AKI = \"AccessKeyId\";\nvar _AR = \"AssumeRole\";\nvar _ARI = \"AssumedRoleId\";\nvar _ARU = \"AssumedRoleUser\";\nvar _ARWWI = \"AssumeRoleWithWebIdentity\";\nvar _Ar = \"Arn\";\nvar _Au = \"Audience\";\nvar _C = \"Credentials\";\nvar _CA = \"ContextAssertion\";\nvar _DS = \"DurationSeconds\";\nvar _E = \"Expiration\";\nvar _EI = \"ExternalId\";\nvar _K = \"Key\";\nvar _P = \"Policy\";\nvar _PA = \"PolicyArns\";\nvar _PAr = \"ProviderArn\";\nvar _PC = \"ProvidedContexts\";\nvar _PI = \"ProviderId\";\nvar _PPS = \"PackedPolicySize\";\nvar _Pr = \"Provider\";\nvar _RA = \"RoleArn\";\nvar _RSN = \"RoleSessionName\";\nvar _SAK = \"SecretAccessKey\";\nvar _SFWIT = \"SubjectFromWebIdentityToken\";\nvar _SI = \"SourceIdentity\";\nvar _SN = \"SerialNumber\";\nvar _ST = \"SessionToken\";\nvar _T = \"Tags\";\nvar _TC = \"TokenCode\";\nvar _TTK = \"TransitiveTagKeys\";\nvar _V = \"Version\";\nvar _Va = \"Value\";\nvar _WIT = \"WebIdentityToken\";\nvar _a = \"arn\";\nvar _m = \"message\";\nvar buildFormUrlencodedString = /* @__PURE__ */ __name((formEntries) => Object.entries(formEntries).map(([key, value]) => (0, import_smithy_client3.extendedEncodeURIComponent)(key) + \"=\" + (0, import_smithy_client3.extendedEncodeURIComponent)(value)).join(\"&\"), \"buildFormUrlencodedString\");\nvar loadQueryErrorCode = /* @__PURE__ */ __name((output, data) => {\n if (data.Error?.Code !== void 0) {\n return data.Error.Code;\n }\n if (output.statusCode == 404) {\n return \"NotFound\";\n }\n}, \"loadQueryErrorCode\");\n\n// src/submodules/sts/commands/AssumeRoleCommand.ts\nvar AssumeRoleCommand = class extends import_smithy_client4.Command.classBuilder().ep(import_EndpointParameters.commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSSecurityTokenServiceV20110615\", \"AssumeRole\", {}).n(\"STSClient\", \"AssumeRoleCommand\").f(void 0, AssumeRoleResponseFilterSensitiveLog).ser(se_AssumeRoleCommand).de(de_AssumeRoleCommand).build() {\n static {\n __name(this, \"AssumeRoleCommand\");\n }\n};\n\n// src/submodules/sts/commands/AssumeRoleWithWebIdentityCommand.ts\nvar import_middleware_endpoint2 = require(\"@smithy/middleware-endpoint\");\nvar import_middleware_serde2 = require(\"@smithy/middleware-serde\");\nvar import_smithy_client5 = require(\"@smithy/smithy-client\");\nvar import_EndpointParameters2 = require(\"./endpoint/EndpointParameters\");\nvar AssumeRoleWithWebIdentityCommand = class extends import_smithy_client5.Command.classBuilder().ep(import_EndpointParameters2.commonParams).m(function(Command, cs, config, o) {\n return [\n (0, import_middleware_serde2.getSerdePlugin)(config, this.serialize, this.deserialize),\n (0, import_middleware_endpoint2.getEndpointPlugin)(config, Command.getEndpointParameterInstructions())\n ];\n}).s(\"AWSSecurityTokenServiceV20110615\", \"AssumeRoleWithWebIdentity\", {}).n(\"STSClient\", \"AssumeRoleWithWebIdentityCommand\").f(AssumeRoleWithWebIdentityRequestFilterSensitiveLog, AssumeRoleWithWebIdentityResponseFilterSensitiveLog).ser(se_AssumeRoleWithWebIdentityCommand).de(de_AssumeRoleWithWebIdentityCommand).build() {\n static {\n __name(this, \"AssumeRoleWithWebIdentityCommand\");\n }\n};\n\n// src/submodules/sts/STS.ts\nvar import_STSClient = require(\"./STSClient\");\nvar commands = {\n AssumeRoleCommand,\n AssumeRoleWithWebIdentityCommand\n};\nvar STS = class extends import_STSClient.STSClient {\n static {\n __name(this, \"STS\");\n }\n};\n(0, import_smithy_client6.createAggregatedClient)(commands, STS);\n\n// src/submodules/sts/index.ts\nvar import_EndpointParameters3 = require(\"./endpoint/EndpointParameters\");\n\n// src/submodules/sts/defaultStsRoleAssumers.ts\nvar import_client = require(\"@aws-sdk/core/client\");\nvar ASSUME_ROLE_DEFAULT_REGION = \"us-east-1\";\nvar getAccountIdFromAssumedRoleUser = /* @__PURE__ */ __name((assumedRoleUser) => {\n if (typeof assumedRoleUser?.Arn === \"string\") {\n const arnComponents = assumedRoleUser.Arn.split(\":\");\n if (arnComponents.length > 4 && arnComponents[4] !== \"\") {\n return arnComponents[4];\n }\n }\n return void 0;\n}, \"getAccountIdFromAssumedRoleUser\");\nvar resolveRegion = /* @__PURE__ */ __name(async (_region, _parentRegion, credentialProviderLogger) => {\n const region = typeof _region === \"function\" ? await _region() : _region;\n const parentRegion = typeof _parentRegion === \"function\" ? await _parentRegion() : _parentRegion;\n credentialProviderLogger?.debug?.(\n \"@aws-sdk/client-sts::resolveRegion\",\n \"accepting first of:\",\n `${region} (provider)`,\n `${parentRegion} (parent client)`,\n `${ASSUME_ROLE_DEFAULT_REGION} (STS default)`\n );\n return region ?? parentRegion ?? ASSUME_ROLE_DEFAULT_REGION;\n}, \"resolveRegion\");\nvar getDefaultRoleAssumer = /* @__PURE__ */ __name((stsOptions, STSClient3) => {\n let stsClient;\n let closureSourceCreds;\n return async (sourceCreds, params) => {\n closureSourceCreds = sourceCreds;\n if (!stsClient) {\n const {\n logger = stsOptions?.parentClientConfig?.logger,\n region,\n requestHandler = stsOptions?.parentClientConfig?.requestHandler,\n credentialProviderLogger\n } = stsOptions;\n const resolvedRegion = await resolveRegion(\n region,\n stsOptions?.parentClientConfig?.region,\n credentialProviderLogger\n );\n const isCompatibleRequestHandler = !isH2(requestHandler);\n stsClient = new STSClient3({\n profile: stsOptions?.parentClientConfig?.profile,\n // A hack to make sts client uses the credential in current closure.\n credentialDefaultProvider: /* @__PURE__ */ __name(() => async () => closureSourceCreds, \"credentialDefaultProvider\"),\n region: resolvedRegion,\n requestHandler: isCompatibleRequestHandler ? requestHandler : void 0,\n logger\n });\n }\n const { Credentials: Credentials2, AssumedRoleUser: AssumedRoleUser2 } = await stsClient.send(new AssumeRoleCommand(params));\n if (!Credentials2 || !Credentials2.AccessKeyId || !Credentials2.SecretAccessKey) {\n throw new Error(`Invalid response from STS.assumeRole call with role ${params.RoleArn}`);\n }\n const accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser2);\n const credentials = {\n accessKeyId: Credentials2.AccessKeyId,\n secretAccessKey: Credentials2.SecretAccessKey,\n sessionToken: Credentials2.SessionToken,\n expiration: Credentials2.Expiration,\n // TODO(credentialScope): access normally when shape is updated.\n ...Credentials2.CredentialScope && { credentialScope: Credentials2.CredentialScope },\n ...accountId && { accountId }\n };\n (0, import_client.setCredentialFeature)(credentials, \"CREDENTIALS_STS_ASSUME_ROLE\", \"i\");\n return credentials;\n };\n}, \"getDefaultRoleAssumer\");\nvar getDefaultRoleAssumerWithWebIdentity = /* @__PURE__ */ __name((stsOptions, STSClient3) => {\n let stsClient;\n return async (params) => {\n if (!stsClient) {\n const {\n logger = stsOptions?.parentClientConfig?.logger,\n region,\n requestHandler = stsOptions?.parentClientConfig?.requestHandler,\n credentialProviderLogger\n } = stsOptions;\n const resolvedRegion = await resolveRegion(\n region,\n stsOptions?.parentClientConfig?.region,\n credentialProviderLogger\n );\n const isCompatibleRequestHandler = !isH2(requestHandler);\n stsClient = new STSClient3({\n profile: stsOptions?.parentClientConfig?.profile,\n region: resolvedRegion,\n requestHandler: isCompatibleRequestHandler ? requestHandler : void 0,\n logger\n });\n }\n const { Credentials: Credentials2, AssumedRoleUser: AssumedRoleUser2 } = await stsClient.send(new AssumeRoleWithWebIdentityCommand(params));\n if (!Credentials2 || !Credentials2.AccessKeyId || !Credentials2.SecretAccessKey) {\n throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${params.RoleArn}`);\n }\n const accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser2);\n const credentials = {\n accessKeyId: Credentials2.AccessKeyId,\n secretAccessKey: Credentials2.SecretAccessKey,\n sessionToken: Credentials2.SessionToken,\n expiration: Credentials2.Expiration,\n // TODO(credentialScope): access normally when shape is updated.\n ...Credentials2.CredentialScope && { credentialScope: Credentials2.CredentialScope },\n ...accountId && { accountId }\n };\n if (accountId) {\n (0, import_client.setCredentialFeature)(credentials, \"RESOLVED_ACCOUNT_ID\", \"T\");\n }\n (0, import_client.setCredentialFeature)(credentials, \"CREDENTIALS_STS_ASSUME_ROLE_WEB_ID\", \"k\");\n return credentials;\n };\n}, \"getDefaultRoleAssumerWithWebIdentity\");\nvar isH2 = /* @__PURE__ */ __name((requestHandler) => {\n return requestHandler?.metadata?.handlerProtocol === \"h2\";\n}, \"isH2\");\n\n// src/submodules/sts/defaultRoleAssumers.ts\nvar import_STSClient2 = require(\"./STSClient\");\nvar getCustomizableStsClientCtor = /* @__PURE__ */ __name((baseCtor, customizations) => {\n if (!customizations) return baseCtor;\n else\n return class CustomizableSTSClient extends baseCtor {\n static {\n __name(this, \"CustomizableSTSClient\");\n }\n constructor(config) {\n super(config);\n for (const customization of customizations) {\n this.middlewareStack.use(customization);\n }\n }\n };\n}, \"getCustomizableStsClientCtor\");\nvar getDefaultRoleAssumer2 = /* @__PURE__ */ __name((stsOptions = {}, stsPlugins) => getDefaultRoleAssumer(stsOptions, getCustomizableStsClientCtor(import_STSClient2.STSClient, stsPlugins)), \"getDefaultRoleAssumer\");\nvar getDefaultRoleAssumerWithWebIdentity2 = /* @__PURE__ */ __name((stsOptions = {}, stsPlugins) => getDefaultRoleAssumerWithWebIdentity(stsOptions, getCustomizableStsClientCtor(import_STSClient2.STSClient, stsPlugins)), \"getDefaultRoleAssumerWithWebIdentity\");\nvar decorateDefaultCredentialProvider = /* @__PURE__ */ __name((provider) => (input) => provider({\n roleAssumer: getDefaultRoleAssumer2(input),\n roleAssumerWithWebIdentity: getDefaultRoleAssumerWithWebIdentity2(input),\n ...input\n}), \"decorateDefaultCredentialProvider\");\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n AssumeRoleCommand,\n AssumeRoleResponseFilterSensitiveLog,\n AssumeRoleWithWebIdentityCommand,\n AssumeRoleWithWebIdentityRequestFilterSensitiveLog,\n AssumeRoleWithWebIdentityResponseFilterSensitiveLog,\n ClientInputEndpointParameters,\n CredentialsFilterSensitiveLog,\n ExpiredTokenException,\n IDPCommunicationErrorException,\n IDPRejectedClaimException,\n InvalidIdentityTokenException,\n MalformedPolicyDocumentException,\n PackedPolicyTooLargeException,\n RegionDisabledException,\n STS,\n STSServiceException,\n decorateDefaultCredentialProvider,\n getDefaultRoleAssumer,\n getDefaultRoleAssumerWithWebIdentity,\n ...require(\"./STSClient\")\n});\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getRuntimeConfig = void 0;\nconst tslib_1 = require(\"tslib\");\nconst package_json_1 = tslib_1.__importDefault(require(\"../../../package.json\"));\nconst core_1 = require(\"@aws-sdk/core\");\nconst util_user_agent_node_1 = require(\"@aws-sdk/util-user-agent-node\");\nconst config_resolver_1 = require(\"@smithy/config-resolver\");\nconst core_2 = require(\"@smithy/core\");\nconst hash_node_1 = require(\"@smithy/hash-node\");\nconst middleware_retry_1 = require(\"@smithy/middleware-retry\");\nconst node_config_provider_1 = require(\"@smithy/node-config-provider\");\nconst node_http_handler_1 = require(\"@smithy/node-http-handler\");\nconst util_body_length_node_1 = require(\"@smithy/util-body-length-node\");\nconst util_retry_1 = require(\"@smithy/util-retry\");\nconst runtimeConfig_shared_1 = require(\"./runtimeConfig.shared\");\nconst smithy_client_1 = require(\"@smithy/smithy-client\");\nconst util_defaults_mode_node_1 = require(\"@smithy/util-defaults-mode-node\");\nconst smithy_client_2 = require(\"@smithy/smithy-client\");\nconst getRuntimeConfig = (config) => {\n (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version);\n const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);\n const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);\n const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);\n (0, core_1.emitWarningIfUnsupportedVersion)(process.version);\n const loaderConfig = {\n profile: config?.profile,\n logger: clientSharedValues.logger,\n };\n return {\n ...clientSharedValues,\n ...config,\n runtime: \"node\",\n defaultsMode,\n authSchemePreference: config?.authSchemePreference ?? (0, node_config_provider_1.loadConfig)(core_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),\n bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,\n defaultUserAgentProvider: config?.defaultUserAgentProvider ??\n (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),\n httpAuthSchemes: config?.httpAuthSchemes ?? [\n {\n schemeId: \"aws.auth#sigv4\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"aws.auth#sigv4\") ||\n (async (idProps) => await config.credentialDefaultProvider(idProps?.__config || {})()),\n signer: new core_1.AwsSdkSigV4Signer(),\n },\n {\n schemeId: \"smithy.api#noAuth\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"smithy.api#noAuth\") || (async () => ({})),\n signer: new core_2.NoAuthSigner(),\n },\n ],\n maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),\n region: config?.region ??\n (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),\n requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),\n retryMode: config?.retryMode ??\n (0, node_config_provider_1.loadConfig)({\n ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,\n default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE,\n }, config),\n sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, \"sha256\"),\n streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,\n useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),\n userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig),\n };\n};\nexports.getRuntimeConfig = getRuntimeConfig;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getRuntimeConfig = void 0;\nconst core_1 = require(\"@aws-sdk/core\");\nconst core_2 = require(\"@smithy/core\");\nconst smithy_client_1 = require(\"@smithy/smithy-client\");\nconst url_parser_1 = require(\"@smithy/url-parser\");\nconst util_base64_1 = require(\"@smithy/util-base64\");\nconst util_utf8_1 = require(\"@smithy/util-utf8\");\nconst httpAuthSchemeProvider_1 = require(\"./auth/httpAuthSchemeProvider\");\nconst endpointResolver_1 = require(\"./endpoint/endpointResolver\");\nconst getRuntimeConfig = (config) => {\n return {\n apiVersion: \"2011-06-15\",\n base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64,\n base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,\n disableHostPrefix: config?.disableHostPrefix ?? false,\n endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,\n extensions: config?.extensions ?? [],\n httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSTSHttpAuthSchemeProvider,\n httpAuthSchemes: config?.httpAuthSchemes ?? [\n {\n schemeId: \"aws.auth#sigv4\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"aws.auth#sigv4\"),\n signer: new core_1.AwsSdkSigV4Signer(),\n },\n {\n schemeId: \"smithy.api#noAuth\",\n identityProvider: (ipc) => ipc.getIdentityProvider(\"smithy.api#noAuth\") || (async () => ({})),\n signer: new core_2.NoAuthSigner(),\n },\n ],\n logger: config?.logger ?? new smithy_client_1.NoOpLogger(),\n serviceId: config?.serviceId ?? \"STS\",\n urlParser: config?.urlParser ?? url_parser_1.parseUrl,\n utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,\n utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8,\n };\n};\nexports.getRuntimeConfig = getRuntimeConfig;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.resolveRuntimeExtensions = void 0;\nconst region_config_resolver_1 = require(\"@aws-sdk/region-config-resolver\");\nconst protocol_http_1 = require(\"@smithy/protocol-http\");\nconst smithy_client_1 = require(\"@smithy/smithy-client\");\nconst httpAuthExtensionConfiguration_1 = require(\"./auth/httpAuthExtensionConfiguration\");\nconst resolveRuntimeExtensions = (runtimeConfig, extensions) => {\n const extensionConfiguration = Object.assign((0, region_config_resolver_1.getAwsRegionExtensionConfiguration)(runtimeConfig), (0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig), (0, protocol_http_1.getHttpHandlerExtensionConfiguration)(runtimeConfig), (0, httpAuthExtensionConfiguration_1.getHttpAuthExtensionConfiguration)(runtimeConfig));\n extensions.forEach((extension) => extension.configure(extensionConfiguration));\n return Object.assign(runtimeConfig, (0, region_config_resolver_1.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), (0, smithy_client_1.resolveDefaultRuntimeConfig)(extensionConfiguration), (0, protocol_http_1.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), (0, httpAuthExtensionConfiguration_1.resolveHttpAuthRuntimeConfig)(extensionConfiguration));\n};\nexports.resolveRuntimeExtensions = resolveRuntimeExtensions;\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar index_exports = {};\n__export(index_exports, {\n NODE_REGION_CONFIG_FILE_OPTIONS: () => NODE_REGION_CONFIG_FILE_OPTIONS,\n NODE_REGION_CONFIG_OPTIONS: () => NODE_REGION_CONFIG_OPTIONS,\n REGION_ENV_NAME: () => REGION_ENV_NAME,\n REGION_INI_NAME: () => REGION_INI_NAME,\n getAwsRegionExtensionConfiguration: () => getAwsRegionExtensionConfiguration,\n resolveAwsRegionExtensionConfiguration: () => resolveAwsRegionExtensionConfiguration,\n resolveRegionConfig: () => resolveRegionConfig\n});\nmodule.exports = __toCommonJS(index_exports);\n\n// src/extensions/index.ts\nvar getAwsRegionExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {\n return {\n setRegion(region) {\n runtimeConfig.region = region;\n },\n region() {\n return runtimeConfig.region;\n }\n };\n}, \"getAwsRegionExtensionConfiguration\");\nvar resolveAwsRegionExtensionConfiguration = /* @__PURE__ */ __name((awsRegionExtensionConfiguration) => {\n return {\n region: awsRegionExtensionConfiguration.region()\n };\n}, \"resolveAwsRegionExtensionConfiguration\");\n\n// src/regionConfig/config.ts\nvar REGION_ENV_NAME = \"AWS_REGION\";\nvar REGION_INI_NAME = \"region\";\nvar NODE_REGION_CONFIG_OPTIONS = {\n environmentVariableSelector: /* @__PURE__ */ __name((env) => env[REGION_ENV_NAME], \"environmentVariableSelector\"),\n configFileSelector: /* @__PURE__ */ __name((profile) => profile[REGION_INI_NAME], \"configFileSelector\"),\n default: /* @__PURE__ */ __name(() => {\n throw new Error(\"Region is missing\");\n }, \"default\")\n};\nvar NODE_REGION_CONFIG_FILE_OPTIONS = {\n preferredFile: \"credentials\"\n};\n\n// src/regionConfig/isFipsRegion.ts\nvar isFipsRegion = /* @__PURE__ */ __name((region) => typeof region === \"string\" && (region.startsWith(\"fips-\") || region.endsWith(\"-fips\")), \"isFipsRegion\");\n\n// src/regionConfig/getRealRegion.ts\nvar getRealRegion = /* @__PURE__ */ __name((region) => isFipsRegion(region) ? [\"fips-aws-global\", \"aws-fips\"].includes(region) ? \"us-east-1\" : region.replace(/fips-(dkr-|prod-)?|-fips/, \"\") : region, \"getRealRegion\");\n\n// src/regionConfig/resolveRegionConfig.ts\nvar resolveRegionConfig = /* @__PURE__ */ __name((input) => {\n const { region, useFipsEndpoint } = input;\n if (!region) {\n throw new Error(\"Region is missing\");\n }\n return Object.assign(input, {\n region: /* @__PURE__ */ __name(async () => {\n if (typeof region === \"string\") {\n return getRealRegion(region);\n }\n const providedRegion = await region();\n return getRealRegion(providedRegion);\n }, \"region\"),\n useFipsEndpoint: /* @__PURE__ */ __name(async () => {\n const providedRegion = typeof region === \"string\" ? region : await region();\n if (isFipsRegion(providedRegion)) {\n return true;\n }\n return typeof useFipsEndpoint !== \"function\" ? Promise.resolve(!!useFipsEndpoint) : useFipsEndpoint();\n }, \"useFipsEndpoint\")\n });\n}, \"resolveRegionConfig\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n getAwsRegionExtensionConfiguration,\n resolveAwsRegionExtensionConfiguration,\n REGION_ENV_NAME,\n REGION_INI_NAME,\n NODE_REGION_CONFIG_OPTIONS,\n NODE_REGION_CONFIG_FILE_OPTIONS,\n resolveRegionConfig\n});\n\n","\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar index_exports = {};\n__export(index_exports, {\n fromEnvSigningName: () => fromEnvSigningName,\n fromSso: () => fromSso,\n fromStatic: () => fromStatic,\n nodeProvider: () => nodeProvider\n});\nmodule.exports = __toCommonJS(index_exports);\n\n// src/fromEnvSigningName.ts\nvar import_core = require(\"@aws-sdk/core\");\nvar import_property_provider = require(\"@smithy/property-provider\");\nvar fromEnvSigningName = /* @__PURE__ */ __name(({ logger, signingName } = {}) => async () => {\n logger?.debug?.(\"@aws-sdk/token-providers - fromEnvSigningName\");\n if (!signingName) {\n throw new import_property_provider.TokenProviderError(\"Please pass 'signingName' to compute environment variable key\", { logger });\n }\n const bearerTokenKey = (0, import_core.getBearerTokenEnvKey)(signingName);\n if (!(bearerTokenKey in process.env)) {\n throw new import_property_provider.TokenProviderError(`Token not present in '${bearerTokenKey}' environment variable`, { logger });\n }\n return { token: process.env[bearerTokenKey] };\n}, \"fromEnvSigningName\");\n\n// src/fromSso.ts\n\n\n\n// src/constants.ts\nvar EXPIRE_WINDOW_MS = 5 * 60 * 1e3;\nvar REFRESH_MESSAGE = `To refresh this SSO session run 'aws sso login' with the corresponding profile.`;\n\n// src/getSsoOidcClient.ts\nvar getSsoOidcClient = /* @__PURE__ */ __name(async (ssoRegion, init = {}) => {\n const { SSOOIDCClient } = await Promise.resolve().then(() => __toESM(require(\"@aws-sdk/nested-clients/sso-oidc\")));\n const ssoOidcClient = new SSOOIDCClient(\n Object.assign({}, init.clientConfig ?? {}, {\n region: ssoRegion ?? init.clientConfig?.region,\n logger: init.clientConfig?.logger ?? init.parentClientConfig?.logger\n })\n );\n return ssoOidcClient;\n}, \"getSsoOidcClient\");\n\n// src/getNewSsoOidcToken.ts\nvar getNewSsoOidcToken = /* @__PURE__ */ __name(async (ssoToken, ssoRegion, init = {}) => {\n const { CreateTokenCommand } = await Promise.resolve().then(() => __toESM(require(\"@aws-sdk/nested-clients/sso-oidc\")));\n const ssoOidcClient = await getSsoOidcClient(ssoRegion, init);\n return ssoOidcClient.send(\n new CreateTokenCommand({\n clientId: ssoToken.clientId,\n clientSecret: ssoToken.clientSecret,\n refreshToken: ssoToken.refreshToken,\n grantType: \"refresh_token\"\n })\n );\n}, \"getNewSsoOidcToken\");\n\n// src/validateTokenExpiry.ts\n\nvar validateTokenExpiry = /* @__PURE__ */ __name((token) => {\n if (token.expiration && token.expiration.getTime() < Date.now()) {\n throw new import_property_provider.TokenProviderError(`Token is expired. ${REFRESH_MESSAGE}`, false);\n }\n}, \"validateTokenExpiry\");\n\n// src/validateTokenKey.ts\n\nvar validateTokenKey = /* @__PURE__ */ __name((key, value, forRefresh = false) => {\n if (typeof value === \"undefined\") {\n throw new import_property_provider.TokenProviderError(\n `Value not present for '${key}' in SSO Token${forRefresh ? \". Cannot refresh\" : \"\"}. ${REFRESH_MESSAGE}`,\n false\n );\n }\n}, \"validateTokenKey\");\n\n// src/writeSSOTokenToFile.ts\nvar import_shared_ini_file_loader = require(\"@smithy/shared-ini-file-loader\");\nvar import_fs = require(\"fs\");\nvar { writeFile } = import_fs.promises;\nvar writeSSOTokenToFile = /* @__PURE__ */ __name((id, ssoToken) => {\n const tokenFilepath = (0, import_shared_ini_file_loader.getSSOTokenFilepath)(id);\n const tokenString = JSON.stringify(ssoToken, null, 2);\n return writeFile(tokenFilepath, tokenString);\n}, \"writeSSOTokenToFile\");\n\n// src/fromSso.ts\nvar lastRefreshAttemptTime = /* @__PURE__ */ new Date(0);\nvar fromSso = /* @__PURE__ */ __name((_init = {}) => async ({ callerClientConfig } = {}) => {\n const init = {\n ..._init,\n parentClientConfig: {\n ...callerClientConfig,\n ..._init.parentClientConfig\n }\n };\n init.logger?.debug(\"@aws-sdk/token-providers - fromSso\");\n const profiles = await (0, import_shared_ini_file_loader.parseKnownFiles)(init);\n const profileName = (0, import_shared_ini_file_loader.getProfileName)({\n profile: init.profile ?? callerClientConfig?.profile\n });\n const profile = profiles[profileName];\n if (!profile) {\n throw new import_property_provider.TokenProviderError(`Profile '${profileName}' could not be found in shared credentials file.`, false);\n } else if (!profile[\"sso_session\"]) {\n throw new import_property_provider.TokenProviderError(`Profile '${profileName}' is missing required property 'sso_session'.`);\n }\n const ssoSessionName = profile[\"sso_session\"];\n const ssoSessions = await (0, import_shared_ini_file_loader.loadSsoSessionData)(init);\n const ssoSession = ssoSessions[ssoSessionName];\n if (!ssoSession) {\n throw new import_property_provider.TokenProviderError(\n `Sso session '${ssoSessionName}' could not be found in shared credentials file.`,\n false\n );\n }\n for (const ssoSessionRequiredKey of [\"sso_start_url\", \"sso_region\"]) {\n if (!ssoSession[ssoSessionRequiredKey]) {\n throw new import_property_provider.TokenProviderError(\n `Sso session '${ssoSessionName}' is missing required property '${ssoSessionRequiredKey}'.`,\n false\n );\n }\n }\n const ssoStartUrl = ssoSession[\"sso_start_url\"];\n const ssoRegion = ssoSession[\"sso_region\"];\n let ssoToken;\n try {\n ssoToken = await (0, import_shared_ini_file_loader.getSSOTokenFromFile)(ssoSessionName);\n } catch (e) {\n throw new import_property_provider.TokenProviderError(\n `The SSO session token associated with profile=${profileName} was not found or is invalid. ${REFRESH_MESSAGE}`,\n false\n );\n }\n validateTokenKey(\"accessToken\", ssoToken.accessToken);\n validateTokenKey(\"expiresAt\", ssoToken.expiresAt);\n const { accessToken, expiresAt } = ssoToken;\n const existingToken = { token: accessToken, expiration: new Date(expiresAt) };\n if (existingToken.expiration.getTime() - Date.now() > EXPIRE_WINDOW_MS) {\n return existingToken;\n }\n if (Date.now() - lastRefreshAttemptTime.getTime() < 30 * 1e3) {\n validateTokenExpiry(existingToken);\n return existingToken;\n }\n validateTokenKey(\"clientId\", ssoToken.clientId, true);\n validateTokenKey(\"clientSecret\", ssoToken.clientSecret, true);\n validateTokenKey(\"refreshToken\", ssoToken.refreshToken, true);\n try {\n lastRefreshAttemptTime.setTime(Date.now());\n const newSsoOidcToken = await getNewSsoOidcToken(ssoToken, ssoRegion, init);\n validateTokenKey(\"accessToken\", newSsoOidcToken.accessToken);\n validateTokenKey(\"expiresIn\", newSsoOidcToken.expiresIn);\n const newTokenExpiration = new Date(Date.now() + newSsoOidcToken.expiresIn * 1e3);\n try {\n await writeSSOTokenToFile(ssoSessionName, {\n ...ssoToken,\n accessToken: newSsoOidcToken.accessToken,\n expiresAt: newTokenExpiration.toISOString(),\n refreshToken: newSsoOidcToken.refreshToken\n });\n } catch (error) {\n }\n return {\n token: newSsoOidcToken.accessToken,\n expiration: newTokenExpiration\n };\n } catch (error) {\n validateTokenExpiry(existingToken);\n return existingToken;\n }\n}, \"fromSso\");\n\n// src/fromStatic.ts\n\nvar fromStatic = /* @__PURE__ */ __name(({ token, logger }) => async () => {\n logger?.debug(\"@aws-sdk/token-providers - fromStatic\");\n if (!token || !token.token) {\n throw new import_property_provider.TokenProviderError(`Please pass a valid token to fromStatic`, false);\n }\n return token;\n}, \"fromStatic\");\n\n// src/nodeProvider.ts\n\nvar nodeProvider = /* @__PURE__ */ __name((init = {}) => (0, import_property_provider.memoize)(\n (0, import_property_provider.chain)(fromSso(init), async () => {\n throw new import_property_provider.TokenProviderError(\"Could not load token from any providers\", false);\n }),\n (token) => token.expiration !== void 0 && token.expiration.getTime() - Date.now() < 3e5,\n (token) => token.expiration !== void 0\n), \"nodeProvider\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n fromEnvSigningName,\n fromSso,\n fromStatic,\n nodeProvider\n});\n\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar index_exports = {};\n__export(index_exports, {\n ConditionObject: () => import_util_endpoints.ConditionObject,\n DeprecatedObject: () => import_util_endpoints.DeprecatedObject,\n EndpointError: () => import_util_endpoints.EndpointError,\n EndpointObject: () => import_util_endpoints.EndpointObject,\n EndpointObjectHeaders: () => import_util_endpoints.EndpointObjectHeaders,\n EndpointObjectProperties: () => import_util_endpoints.EndpointObjectProperties,\n EndpointParams: () => import_util_endpoints.EndpointParams,\n EndpointResolverOptions: () => import_util_endpoints.EndpointResolverOptions,\n EndpointRuleObject: () => import_util_endpoints.EndpointRuleObject,\n ErrorRuleObject: () => import_util_endpoints.ErrorRuleObject,\n EvaluateOptions: () => import_util_endpoints.EvaluateOptions,\n Expression: () => import_util_endpoints.Expression,\n FunctionArgv: () => import_util_endpoints.FunctionArgv,\n FunctionObject: () => import_util_endpoints.FunctionObject,\n FunctionReturn: () => import_util_endpoints.FunctionReturn,\n ParameterObject: () => import_util_endpoints.ParameterObject,\n ReferenceObject: () => import_util_endpoints.ReferenceObject,\n ReferenceRecord: () => import_util_endpoints.ReferenceRecord,\n RuleSetObject: () => import_util_endpoints.RuleSetObject,\n RuleSetRules: () => import_util_endpoints.RuleSetRules,\n TreeRuleObject: () => import_util_endpoints.TreeRuleObject,\n awsEndpointFunctions: () => awsEndpointFunctions,\n getUserAgentPrefix: () => getUserAgentPrefix,\n isIpAddress: () => import_util_endpoints.isIpAddress,\n partition: () => partition,\n resolveEndpoint: () => import_util_endpoints.resolveEndpoint,\n setPartitionInfo: () => setPartitionInfo,\n useDefaultPartitionInfo: () => useDefaultPartitionInfo\n});\nmodule.exports = __toCommonJS(index_exports);\n\n// src/aws.ts\n\n\n// src/lib/aws/isVirtualHostableS3Bucket.ts\n\n\n// src/lib/isIpAddress.ts\nvar import_util_endpoints = require(\"@smithy/util-endpoints\");\n\n// src/lib/aws/isVirtualHostableS3Bucket.ts\nvar isVirtualHostableS3Bucket = /* @__PURE__ */ __name((value, allowSubDomains = false) => {\n if (allowSubDomains) {\n for (const label of value.split(\".\")) {\n if (!isVirtualHostableS3Bucket(label)) {\n return false;\n }\n }\n return true;\n }\n if (!(0, import_util_endpoints.isValidHostLabel)(value)) {\n return false;\n }\n if (value.length < 3 || value.length > 63) {\n return false;\n }\n if (value !== value.toLowerCase()) {\n return false;\n }\n if ((0, import_util_endpoints.isIpAddress)(value)) {\n return false;\n }\n return true;\n}, \"isVirtualHostableS3Bucket\");\n\n// src/lib/aws/parseArn.ts\nvar ARN_DELIMITER = \":\";\nvar RESOURCE_DELIMITER = \"/\";\nvar parseArn = /* @__PURE__ */ __name((value) => {\n const segments = value.split(ARN_DELIMITER);\n if (segments.length < 6) return null;\n const [arn, partition2, service, region, accountId, ...resourcePath] = segments;\n if (arn !== \"arn\" || partition2 === \"\" || service === \"\" || resourcePath.join(ARN_DELIMITER) === \"\") return null;\n const resourceId = resourcePath.map((resource) => resource.split(RESOURCE_DELIMITER)).flat();\n return {\n partition: partition2,\n service,\n region,\n accountId,\n resourceId\n };\n}, \"parseArn\");\n\n// src/lib/aws/partitions.json\nvar partitions_default = {\n partitions: [{\n id: \"aws\",\n outputs: {\n dnsSuffix: \"amazonaws.com\",\n dualStackDnsSuffix: \"api.aws\",\n implicitGlobalRegion: \"us-east-1\",\n name: \"aws\",\n supportsDualStack: true,\n supportsFIPS: true\n },\n regionRegex: \"^(us|eu|ap|sa|ca|me|af|il|mx)\\\\-\\\\w+\\\\-\\\\d+$\",\n regions: {\n \"af-south-1\": {\n description: \"Africa (Cape Town)\"\n },\n \"ap-east-1\": {\n description: \"Asia Pacific (Hong Kong)\"\n },\n \"ap-northeast-1\": {\n description: \"Asia Pacific (Tokyo)\"\n },\n \"ap-northeast-2\": {\n description: \"Asia Pacific (Seoul)\"\n },\n \"ap-northeast-3\": {\n description: \"Asia Pacific (Osaka)\"\n },\n \"ap-south-1\": {\n description: \"Asia Pacific (Mumbai)\"\n },\n \"ap-south-2\": {\n description: \"Asia Pacific (Hyderabad)\"\n },\n \"ap-southeast-1\": {\n description: \"Asia Pacific (Singapore)\"\n },\n \"ap-southeast-2\": {\n description: \"Asia Pacific (Sydney)\"\n },\n \"ap-southeast-3\": {\n description: \"Asia Pacific (Jakarta)\"\n },\n \"ap-southeast-4\": {\n description: \"Asia Pacific (Melbourne)\"\n },\n \"ap-southeast-5\": {\n description: \"Asia Pacific (Malaysia)\"\n },\n \"ap-southeast-7\": {\n description: \"Asia Pacific (Thailand)\"\n },\n \"aws-global\": {\n description: \"AWS Standard global region\"\n },\n \"ca-central-1\": {\n description: \"Canada (Central)\"\n },\n \"ca-west-1\": {\n description: \"Canada West (Calgary)\"\n },\n \"eu-central-1\": {\n description: \"Europe (Frankfurt)\"\n },\n \"eu-central-2\": {\n description: \"Europe (Zurich)\"\n },\n \"eu-north-1\": {\n description: \"Europe (Stockholm)\"\n },\n \"eu-south-1\": {\n description: \"Europe (Milan)\"\n },\n \"eu-south-2\": {\n description: \"Europe (Spain)\"\n },\n \"eu-west-1\": {\n description: \"Europe (Ireland)\"\n },\n \"eu-west-2\": {\n description: \"Europe (London)\"\n },\n \"eu-west-3\": {\n description: \"Europe (Paris)\"\n },\n \"il-central-1\": {\n description: \"Israel (Tel Aviv)\"\n },\n \"me-central-1\": {\n description: \"Middle East (UAE)\"\n },\n \"me-south-1\": {\n description: \"Middle East (Bahrain)\"\n },\n \"mx-central-1\": {\n description: \"Mexico (Central)\"\n },\n \"sa-east-1\": {\n description: \"South America (Sao Paulo)\"\n },\n \"us-east-1\": {\n description: \"US East (N. Virginia)\"\n },\n \"us-east-2\": {\n description: \"US East (Ohio)\"\n },\n \"us-west-1\": {\n description: \"US West (N. California)\"\n },\n \"us-west-2\": {\n description: \"US West (Oregon)\"\n }\n }\n }, {\n id: \"aws-cn\",\n outputs: {\n dnsSuffix: \"amazonaws.com.cn\",\n dualStackDnsSuffix: \"api.amazonwebservices.com.cn\",\n implicitGlobalRegion: \"cn-northwest-1\",\n name: \"aws-cn\",\n supportsDualStack: true,\n supportsFIPS: true\n },\n regionRegex: \"^cn\\\\-\\\\w+\\\\-\\\\d+$\",\n regions: {\n \"aws-cn-global\": {\n description: \"AWS China global region\"\n },\n \"cn-north-1\": {\n description: \"China (Beijing)\"\n },\n \"cn-northwest-1\": {\n description: \"China (Ningxia)\"\n }\n }\n }, {\n id: \"aws-us-gov\",\n outputs: {\n dnsSuffix: \"amazonaws.com\",\n dualStackDnsSuffix: \"api.aws\",\n implicitGlobalRegion: \"us-gov-west-1\",\n name: \"aws-us-gov\",\n supportsDualStack: true,\n supportsFIPS: true\n },\n regionRegex: \"^us\\\\-gov\\\\-\\\\w+\\\\-\\\\d+$\",\n regions: {\n \"aws-us-gov-global\": {\n description: \"AWS GovCloud (US) global region\"\n },\n \"us-gov-east-1\": {\n description: \"AWS GovCloud (US-East)\"\n },\n \"us-gov-west-1\": {\n description: \"AWS GovCloud (US-West)\"\n }\n }\n }, {\n id: \"aws-iso\",\n outputs: {\n dnsSuffix: \"c2s.ic.gov\",\n dualStackDnsSuffix: \"c2s.ic.gov\",\n implicitGlobalRegion: \"us-iso-east-1\",\n name: \"aws-iso\",\n supportsDualStack: false,\n supportsFIPS: true\n },\n regionRegex: \"^us\\\\-iso\\\\-\\\\w+\\\\-\\\\d+$\",\n regions: {\n \"aws-iso-global\": {\n description: \"AWS ISO (US) global region\"\n },\n \"us-iso-east-1\": {\n description: \"US ISO East\"\n },\n \"us-iso-west-1\": {\n description: \"US ISO WEST\"\n }\n }\n }, {\n id: \"aws-iso-b\",\n outputs: {\n dnsSuffix: \"sc2s.sgov.gov\",\n dualStackDnsSuffix: \"sc2s.sgov.gov\",\n implicitGlobalRegion: \"us-isob-east-1\",\n name: \"aws-iso-b\",\n supportsDualStack: false,\n supportsFIPS: true\n },\n regionRegex: \"^us\\\\-isob\\\\-\\\\w+\\\\-\\\\d+$\",\n regions: {\n \"aws-iso-b-global\": {\n description: \"AWS ISOB (US) global region\"\n },\n \"us-isob-east-1\": {\n description: \"US ISOB East (Ohio)\"\n }\n }\n }, {\n id: \"aws-iso-e\",\n outputs: {\n dnsSuffix: \"cloud.adc-e.uk\",\n dualStackDnsSuffix: \"cloud.adc-e.uk\",\n implicitGlobalRegion: \"eu-isoe-west-1\",\n name: \"aws-iso-e\",\n supportsDualStack: false,\n supportsFIPS: true\n },\n regionRegex: \"^eu\\\\-isoe\\\\-\\\\w+\\\\-\\\\d+$\",\n regions: {\n \"aws-iso-e-global\": {\n description: \"AWS ISOE (Europe) global region\"\n },\n \"eu-isoe-west-1\": {\n description: \"EU ISOE West\"\n }\n }\n }, {\n id: \"aws-iso-f\",\n outputs: {\n dnsSuffix: \"csp.hci.ic.gov\",\n dualStackDnsSuffix: \"csp.hci.ic.gov\",\n implicitGlobalRegion: \"us-isof-south-1\",\n name: \"aws-iso-f\",\n supportsDualStack: false,\n supportsFIPS: true\n },\n regionRegex: \"^us\\\\-isof\\\\-\\\\w+\\\\-\\\\d+$\",\n regions: {\n \"aws-iso-f-global\": {\n description: \"AWS ISOF global region\"\n },\n \"us-isof-east-1\": {\n description: \"US ISOF EAST\"\n },\n \"us-isof-south-1\": {\n description: \"US ISOF SOUTH\"\n }\n }\n }, {\n id: \"aws-eusc\",\n outputs: {\n dnsSuffix: \"amazonaws.eu\",\n dualStackDnsSuffix: \"amazonaws.eu\",\n implicitGlobalRegion: \"eusc-de-east-1\",\n name: \"aws-eusc\",\n supportsDualStack: false,\n supportsFIPS: true\n },\n regionRegex: \"^eusc\\\\-(de)\\\\-\\\\w+\\\\-\\\\d+$\",\n regions: {\n \"eusc-de-east-1\": {\n description: \"EU (Germany)\"\n }\n }\n }],\n version: \"1.1\"\n};\n\n// src/lib/aws/partition.ts\nvar selectedPartitionsInfo = partitions_default;\nvar selectedUserAgentPrefix = \"\";\nvar partition = /* @__PURE__ */ __name((value) => {\n const { partitions } = selectedPartitionsInfo;\n for (const partition2 of partitions) {\n const { regions, outputs } = partition2;\n for (const [region, regionData] of Object.entries(regions)) {\n if (region === value) {\n return {\n ...outputs,\n ...regionData\n };\n }\n }\n }\n for (const partition2 of partitions) {\n const { regionRegex, outputs } = partition2;\n if (new RegExp(regionRegex).test(value)) {\n return {\n ...outputs\n };\n }\n }\n const DEFAULT_PARTITION = partitions.find((partition2) => partition2.id === \"aws\");\n if (!DEFAULT_PARTITION) {\n throw new Error(\n \"Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.\"\n );\n }\n return {\n ...DEFAULT_PARTITION.outputs\n };\n}, \"partition\");\nvar setPartitionInfo = /* @__PURE__ */ __name((partitionsInfo, userAgentPrefix = \"\") => {\n selectedPartitionsInfo = partitionsInfo;\n selectedUserAgentPrefix = userAgentPrefix;\n}, \"setPartitionInfo\");\nvar useDefaultPartitionInfo = /* @__PURE__ */ __name(() => {\n setPartitionInfo(partitions_default, \"\");\n}, \"useDefaultPartitionInfo\");\nvar getUserAgentPrefix = /* @__PURE__ */ __name(() => selectedUserAgentPrefix, \"getUserAgentPrefix\");\n\n// src/aws.ts\nvar awsEndpointFunctions = {\n isVirtualHostableS3Bucket,\n parseArn,\n partition\n};\nimport_util_endpoints.customEndpointFunctions.aws = awsEndpointFunctions;\n\n// src/resolveEndpoint.ts\n\n\n// src/types/EndpointError.ts\n\n\n// src/types/EndpointRuleObject.ts\n\n\n// src/types/ErrorRuleObject.ts\n\n\n// src/types/RuleSetObject.ts\n\n\n// src/types/TreeRuleObject.ts\n\n\n// src/types/shared.ts\n\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n awsEndpointFunctions,\n partition,\n setPartitionInfo,\n useDefaultPartitionInfo,\n getUserAgentPrefix,\n isIpAddress,\n resolveEndpoint,\n EndpointError\n});\n\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar index_exports = {};\n__export(index_exports, {\n NODE_APP_ID_CONFIG_OPTIONS: () => NODE_APP_ID_CONFIG_OPTIONS,\n UA_APP_ID_ENV_NAME: () => UA_APP_ID_ENV_NAME,\n UA_APP_ID_INI_NAME: () => UA_APP_ID_INI_NAME,\n createDefaultUserAgentProvider: () => createDefaultUserAgentProvider,\n crtAvailability: () => crtAvailability,\n defaultUserAgent: () => defaultUserAgent\n});\nmodule.exports = __toCommonJS(index_exports);\n\n// src/defaultUserAgent.ts\nvar import_os = require(\"os\");\nvar import_process = require(\"process\");\n\n// src/crt-availability.ts\nvar crtAvailability = {\n isCrtAvailable: false\n};\n\n// src/is-crt-available.ts\nvar isCrtAvailable = /* @__PURE__ */ __name(() => {\n if (crtAvailability.isCrtAvailable) {\n return [\"md/crt-avail\"];\n }\n return null;\n}, \"isCrtAvailable\");\n\n// src/defaultUserAgent.ts\nvar createDefaultUserAgentProvider = /* @__PURE__ */ __name(({ serviceId, clientVersion }) => {\n return async (config) => {\n const sections = [\n // sdk-metadata\n [\"aws-sdk-js\", clientVersion],\n // ua-metadata\n [\"ua\", \"2.1\"],\n // os-metadata\n [`os/${(0, import_os.platform)()}`, (0, import_os.release)()],\n // language-metadata\n // ECMAScript edition doesn't matter in JS, so no version needed.\n [\"lang/js\"],\n [\"md/nodejs\", `${import_process.versions.node}`]\n ];\n const crtAvailable = isCrtAvailable();\n if (crtAvailable) {\n sections.push(crtAvailable);\n }\n if (serviceId) {\n sections.push([`api/${serviceId}`, clientVersion]);\n }\n if (import_process.env.AWS_EXECUTION_ENV) {\n sections.push([`exec-env/${import_process.env.AWS_EXECUTION_ENV}`]);\n }\n const appId = await config?.userAgentAppId?.();\n const resolvedUserAgent = appId ? [...sections, [`app/${appId}`]] : [...sections];\n return resolvedUserAgent;\n };\n}, \"createDefaultUserAgentProvider\");\nvar defaultUserAgent = createDefaultUserAgentProvider;\n\n// src/nodeAppIdConfigOptions.ts\nvar import_middleware_user_agent = require(\"@aws-sdk/middleware-user-agent\");\nvar UA_APP_ID_ENV_NAME = \"AWS_SDK_UA_APP_ID\";\nvar UA_APP_ID_INI_NAME = \"sdk_ua_app_id\";\nvar UA_APP_ID_INI_NAME_DEPRECATED = \"sdk-ua-app-id\";\nvar NODE_APP_ID_CONFIG_OPTIONS = {\n environmentVariableSelector: /* @__PURE__ */ __name((env2) => env2[UA_APP_ID_ENV_NAME], \"environmentVariableSelector\"),\n configFileSelector: /* @__PURE__ */ __name((profile) => profile[UA_APP_ID_INI_NAME] ?? profile[UA_APP_ID_INI_NAME_DEPRECATED], \"configFileSelector\"),\n default: import_middleware_user_agent.DEFAULT_UA_APP_ID\n};\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n crtAvailability,\n createDefaultUserAgentProvider,\n defaultUserAgent,\n UA_APP_ID_ENV_NAME,\n UA_APP_ID_INI_NAME,\n NODE_APP_ID_CONFIG_OPTIONS\n});\n\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar index_exports = {};\n__export(index_exports, {\n XmlNode: () => XmlNode,\n XmlText: () => XmlText\n});\nmodule.exports = __toCommonJS(index_exports);\n\n// src/escape-attribute.ts\nfunction escapeAttribute(value) {\n return value.replace(/&/g, \"&\").replace(//g, \">\").replace(/\"/g, \""\");\n}\n__name(escapeAttribute, \"escapeAttribute\");\n\n// src/escape-element.ts\nfunction escapeElement(value) {\n return value.replace(/&/g, \"&\").replace(/\"/g, \""\").replace(/'/g, \"'\").replace(//g, \">\").replace(/\\r/g, \" \").replace(/\\n/g, \" \").replace(/\\u0085/g, \" \").replace(/\\u2028/, \" \");\n}\n__name(escapeElement, \"escapeElement\");\n\n// src/XmlText.ts\nvar XmlText = class {\n constructor(value) {\n this.value = value;\n }\n static {\n __name(this, \"XmlText\");\n }\n toString() {\n return escapeElement(\"\" + this.value);\n }\n};\n\n// src/XmlNode.ts\nvar XmlNode = class _XmlNode {\n constructor(name, children = []) {\n this.name = name;\n this.children = children;\n }\n static {\n __name(this, \"XmlNode\");\n }\n attributes = {};\n static of(name, childText, withName) {\n const node = new _XmlNode(name);\n if (childText !== void 0) {\n node.addChildNode(new XmlText(childText));\n }\n if (withName !== void 0) {\n node.withName(withName);\n }\n return node;\n }\n withName(name) {\n this.name = name;\n return this;\n }\n addAttribute(name, value) {\n this.attributes[name] = value;\n return this;\n }\n addChildNode(child) {\n this.children.push(child);\n return this;\n }\n removeAttribute(name) {\n delete this.attributes[name];\n return this;\n }\n /**\n * @internal\n * Alias of {@link XmlNode#withName(string)} for codegen brevity.\n */\n n(name) {\n this.name = name;\n return this;\n }\n /**\n * @internal\n * Alias of {@link XmlNode#addChildNode(string)} for codegen brevity.\n */\n c(child) {\n this.children.push(child);\n return this;\n }\n /**\n * @internal\n * Checked version of {@link XmlNode#addAttribute(string)} for codegen brevity.\n */\n a(name, value) {\n if (value != null) {\n this.attributes[name] = value;\n }\n return this;\n }\n /**\n * Create a child node.\n * Used in serialization of string fields.\n * @internal\n */\n cc(input, field, withName = field) {\n if (input[field] != null) {\n const node = _XmlNode.of(field, input[field]).withName(withName);\n this.c(node);\n }\n }\n /**\n * Creates list child nodes.\n * @internal\n */\n l(input, listName, memberName, valueProvider) {\n if (input[listName] != null) {\n const nodes = valueProvider();\n nodes.map((node) => {\n node.withName(memberName);\n this.c(node);\n });\n }\n }\n /**\n * Creates list child nodes with container.\n * @internal\n */\n lc(input, listName, memberName, valueProvider) {\n if (input[listName] != null) {\n const nodes = valueProvider();\n const containerNode = new _XmlNode(memberName);\n nodes.map((node) => {\n containerNode.c(node);\n });\n this.c(containerNode);\n }\n }\n toString() {\n const hasChildren = Boolean(this.children.length);\n let xmlText = `<${this.name}`;\n const attributes = this.attributes;\n for (const attributeName of Object.keys(attributes)) {\n const attribute = attributes[attributeName];\n if (attribute != null) {\n xmlText += ` ${attributeName}=\"${escapeAttribute(\"\" + attribute)}\"`;\n }\n }\n return xmlText += !hasChildren ? \"/>\" : `>${this.children.map((c) => c.toString()).join(\"\")}${this.name}>`;\n }\n};\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n XmlNode,\n XmlText\n});\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Database = void 0;\nconst entity_1 = require(\"./entity\");\nconst relationship_1 = require(\"./relationship\");\nclass Database {\n static entitiesOnly(entities) {\n return new Database(entities, relationship_1.NO_RELATIONSHIPS);\n }\n constructor(entities, relationships) {\n this.idCtr = 0;\n this.schema = {\n ...entities,\n ...relationships({\n relationship: (fromKey, toKey) => (0, relationship_1.relationshipCollection)((id) => this.get(fromKey, id), (id) => this.get(toKey, id)),\n }),\n };\n }\n id() {\n return `${this.idCtr++}`;\n }\n /**\n * Allocate an ID and store\n */\n allocate(key, entity) {\n return this.store(key, this.e(entity));\n }\n /**\n * Store with a preallocated ID\n */\n store(key, entity) {\n const coll = this.schema[key];\n coll.add(entity);\n return entity;\n }\n /**\n * Get an entity by key\n */\n get(key, id) {\n const coll = this.schema[key];\n const ret = coll.entities.get(typeof id === 'string' ? id : id.$ref);\n if (!ret) {\n throw new Error(`No such ${String(key)}: ${id}`);\n }\n return ret;\n }\n /**\n * All entities of a given type\n */\n all(key) {\n const coll = this.schema[key];\n return Array.from(coll.entities.values());\n }\n /**\n * Lookup an entity by index\n */\n lookup(key, index, lookup, value) {\n const coll = this.schema[key];\n const ids = coll.indexes[index].lookups[lookup](value);\n return addOnlyMethod(ids.map((id) => coll.entities.get(id)), `${String(key)} with ${String(index)} ${String(lookup)} ${JSON.stringify(value)}`);\n }\n /**\n * Allocate an ID and store if the entity does not yet exist\n */\n findOrAllocate(key, index, lookup, entity) {\n const res = this.lookup(key, index, lookup, entity[index]);\n if (res.length) {\n return res.only();\n }\n return this.allocate(key, entity);\n }\n link(key, from, to, attributes) {\n const col = this.schema[key];\n col.add(from, to, attributes);\n }\n /**\n * Follow a link\n */\n follow(key, from) {\n var _a;\n const col = this.schema[key];\n const toLinks = (_a = col.forward.get(from.$id)) !== null && _a !== void 0 ? _a : [];\n const ret = toLinks.map((i) => ({ entity: col.toColl(i.$id), ...removeId(i) }));\n return addOnlyMethod(ret, `${String(key)} from ${from}`);\n }\n /**\n * Follow incoming links backwards\n */\n incoming(key, to) {\n var _a;\n const col = this.schema[key];\n const fromIds = (_a = col.backward.get(to.$id)) !== null && _a !== void 0 ? _a : [];\n const ret = fromIds.map((i) => ({ entity: col.fromColl(i.$id), ...removeId(i) }));\n return addOnlyMethod(ret, `${String(key)} to ${to}`);\n }\n e(entity) {\n return {\n $id: this.id(),\n ...entity,\n };\n }\n /**\n * Turn the current database collection into something that can be stored.\n */\n save() {\n return {\n idCtr: this.idCtr,\n schema: dehydrate(this.schema),\n };\n function dehydrate(x) {\n if ((0, entity_1.isEntityCollection)(x)) {\n return x.dehydrate();\n }\n if ((0, relationship_1.isRelationshipCollection)(x)) {\n return x.dehydrate();\n }\n if (Array.isArray(x)) {\n return x.map(dehydrate);\n }\n if (!!x && typeof x === 'object') {\n return Object.fromEntries(Object.entries(x).map(([k, v]) => [k, dehydrate(v)]));\n }\n return x;\n }\n }\n load(db) {\n this.idCtr = db.idCtr;\n hydrate(this.schema, db.schema);\n function hydrate(proto, x) {\n if ((0, entity_1.isEntityCollection)(proto)) {\n proto.hydrateFrom(x);\n }\n if ((0, relationship_1.isRelationshipCollection)(proto)) {\n proto.hydrateFrom(x);\n }\n if (Array.isArray(x)) {\n x.forEach(hydrate);\n }\n if (!!proto && typeof proto === 'object' && !!x && typeof x === 'object') {\n for (const [k, v] of Object.entries(proto)) {\n hydrate(v, x[k]);\n }\n }\n }\n }\n}\nexports.Database = Database;\nfunction removeId(x) {\n const ret = { ...x };\n delete ret.$id;\n return ret;\n}\nfunction addOnlyMethod(xs, description) {\n return Object.defineProperties(xs, {\n only: {\n enumerable: false,\n value: () => {\n if (xs.length !== 1) {\n throw new Error(`Expected exactly 1 ${description}, found ${xs.length}`);\n }\n return xs[0];\n },\n },\n });\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0YWJhc2UuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvZGF0YWJhc2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEscUNBQXVHO0FBQ3ZHLGlEQU13QjtBQVN4QixNQUFhLFFBQVE7SUFDWixNQUFNLENBQUMsWUFBWSxDQUFvQixRQUFZO1FBQ3hELE9BQU8sSUFBSSxRQUFRLENBQUMsUUFBUSxFQUFFLCtCQUFnQixDQUFDLENBQUM7SUFDbEQsQ0FBQztJQUtELFlBQVksUUFBWSxFQUFFLGFBQWtEO1FBRnBFLFVBQUssR0FBRyxDQUFDLENBQUM7UUFHaEIsSUFBSSxDQUFDLE1BQU0sR0FBRztZQUNaLEdBQUcsUUFBUTtZQUNYLEdBQUcsYUFBYSxDQUFDO2dCQUNmLFlBQVksRUFBRSxDQUFDLE9BQU8sRUFBRSxLQUFLLEVBQUUsRUFBRSxDQUMvQixJQUFBLHFDQUFzQixFQUNwQixDQUFDLEVBQUUsRUFBRSxFQUFFLENBQUMsSUFBSSxDQUFDLEdBQUcsQ0FBQyxPQUFPLEVBQUUsRUFBRSxDQUFDLEVBQzdCLENBQUMsRUFBRSxFQUFFLEVBQUUsQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLEtBQUssRUFBRSxFQUFFLENBQUMsQ0FDNUI7YUFDSixDQUFDO1NBQ0gsQ0FBQztJQUNKLENBQUM7SUFFTSxFQUFFO1FBQ1AsT0FBTyxHQUFHLElBQUksQ0FBQyxLQUFLLEVBQUUsRUFBRSxDQUFDO0lBQzNCLENBQUM7SUFFRDs7T0FFRztJQUNJLFFBQVEsQ0FBcUIsR0FBTSxFQUFFLE1BQWdDO1FBQzFFLE9BQU8sSUFBSSxDQUFDLEtBQUssQ0FBQyxHQUFHLEVBQUUsSUFBSSxDQUFDLENBQUMsQ0FBQyxNQUFNLENBQUMsQ0FBQyxDQUFDO0lBQ3pDLENBQUM7SUFFRDs7T0FFRztJQUNJLEtBQUssQ0FBcUIsR0FBTSxFQUFFLE1BQXlCO1FBQ2hFLE1BQU0sSUFBSSxHQUEwQixJQUFJLENBQUMsTUFBTSxDQUFDLEdBQUcsQ0FBUSxDQUFDO1FBQzVELElBQUksQ0FBQyxHQUFHLENBQUMsTUFBTSxDQUFDLENBQUM7UUFDakIsT0FBTyxNQUFhLENBQUM7SUFDdkIsQ0FBQztJQUVEOztPQUVHO0lBQ0ksR0FBRyxDQUFxQixHQUFNLEVBQUUsRUFBeUM7UUFDOUUsTUFBTSxJQUFJLEdBQTBCLElBQUksQ0FBQyxNQUFNLENBQUMsR0FBRyxDQUFRLENBQUM7UUFDNUQsTUFBTSxHQUFHLEdBQUcsSUFBSSxDQUFDLFFBQVEsQ0FBQyxHQUFHLENBQUMsT0FBTyxFQUFFLEtBQUssUUFBUSxDQUFDLENBQUMsQ0FBQyxFQUFFLENBQUMsQ0FBQyxDQUFDLEVBQUUsQ0FBQyxJQUFJLENBQUMsQ0FBQztRQUNyRSxJQUFJLENBQUMsR0FBRyxFQUFFO1lBQ1IsTUFBTSxJQUFJLEtBQUssQ0FBQyxXQUFXLE1BQU0sQ0FBQyxHQUFHLENBQUMsS0FBSyxFQUFFLEVBQUUsQ0FBQyxDQUFDO1NBQ2xEO1FBQ0QsT0FBTyxHQUFHLENBQUM7SUFDYixDQUFDO0lBRUQ7O09BRUc7SUFDSSxHQUFHLENBQXFCLEdBQU07UUFDbkMsTUFBTSxJQUFJLEdBQTBCLElBQUksQ0FBQyxNQUFNLENBQUMsR0FBRyxDQUFRLENBQUM7UUFDNUQsT0FBTyxLQUFLLENBQUMsSUFBSSxDQUFDLElBQUksQ0FBQyxRQUFRLENBQUMsTUFBTSxFQUFFLENBQUMsQ0FBQztJQUM1QyxDQUFDO0lBRUQ7O09BRUc7SUFDSSxNQUFNLENBQ1gsR0FBTSxFQUNOLEtBQVEsRUFDUixNQUFvQyxFQUNwQyxLQUFxQztRQUVyQyxNQUFNLElBQUksR0FBMEIsSUFBSSxDQUFDLE1BQU0sQ0FBQyxHQUFHLENBQVEsQ0FBQztRQUM1RCxNQUFNLEdBQUcsR0FBSSxJQUFJLENBQUMsT0FBZSxDQUFDLEtBQUssQ0FBQyxDQUFDLE9BQU8sQ0FBQyxNQUFNLENBQUMsQ0FBQyxLQUFLLENBQUMsQ0FBQztRQUNoRSxPQUFPLGFBQWEsQ0FDbEIsR0FBRyxDQUFDLEdBQUcsQ0FBQyxDQUFDLEVBQVUsRUFBRSxFQUFFLENBQUMsSUFBSSxDQUFDLFFBQVEsQ0FBQyxHQUFHLENBQUMsRUFBRSxDQUFDLENBQUMsRUFDOUMsR0FBRyxNQUFNLENBQUMsR0FBRyxDQUFDLFNBQVMsTUFBTSxDQUFDLEtBQUssQ0FBQyxJQUFJLE1BQU0sQ0FBQyxNQUFNLENBQUMsSUFBSSxJQUFJLENBQUMsU0FBUyxDQUFDLEtBQUssQ0FBQyxFQUFFLENBQ2xGLENBQUM7SUFDSixDQUFDO0lBRUQ7O09BRUc7SUFDSSxjQUFjLENBQ25CLEdBQU0sRUFDTixLQUFRLEVBQ1IsTUFBb0MsRUFDcEMsTUFBZ0M7UUFFaEMsTUFBTSxHQUFHLEdBQUcsSUFBSSxDQUFDLE1BQU0sQ0FBQyxHQUFHLEVBQUUsS0FBSyxFQUFFLE1BQU0sRUFBRSxNQUFNLENBQUMsS0FBSyxDQUFDLENBQUMsQ0FBQztRQUMzRCxJQUFJLEdBQUcsQ0FBQyxNQUFNLEVBQUU7WUFDZCxPQUFPLEdBQUcsQ0FBQyxJQUFJLEVBQUUsQ0FBQztTQUNuQjtRQUNELE9BQU8sSUFBSSxDQUFDLFFBQVEsQ0FBQyxHQUFHLEVBQUUsTUFBTSxDQUFDLENBQUM7SUFDcEMsQ0FBQztJQWNNLElBQUksQ0FDVCxHQUFNLEVBQ04sSUFBNEIsRUFDNUIsRUFBd0IsRUFDeEIsVUFBbUM7UUFFbkMsTUFBTSxHQUFHLEdBQWdDLElBQUksQ0FBQyxNQUFNLENBQUMsR0FBRyxDQUFRLENBQUM7UUFDakUsR0FBRyxDQUFDLEdBQUcsQ0FBQyxJQUFJLEVBQUUsRUFBRSxFQUFFLFVBQVUsQ0FBQyxDQUFDO0lBQ2hDLENBQUM7SUFFRDs7T0FFRztJQUNJLE1BQU0sQ0FDWCxHQUFNLEVBQ04sSUFBNEI7O1FBRTVCLE1BQU0sR0FBRyxHQUFnQyxJQUFJLENBQUMsTUFBTSxDQUFDLEdBQUcsQ0FBUSxDQUFDO1FBQ2pFLE1BQU0sT0FBTyxHQUFHLE1BQUEsR0FBRyxDQUFDLE9BQU8sQ0FBQyxHQUFHLENBQUMsSUFBSSxDQUFDLEdBQUcsQ0FBQyxtQ0FBSSxFQUFFLENBQUM7UUFDaEQsTUFBTSxHQUFHLEdBQUcsT0FBTyxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUMsRUFBRSxFQUFFLENBQUMsQ0FBQyxFQUFFLE1BQU0sRUFBRSxHQUFHLENBQUMsTUFBTSxDQUFDLENBQUMsQ0FBQyxHQUFHLENBQUMsRUFBRSxHQUFHLFFBQVEsQ0FBQyxDQUFDLENBQUMsRUFBVSxDQUFBLENBQUMsQ0FBQztRQUV2RixPQUFPLGFBQWEsQ0FBQyxHQUFHLEVBQUUsR0FBRyxNQUFNLENBQUMsR0FBRyxDQUFDLFNBQVMsSUFBSSxFQUFFLENBQUMsQ0FBQztJQUMzRCxDQUFDO0lBRUQ7O09BRUc7SUFDSSxRQUFRLENBQ2IsR0FBTSxFQUNOLEVBQXdCOztRQUV4QixNQUFNLEdBQUcsR0FBZ0MsSUFBSSxDQUFDLE1BQU0sQ0FBQyxHQUFHLENBQVEsQ0FBQztRQUNqRSxNQUFNLE9BQU8sR0FBRyxNQUFBLEdBQUcsQ0FBQyxRQUFRLENBQUMsR0FBRyxDQUFDLEVBQUUsQ0FBQyxHQUFHLENBQUMsbUNBQUksRUFBRSxDQUFDO1FBQy9DLE1BQU0sR0FBRyxHQUFHLE9BQU8sQ0FBQyxHQUFHLENBQUMsQ0FBQyxDQUFDLEVBQUUsRUFBRSxDQUFDLENBQUMsRUFBRSxNQUFNLEVBQUUsR0FBRyxDQUFDLFFBQVEsQ0FBQyxDQUFDLENBQUMsR0FBRyxDQUFDLEVBQUUsR0FBRyxRQUFRLENBQUMsQ0FBQyxDQUFDLEVBQVUsQ0FBQSxDQUFDLENBQUM7UUFFekYsT0FBTyxhQUFhLENBQUMsR0FBRyxFQUFFLEdBQUcsTUFBTSxDQUFDLEdBQUcsQ0FBQyxPQUFPLEVBQUUsRUFBRSxDQUFDLENBQUM7SUFDdkQsQ0FBQztJQUVNLENBQUMsQ0FBbUIsTUFBZ0I7UUFDekMsT0FBTztZQUNMLEdBQUcsRUFBRSxJQUFJLENBQUMsRUFBRSxFQUFFO1lBQ2QsR0FBRyxNQUFNO1NBQ0gsQ0FBQztJQUNYLENBQUM7SUFFRDs7T0FFRztJQUNJLElBQUk7UUFDVCxPQUFPO1lBQ0wsS0FBSyxFQUFFLElBQUksQ0FBQyxLQUFLO1lBQ2pCLE1BQU0sRUFBRSxTQUFTLENBQUMsSUFBSSxDQUFDLE1BQU0sQ0FBQztTQUMvQixDQUFDO1FBRUYsU0FBUyxTQUFTLENBQUMsQ0FBVTtZQUMzQixJQUFJLElBQUEsMkJBQWtCLEVBQUMsQ0FBQyxDQUFDLEVBQUU7Z0JBQ3pCLE9BQU8sQ0FBQyxDQUFDLFNBQVMsRUFBRSxDQUFDO2FBQ3RCO1lBQ0QsSUFBSSxJQUFBLHVDQUF3QixFQUFDLENBQUMsQ0FBQyxFQUFFO2dCQUMvQixPQUFPLENBQUMsQ0FBQyxTQUFTLEVBQUUsQ0FBQzthQUN0QjtZQUNELElBQUksS0FBSyxDQUFDLE9BQU8sQ0FBQyxDQUFDLENBQUMsRUFBRTtnQkFDcEIsT0FBTyxDQUFDLENBQUMsR0FBRyxDQUFDLFNBQVMsQ0FBQyxDQUFDO2FBQ3pCO1lBQ0QsSUFBSSxDQUFDLENBQUMsQ0FBQyxJQUFJLE9BQU8sQ0FBQyxLQUFLLFFBQVEsRUFBRTtnQkFDaEMsT0FBTyxNQUFNLENBQUMsV0FBVyxDQUFDLE1BQU0sQ0FBQyxPQUFPLENBQUMsQ0FBQyxDQUFDLENBQUMsR0FBRyxDQUFDLENBQUMsQ0FBQyxDQUFDLEVBQUUsQ0FBQyxDQUFDLEVBQUUsRUFBRSxDQUFDLENBQUMsQ0FBQyxFQUFFLFNBQVMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQzthQUNqRjtZQUNELE9BQU8sQ0FBQyxDQUFDO1FBQ1gsQ0FBQztJQUNILENBQUM7SUFFTSxJQUFJLENBQUMsRUFBc0I7UUFDaEMsSUFBSSxDQUFDLEtBQUssR0FBRyxFQUFFLENBQUMsS0FBSyxDQUFDO1FBQ3RCLE9BQU8sQ0FBQyxJQUFJLENBQUMsTUFBTSxFQUFFLEVBQUUsQ0FBQyxNQUFNLENBQUMsQ0FBQztRQUVoQyxTQUFTLE9BQU8sQ0FBQyxLQUFjLEVBQUUsQ0FBVTtZQUN6QyxJQUFJLElBQUEsMkJBQWtCLEVBQUMsS0FBSyxDQUFDLEVBQUU7Z0JBQzdCLEtBQUssQ0FBQyxXQUFXLENBQUMsQ0FBQyxDQUFDLENBQUM7YUFDdEI7WUFDRCxJQUFJLElBQUEsdUNBQXdCLEVBQUMsS0FBSyxDQUFDLEVBQUU7Z0JBQ25DLEtBQUssQ0FBQyxXQUFXLENBQUMsQ0FBQyxDQUFDLENBQUM7YUFDdEI7WUFDRCxJQUFJLEtBQUssQ0FBQyxPQUFPLENBQUMsQ0FBQyxDQUFDLEVBQUU7Z0JBQ3BCLENBQUMsQ0FBQyxPQUFPLENBQUMsT0FBTyxDQUFDLENBQUM7YUFDcEI7WUFDRCxJQUFJLENBQUMsQ0FBQyxLQUFLLElBQUksT0FBTyxLQUFLLEtBQUssUUFBUSxJQUFJLENBQUMsQ0FBQyxDQUFDLElBQUksT0FBTyxDQUFDLEtBQUssUUFBUSxFQUFFO2dCQUN4RSxLQUFLLE1BQU0sQ0FBQyxDQUFDLEVBQUUsQ0FBQyxDQUFDLElBQUksTUFBTSxDQUFDLE9BQU8sQ0FBQyxLQUFLLENBQUMsRUFBRTtvQkFDMUMsT0FBTyxDQUFDLENBQUMsRUFBRyxDQUFTLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQztpQkFDM0I7YUFDRjtRQUNILENBQUM7SUFDSCxDQUFDO0NBQ0Y7QUF0TUQsNEJBc01DO0FBT0QsU0FBUyxRQUFRLENBQW1CLENBQUk7SUFDdEMsTUFBTSxHQUFHLEdBQUcsRUFBRSxHQUFHLENBQUMsRUFBRSxDQUFDO0lBQ3JCLE9BQVEsR0FBVyxDQUFDLEdBQUcsQ0FBQztJQUN4QixPQUFPLEdBQUcsQ0FBQztBQUNiLENBQUM7QUFzQ0QsU0FBUyxhQUFhLENBQUksRUFBTyxFQUFFLFdBQW1CO0lBQ3BELE9BQU8sTUFBTSxDQUFDLGdCQUFnQixDQUFDLEVBQUUsRUFBRTtRQUNqQyxJQUFJLEVBQUU7WUFDSixVQUFVLEVBQUUsS0FBSztZQUNqQixLQUFLLEVBQUUsR0FBRyxFQUFFO2dCQUNWLElBQUksRUFBRSxDQUFDLE1BQU0sS0FBSyxDQUFDLEVBQUU7b0JBQ25CLE1BQU0sSUFBSSxLQUFLLENBQUMsc0JBQXNCLFdBQVcsV0FBVyxFQUFFLENBQUMsTUFBTSxFQUFFLENBQUMsQ0FBQztpQkFDMUU7Z0JBQ0QsT0FBTyxFQUFFLENBQUMsQ0FBQyxDQUFDLENBQUM7WUFDZixDQUFDO1NBQ0Y7S0FDRixDQUFRLENBQUM7QUFDWixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgRW50aXR5LCBFbnRpdHlDb2xsZWN0aW9uLCBFbnRpdHlJbmRleCwgaXNFbnRpdHlDb2xsZWN0aW9uLCBQbGFpbiwgUmVmZXJlbmNlIH0gZnJvbSAnLi9lbnRpdHknO1xuaW1wb3J0IHtcbiAgaXNSZWxhdGlvbnNoaXBDb2xsZWN0aW9uLFxuICBOT19SRUxBVElPTlNISVBTLFxuICBSZWxhdGlvbnNoaXAsXG4gIHJlbGF0aW9uc2hpcENvbGxlY3Rpb24sXG4gIFJlbGF0aW9uc2hpcENvbGxlY3Rpb24sXG59IGZyb20gJy4vcmVsYXRpb25zaGlwJztcblxuZXhwb3J0IGludGVyZmFjZSBSZWxhdGlvbnNoaXBzQnVpbGRlcjxFUyBleHRlbmRzIG9iamVjdD4ge1xuICByZWxhdGlvbnNoaXA8UiBleHRlbmRzIFJlbGF0aW9uc2hpcDxhbnksIGFueSwgYW55Pj4oXG4gICAgZnJvbUtleTogS2V5c0ZvcjxFUywgRW50aXR5Q29sbGVjdGlvbjxSWydmcm9tJ10sIGFueT4+LFxuICAgIHRvS2V5OiBLZXlzRm9yPEVTLCBFbnRpdHlDb2xsZWN0aW9uPFJbJ3RvJ10sIGFueT4+LFxuICApOiBSZWxhdGlvbnNoaXBDb2xsZWN0aW9uPFI+O1xufVxuXG5leHBvcnQgY2xhc3MgRGF0YWJhc2U8RVMgZXh0ZW5kcyBvYmplY3QsIFJTIGV4dGVuZHMgb2JqZWN0PiB7XG4gIHB1YmxpYyBzdGF0aWMgZW50aXRpZXNPbmx5PEVTIGV4dGVuZHMgb2JqZWN0PihlbnRpdGllczogRVMpOiBEYXRhYmFzZTxFUywge30+IHtcbiAgICByZXR1cm4gbmV3IERhdGFiYXNlKGVudGl0aWVzLCBOT19SRUxBVElPTlNISVBTKTtcbiAgfVxuXG4gIHByaXZhdGUgcmVhZG9ubHkgc2NoZW1hOiBFUyAmIFJTO1xuICBwcml2YXRlIGlkQ3RyID0gMDtcblxuICBjb25zdHJ1Y3RvcihlbnRpdGllczogRVMsIHJlbGF0aW9uc2hpcHM6ICh4OiBSZWxhdGlvbnNoaXBzQnVpbGRlcjxFUz4pID0+IFJTKSB7XG4gICAgdGhpcy5zY2hlbWEgPSB7XG4gICAgICAuLi5lbnRpdGllcyxcbiAgICAgIC4uLnJlbGF0aW9uc2hpcHMoe1xuICAgICAgICByZWxhdGlvbnNoaXA6IChmcm9tS2V5LCB0b0tleSkgPT5cbiAgICAgICAgICByZWxhdGlvbnNoaXBDb2xsZWN0aW9uKFxuICAgICAgICAgICAgKGlkKSA9PiB0aGlzLmdldChmcm9tS2V5LCBpZCksXG4gICAgICAgICAgICAoaWQpID0+IHRoaXMuZ2V0KHRvS2V5LCBpZCksXG4gICAgICAgICAgKSxcbiAgICAgIH0pLFxuICAgIH07XG4gIH1cblxuICBwdWJsaWMgaWQoKSB7XG4gICAgcmV0dXJuIGAke3RoaXMuaWRDdHIrK31gO1xuICB9XG5cbiAgLyoqXG4gICAqIEFsbG9jYXRlIGFuIElEIGFuZCBzdG9yZVxuICAgKi9cbiAgcHVibGljIGFsbG9jYXRlPEsgZXh0ZW5kcyBrZXlvZiBFUz4oa2V5OiBLLCBlbnRpdHk6IFBsYWluPEVudGl0eVR5cGU8RVNbS10+Pik6IEVudGl0eVR5cGU8RVNbS10+IHtcbiAgICByZXR1cm4gdGhpcy5zdG9yZShrZXksIHRoaXMuZShlbnRpdHkpKTtcbiAgfVxuXG4gIC8qKlxuICAgKiBTdG9yZSB3aXRoIGEgcHJlYWxsb2NhdGVkIElEXG4gICAqL1xuICBwdWJsaWMgc3RvcmU8SyBleHRlbmRzIGtleW9mIEVTPihrZXk6IEssIGVudGl0eTogRW50aXR5VHlwZTxFU1tLXT4pOiBFbnRpdHlUeXBlPEVTW0tdPiB7XG4gICAgY29uc3QgY29sbDogRW50aXR5Q29sbGVjdGlvbjxhbnk+ID0gdGhpcy5zY2hlbWFba2V5XSBhcyBhbnk7XG4gICAgY29sbC5hZGQoZW50aXR5KTtcbiAgICByZXR1cm4gZW50aXR5IGFzIGFueTtcbiAgfVxuXG4gIC8qKlxuICAgKiBHZXQgYW4gZW50aXR5IGJ5IGtleVxuICAgKi9cbiAgcHVibGljIGdldDxLIGV4dGVuZHMga2V5b2YgRVM+KGtleTogSywgaWQ6IHN0cmluZyB8IFJlZmVyZW5jZTxFbnRpdHlUeXBlPEVTW0tdPj4pOiBFbnRpdHlUeXBlPEVTW0tdPiB7XG4gICAgY29uc3QgY29sbDogRW50aXR5Q29sbGVjdGlvbjxhbnk+ID0gdGhpcy5zY2hlbWFba2V5XSBhcyBhbnk7XG4gICAgY29uc3QgcmV0ID0gY29sbC5lbnRpdGllcy5nZXQodHlwZW9mIGlkID09PSAnc3RyaW5nJyA/IGlkIDogaWQuJHJlZik7XG4gICAgaWYgKCFyZXQpIHtcbiAgICAgIHRocm93IG5ldyBFcnJvcihgTm8gc3VjaCAke1N0cmluZyhrZXkpfTogJHtpZH1gKTtcbiAgICB9XG4gICAgcmV0dXJuIHJldDtcbiAgfVxuXG4gIC8qKlxuICAgKiBBbGwgZW50aXRpZXMgb2YgYSBnaXZlbiB0eXBlXG4gICAqL1xuICBwdWJsaWMgYWxsPEsgZXh0ZW5kcyBrZXlvZiBFUz4oa2V5OiBLKTogQXJyYXk8RW50aXR5VHlwZTxFU1tLXT4+IHtcbiAgICBjb25zdCBjb2xsOiBFbnRpdHlDb2xsZWN0aW9uPGFueT4gPSB0aGlzLnNjaGVtYVtrZXldIGFzIGFueTtcbiAgICByZXR1cm4gQXJyYXkuZnJvbShjb2xsLmVudGl0aWVzLnZhbHVlcygpKTtcbiAgfVxuXG4gIC8qKlxuICAgKiBMb29rdXAgYW4gZW50aXR5IGJ5IGluZGV4XG4gICAqL1xuICBwdWJsaWMgbG9va3VwPEsgZXh0ZW5kcyBrZXlvZiBFUywgSSBleHRlbmRzIEluZGV4TmFtZXNPZjxFU1tLXT4+KFxuICAgIGtleTogSyxcbiAgICBpbmRleDogSSxcbiAgICBsb29rdXA6IEluZGV4T2Y8RVNbS10sIEk+Wydsb29rdXBzJ10sXG4gICAgdmFsdWU6IEluZGV4T2Y8RVNbS10sIEk+Wyd2YWx1ZVR5cGUnXSxcbiAgKTogUmljaFJlYWRvbmx5QXJyYXk8RW50aXR5VHlwZTxFU1tLXT4+IHtcbiAgICBjb25zdCBjb2xsOiBFbnRpdHlDb2xsZWN0aW9uPGFueT4gPSB0aGlzLnNjaGVtYVtrZXldIGFzIGFueTtcbiAgICBjb25zdCBpZHMgPSAoY29sbC5pbmRleGVzIGFzIGFueSlbaW5kZXhdLmxvb2t1cHNbbG9va3VwXSh2YWx1ZSk7XG4gICAgcmV0dXJuIGFkZE9ubHlNZXRob2QoXG4gICAgICBpZHMubWFwKChpZDogc3RyaW5nKSA9PiBjb2xsLmVudGl0aWVzLmdldChpZCkpLFxuICAgICAgYCR7U3RyaW5nKGtleSl9IHdpdGggJHtTdHJpbmcoaW5kZXgpfSAke1N0cmluZyhsb29rdXApfSAke0pTT04uc3RyaW5naWZ5KHZhbHVlKX1gLFxuICAgICk7XG4gIH1cblxuICAvKipcbiAgICogQWxsb2NhdGUgYW4gSUQgYW5kIHN0b3JlIGlmIHRoZSBlbnRpdHkgZG9lcyBub3QgeWV0IGV4aXN0XG4gICAqL1xuICBwdWJsaWMgZmluZE9yQWxsb2NhdGU8SyBleHRlbmRzIGtleW9mIEVTLCBJIGV4dGVuZHMga2V5b2YgUGxhaW48RW50aXR5VHlwZTxFU1tLXT4+ICYgSW5kZXhOYW1lc09mPEVTW0tdPj4oXG4gICAga2V5OiBLLFxuICAgIGluZGV4OiBJLFxuICAgIGxvb2t1cDogSW5kZXhPZjxFU1tLXSwgST5bJ2xvb2t1cHMnXSxcbiAgICBlbnRpdHk6IFBsYWluPEVudGl0eVR5cGU8RVNbS10+PixcbiAgKTogRW50aXR5VHlwZTxFU1tLXT4ge1xuICAgIGNvbnN0IHJlcyA9IHRoaXMubG9va3VwKGtleSwgaW5kZXgsIGxvb2t1cCwgZW50aXR5W2luZGV4XSk7XG4gICAgaWYgKHJlcy5sZW5ndGgpIHtcbiAgICAgIHJldHVybiByZXMub25seSgpO1xuICAgIH1cbiAgICByZXR1cm4gdGhpcy5hbGxvY2F0ZShrZXksIGVudGl0eSk7XG4gIH1cblxuICAvKipcbiAgICogUmVjb3JkIGEgcmVsYXRpb25zaGlwIGJldHdlZW4gdHdvIGVudGl0aWVzXG4gICAqXG4gICAqIE92ZXJsb2FkIHRvIGFjY291bnQgZm9yIHdoZXRoZXIgd2UgaGF2ZSBhdHRyaWJ1dGVzIG9yIG5vdC5cbiAgICovXG4gIHB1YmxpYyBsaW5rPEsgZXh0ZW5kcyBSZWxXQXR0cnM8UlM+PihcbiAgICBrZXk6IEssXG4gICAgZnJvbTogUmVsVHlwZTxSU1tLXT5bJ2Zyb20nXSxcbiAgICB0bzogUmVsVHlwZTxSU1tLXT5bJ3RvJ10sXG4gICAgYXR0cmlidXRlczogUmVsVHlwZTxSU1tLXT5bJ2F0dHInXSxcbiAgKTogdm9pZDtcbiAgcHVibGljIGxpbms8SyBleHRlbmRzIFJlbFdvQXR0cnM8UlM+PihrZXk6IEssIGZyb206IFJlbFR5cGU8UlNbS10+Wydmcm9tJ10sIHRvOiBSZWxUeXBlPFJTW0tdPlsndG8nXSk6IHZvaWQ7XG4gIHB1YmxpYyBsaW5rPEsgZXh0ZW5kcyBrZXlvZiBSUz4oXG4gICAga2V5OiBLLFxuICAgIGZyb206IFJlbFR5cGU8UlNbS10+Wydmcm9tJ10sXG4gICAgdG86IFJlbFR5cGU8UlNbS10+Wyd0byddLFxuICAgIGF0dHJpYnV0ZXM/OiBSZWxUeXBlPFJTW0tdPlsnYXR0ciddLFxuICApIHtcbiAgICBjb25zdCBjb2w6IFJlbGF0aW9uc2hpcENvbGxlY3Rpb248YW55PiA9IHRoaXMuc2NoZW1hW2tleV0gYXMgYW55O1xuICAgIGNvbC5hZGQoZnJvbSwgdG8sIGF0dHJpYnV0ZXMpO1xuICB9XG5cbiAgLyoqXG4gICAqIEZvbGxvdyBhIGxpbmtcbiAgICovXG4gIHB1YmxpYyBmb2xsb3c8SyBleHRlbmRzIGtleW9mIFJTPihcbiAgICBrZXk6IEssXG4gICAgZnJvbTogUmVsVHlwZTxSU1tLXT5bJ2Zyb20nXSxcbiAgKTogUmljaFJlYWRvbmx5QXJyYXk8TGluazxSZWxUeXBlPFJTW0tdPlsndG8nXSwgUmVsVHlwZTxSU1tLXT5bJ2F0dHInXT4+IHtcbiAgICBjb25zdCBjb2w6IFJlbGF0aW9uc2hpcENvbGxlY3Rpb248YW55PiA9IHRoaXMuc2NoZW1hW2tleV0gYXMgYW55O1xuICAgIGNvbnN0IHRvTGlua3MgPSBjb2wuZm9yd2FyZC5nZXQoZnJvbS4kaWQpID8/IFtdO1xuICAgIGNvbnN0IHJldCA9IHRvTGlua3MubWFwKChpKSA9PiAoeyBlbnRpdHk6IGNvbC50b0NvbGwoaS4kaWQpLCAuLi5yZW1vdmVJZChpKSB9IGFzIGFueSkpO1xuXG4gICAgcmV0dXJuIGFkZE9ubHlNZXRob2QocmV0LCBgJHtTdHJpbmcoa2V5KX0gZnJvbSAke2Zyb219YCk7XG4gIH1cblxuICAvKipcbiAgICogRm9sbG93IGluY29taW5nIGxpbmtzIGJhY2t3YXJkc1xuICAgKi9cbiAgcHVibGljIGluY29taW5nPEsgZXh0ZW5kcyBrZXlvZiBSUz4oXG4gICAga2V5OiBLLFxuICAgIHRvOiBSZWxUeXBlPFJTW0tdPlsndG8nXSxcbiAgKTogUmljaFJlYWRvbmx5QXJyYXk8TGluazxSZWxUeXBlPFJTW0tdPlsnZnJvbSddLCBSZWxUeXBlPFJTW0tdPlsnYXR0ciddPj4ge1xuICAgIGNvbnN0IGNvbDogUmVsYXRpb25zaGlwQ29sbGVjdGlvbjxhbnk+ID0gdGhpcy5zY2hlbWFba2V5XSBhcyBhbnk7XG4gICAgY29uc3QgZnJvbUlkcyA9IGNvbC5iYWNrd2FyZC5nZXQodG8uJGlkKSA/PyBbXTtcbiAgICBjb25zdCByZXQgPSBmcm9tSWRzLm1hcCgoaSkgPT4gKHsgZW50aXR5OiBjb2wuZnJvbUNvbGwoaS4kaWQpLCAuLi5yZW1vdmVJZChpKSB9IGFzIGFueSkpO1xuXG4gICAgcmV0dXJuIGFkZE9ubHlNZXRob2QocmV0LCBgJHtTdHJpbmcoa2V5KX0gdG8gJHt0b31gKTtcbiAgfVxuXG4gIHB1YmxpYyBlPEUgZXh0ZW5kcyBFbnRpdHk+KGVudGl0eTogUGxhaW48RT4pOiBFIHtcbiAgICByZXR1cm4ge1xuICAgICAgJGlkOiB0aGlzLmlkKCksXG4gICAgICAuLi5lbnRpdHksXG4gICAgfSBhcyBhbnk7XG4gIH1cblxuICAvKipcbiAgICogVHVybiB0aGUgY3VycmVudCBkYXRhYmFzZSBjb2xsZWN0aW9uIGludG8gc29tZXRoaW5nIHRoYXQgY2FuIGJlIHN0b3JlZC5cbiAgICovXG4gIHB1YmxpYyBzYXZlKCk6IERlaHlkcmF0ZWREYXRhYmFzZSB7XG4gICAgcmV0dXJuIHtcbiAgICAgIGlkQ3RyOiB0aGlzLmlkQ3RyLFxuICAgICAgc2NoZW1hOiBkZWh5ZHJhdGUodGhpcy5zY2hlbWEpLFxuICAgIH07XG5cbiAgICBmdW5jdGlvbiBkZWh5ZHJhdGUoeDogdW5rbm93bik6IGFueSB7XG4gICAgICBpZiAoaXNFbnRpdHlDb2xsZWN0aW9uKHgpKSB7XG4gICAgICAgIHJldHVybiB4LmRlaHlkcmF0ZSgpO1xuICAgICAgfVxuICAgICAgaWYgKGlzUmVsYXRpb25zaGlwQ29sbGVjdGlvbih4KSkge1xuICAgICAgICByZXR1cm4geC5kZWh5ZHJhdGUoKTtcbiAgICAgIH1cbiAgICAgIGlmIChBcnJheS5pc0FycmF5KHgpKSB7XG4gICAgICAgIHJldHVybiB4Lm1hcChkZWh5ZHJhdGUpO1xuICAgICAgfVxuICAgICAgaWYgKCEheCAmJiB0eXBlb2YgeCA9PT0gJ29iamVjdCcpIHtcbiAgICAgICAgcmV0dXJuIE9iamVjdC5mcm9tRW50cmllcyhPYmplY3QuZW50cmllcyh4KS5tYXAoKFtrLCB2XSkgPT4gW2ssIGRlaHlkcmF0ZSh2KV0pKTtcbiAgICAgIH1cbiAgICAgIHJldHVybiB4O1xuICAgIH1cbiAgfVxuXG4gIHB1YmxpYyBsb2FkKGRiOiBEZWh5ZHJhdGVkRGF0YWJhc2UpIHtcbiAgICB0aGlzLmlkQ3RyID0gZGIuaWRDdHI7XG4gICAgaHlkcmF0ZSh0aGlzLnNjaGVtYSwgZGIuc2NoZW1hKTtcblxuICAgIGZ1bmN0aW9uIGh5ZHJhdGUocHJvdG86IHVua25vd24sIHg6IHVua25vd24pOiB2b2lkIHtcbiAgICAgIGlmIChpc0VudGl0eUNvbGxlY3Rpb24ocHJvdG8pKSB7XG4gICAgICAgIHByb3RvLmh5ZHJhdGVGcm9tKHgpO1xuICAgICAgfVxuICAgICAgaWYgKGlzUmVsYXRpb25zaGlwQ29sbGVjdGlvbihwcm90bykpIHtcbiAgICAgICAgcHJvdG8uaHlkcmF0ZUZyb20oeCk7XG4gICAgICB9XG4gICAgICBpZiAoQXJyYXkuaXNBcnJheSh4KSkge1xuICAgICAgICB4LmZvckVhY2goaHlkcmF0ZSk7XG4gICAgICB9XG4gICAgICBpZiAoISFwcm90byAmJiB0eXBlb2YgcHJvdG8gPT09ICdvYmplY3QnICYmICEheCAmJiB0eXBlb2YgeCA9PT0gJ29iamVjdCcpIHtcbiAgICAgICAgZm9yIChjb25zdCBbaywgdl0gb2YgT2JqZWN0LmVudHJpZXMocHJvdG8pKSB7XG4gICAgICAgICAgaHlkcmF0ZSh2LCAoeCBhcyBhbnkpW2tdKTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH1cbiAgfVxufVxuXG5pbnRlcmZhY2UgRGVoeWRyYXRlZERhdGFiYXNlIHtcbiAgcmVhZG9ubHkgaWRDdHI6IG51bWJlcjtcbiAgcmVhZG9ubHkgc2NoZW1hOiBhbnk7XG59XG5cbmZ1bmN0aW9uIHJlbW92ZUlkPEEgZXh0ZW5kcyBvYmplY3Q+KHg6IEEpOiBPbWl0PEEsICckaWQnPiB7XG4gIGNvbnN0IHJldCA9IHsgLi4ueCB9O1xuICBkZWxldGUgKHJldCBhcyBhbnkpLiRpZDtcbiAgcmV0dXJuIHJldDtcbn1cblxuZXhwb3J0IHR5cGUgTGluazxFLCBBPiA9IHsgcmVhZG9ubHkgZW50aXR5OiBFIH0gJiBBO1xuXG50eXBlIFJlbFdBdHRyczxSUz4gPSB7IFtLIGluIGtleW9mIFJTXToge30gZXh0ZW5kcyBSZWxUeXBlPFJTW0tdPlsnYXR0ciddID8gbmV2ZXIgOiBLIH1ba2V5b2YgUlNdO1xudHlwZSBSZWxXb0F0dHJzPFJTPiA9IHsgW0sgaW4ga2V5b2YgUlNdOiB7fSBleHRlbmRzIFJlbFR5cGU8UlNbS10+WydhdHRyJ10gPyBLIDogbmV2ZXIgfVtrZXlvZiBSU107XG5cbi8vIE5lY2Vzc2FyeSBiZWNhdXNlIHRoaXMgdHlwZSBtaWdodCBiZSBhIHVuaW9uXG50eXBlIEluZGV4TmFtZXNPZjxBPiA9IEEgZXh0ZW5kcyBFbnRpdHlDb2xsZWN0aW9uPGFueT4gPyBLZXlzT2ZVbmlvbjxBWydpbmRleGVzJ10+IDogbmV2ZXI7XG5cbi8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZSBwcmV0dGllci9wcmV0dGllclxudHlwZSBJbmRleE9mPEVDLCBJIGV4dGVuZHMgSW5kZXhOYW1lc09mPEVDPj4gPVxuICBFQyBleHRlbmRzIEVudGl0eUNvbGxlY3Rpb248YW55PlxuICA/IEVDWydpbmRleGVzJ11bSV0gZXh0ZW5kcyBFbnRpdHlJbmRleDxhbnksIGluZmVyIEluZGV4VHlwZT5cbiAgICA/IHtcbiAgICAgICAgdmFsdWVUeXBlOiBJbmRleFR5cGU7XG4gICAgICAgIGxvb2t1cHM6IGtleW9mIEVDWydpbmRleGVzJ11bSV1bJ2xvb2t1cHMnXTtcbiAgICAgIH1cbiAgICA6IG5ldmVyXG4gIDogbmV2ZXI7XG5cbnR5cGUgRW50aXR5VHlwZTxBPiA9IEEgZXh0ZW5kcyBFbnRpdHlDb2xsZWN0aW9uPGluZmVyIEI+ID8gQiA6IG5ldmVyO1xuXG50eXBlIFJlbFR5cGU8QT4gPSBBIGV4dGVuZHMgUmVsYXRpb25zaGlwQ29sbGVjdGlvbjxpbmZlciBSPiA/IFIgOiBuZXZlcjtcblxudHlwZSBSZXNvbHZlVW5pb248VD4gPSBUIGV4dGVuZHMgVCA/IFQgOiBuZXZlcjtcblxudHlwZSBLZXlzT2ZVbmlvbjxUPiA9IGtleW9mIFJlc29sdmVVbmlvbjxUPjtcblxuZXhwb3J0IHR5cGUgRW50aXRpZXNPZjxEQj4gPSBEQiBleHRlbmRzIERhdGFiYXNlPGluZmVyIEVTLCBhbnk+ID8geyBbayBpbiBrZXlvZiBFU106IEVudGl0eVR5cGU8RVNba10+IH0gOiB7fTtcblxuZXhwb3J0IGludGVyZmFjZSBSaWNoUmVhZG9ubHlBcnJheTxBPiBleHRlbmRzIFJlYWRvbmx5QXJyYXk8QT4ge1xuICAvKipcbiAgICogUmV0dXJuIHRoZSBmaXJzdCBhbmQgb25seSBlbGVtZW50LCB0aHJvd2luZyBpZiB0aGVyZSBhcmUgIT0gMSBlbGVtZW50c1xuICAgKi9cbiAgb25seSgpOiBBO1xufVxuXG5mdW5jdGlvbiBhZGRPbmx5TWV0aG9kPEE+KHhzOiBBW10sIGRlc2NyaXB0aW9uOiBzdHJpbmcpOiBSaWNoUmVhZG9ubHlBcnJheTxBPiB7XG4gIHJldHVybiBPYmplY3QuZGVmaW5lUHJvcGVydGllcyh4cywge1xuICAgIG9ubHk6IHtcbiAgICAgIGVudW1lcmFibGU6IGZhbHNlLFxuICAgICAgdmFsdWU6ICgpID0+IHtcbiAgICAgICAgaWYgKHhzLmxlbmd0aCAhPT0gMSkge1xuICAgICAgICAgIHRocm93IG5ldyBFcnJvcihgRXhwZWN0ZWQgZXhhY3RseSAxICR7ZGVzY3JpcHRpb259LCBmb3VuZCAke3hzLmxlbmd0aH1gKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4geHNbMF07XG4gICAgICB9LFxuICAgIH0sXG4gIH0pIGFzIGFueTtcbn1cblxuLyoqXG4gKiBSZXR1cm4gdGhlIGtleXMgb2YgYW4gb2JqZWN0IHRoYXQgbWFwIHRvIGEgcGFydGljdWxhciB0eXBlXG4gKi9cbnR5cGUgS2V5c0ZvcjxPIGV4dGVuZHMgb2JqZWN0LCBUPiA9IHsgW2sgaW4ga2V5b2YgT106IE9ba10gZXh0ZW5kcyBUID8gayA6IG5ldmVyIH1ba2V5b2YgT107XG4iXX0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.optionalCmp = exports.numberCmp = exports.stringCmp = exports.ref = exports.isEntityCollection = exports.calculatedIndex = exports.fieldIndex = exports.entityCollection = void 0;\nconst sorted_map_1 = require(\"./sorted-map\");\nfunction entityCollection() {\n const entities = new Map();\n const _indexes = {};\n function add(x) {\n entities.set(x.$id, x);\n for (const index of Object.values(_indexes)) {\n // FIXME: why can't we type this?\n index.add(x);\n }\n }\n return {\n type: 'entities',\n entities,\n indexes: _indexes,\n add,\n dehydrate: () => ({\n type: 'entities',\n entities: Array.from(validatePlainObjects(entities).values()),\n }),\n hydrateFrom: (x) => {\n entities.clear();\n for (const e of Object.values(x.entities)) {\n add(e);\n }\n },\n index(indexes) {\n // This limitation exists purely because I couldn't type it otherwise.\n // Declaring a return type of `EntityCollection` would make a lot\n // of our other type inspection code stop working (the union is hard to pick\n // apart). Since adding indexes in multiple goes is not really a use case,\n // the simpler solution is just to type it as if we replaced all indexes\n // and add a runtime check to make sure the types aren't lying.\n if (Object.keys(_indexes).length > 0) {\n throw new Error('You may only call .index() once on a new collection');\n }\n Object.assign(_indexes, indexes);\n return this;\n },\n };\n}\nexports.entityCollection = entityCollection;\n/**\n * An index that uses the value of an entity's field\n */\nfunction fieldIndex(propName, comparator) {\n return calculatedIndex((x) => x[propName], comparator);\n}\nexports.fieldIndex = fieldIndex;\n/**\n * An index that is calculated based on a function applied to an entity\n */\nfunction calculatedIndex(fn, comparator) {\n const index = [];\n return {\n add: (x) => sorted_map_1.sortedMap.add(index, comparator, fn(x), x.$id),\n lookups: {\n equals: (value) => sorted_map_1.sortedMap.findAll(index, comparator, value),\n },\n index,\n };\n}\nexports.calculatedIndex = calculatedIndex;\nfunction isEntityCollection(x) {\n return typeof x === 'object' && !!x && x.type === 'entities';\n}\nexports.isEntityCollection = isEntityCollection;\nfunction validatePlainObjects(xs) {\n for (const x of xs.values()) {\n if (x.constructor !== Object) {\n throw new Error(`Entities should be plain-text objects, got instance of ${x.constructor}`);\n }\n }\n return xs;\n}\nfunction ref(x) {\n return typeof x === 'string' ? { $ref: x } : { $ref: x.$id };\n}\nexports.ref = ref;\n/**\n * Determines whether two strings are equivalent in the current or specified locale.\n */\nfunction stringCmp(a, b) {\n return a.localeCompare(b);\n}\nexports.stringCmp = stringCmp;\n/**\n * Determines whether two numbers are equivalent.\n */\nfunction numberCmp(a, b) {\n return a - b;\n}\nexports.numberCmp = numberCmp;\n/**\n * Creates a comparator to determine equivalent of two values, using a given comparator, but allows values to be optional.\n *\n * @param frontOrder If `true`, returns so that undefined values are ordered at the front. If `false`, undefined values are ordered at the back.\n */\nfunction optionalCmp(cmp, frontOrder = true) {\n return (a, b) => {\n if (a == undefined && b != undefined) {\n return frontOrder ? -1 : 1;\n }\n if (a != undefined && b == undefined) {\n return frontOrder ? 1 : -1;\n }\n if (a == undefined && b == undefined) {\n return 0;\n }\n return cmp(a, b);\n };\n}\nexports.optionalCmp = optionalCmp;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW50aXR5LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2VudGl0eS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSw2Q0FBeUQ7QUE0RXpELFNBQWdCLGdCQUFnQjtJQUM5QixNQUFNLFFBQVEsR0FBRyxJQUFJLEdBQUcsRUFBYSxDQUFDO0lBQ3RDLE1BQU0sUUFBUSxHQUFHLEVBQUUsQ0FBQztJQUVwQixTQUFTLEdBQUcsQ0FBQyxDQUFJO1FBQ2YsUUFBUSxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUMsR0FBRyxFQUFFLENBQUMsQ0FBQyxDQUFDO1FBQ3ZCLEtBQUssTUFBTSxLQUFLLElBQUksTUFBTSxDQUFDLE1BQU0sQ0FBQyxRQUFRLENBQUMsRUFBRTtZQUMzQyxpQ0FBaUM7WUFDaEMsS0FBYSxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUMsQ0FBQztTQUN2QjtJQUNILENBQUM7SUFFRCxPQUFPO1FBQ0wsSUFBSSxFQUFFLFVBQVU7UUFDaEIsUUFBUTtRQUNSLE9BQU8sRUFBRSxRQUFlO1FBQ3hCLEdBQUc7UUFDSCxTQUFTLEVBQUUsR0FBRyxFQUFFLENBQUMsQ0FBQztZQUNoQixJQUFJLEVBQUUsVUFBVTtZQUNoQixRQUFRLEVBQUUsS0FBSyxDQUFDLElBQUksQ0FBQyxvQkFBb0IsQ0FBQyxRQUFRLENBQUMsQ0FBQyxNQUFNLEVBQUUsQ0FBQztTQUM5RCxDQUFDO1FBQ0YsV0FBVyxFQUFFLENBQUMsQ0FBQyxFQUFFLEVBQUU7WUFDakIsUUFBUSxDQUFDLEtBQUssRUFBRSxDQUFDO1lBQ2pCLEtBQUssTUFBTSxDQUFDLElBQUksTUFBTSxDQUFDLE1BQU0sQ0FBQyxDQUFDLENBQUMsUUFBUSxDQUFDLEVBQUU7Z0JBQ3pDLEdBQUcsQ0FBQyxDQUFRLENBQUMsQ0FBQzthQUNmO1FBQ0gsQ0FBQztRQUNELEtBQUssQ0FBQyxPQUFPO1lBQ1gsc0VBQXNFO1lBQ3RFLDRFQUE0RTtZQUM1RSw0RUFBNEU7WUFDNUUsMEVBQTBFO1lBQzFFLHdFQUF3RTtZQUN4RSwrREFBK0Q7WUFDL0QsSUFBSSxNQUFNLENBQUMsSUFBSSxDQUFDLFFBQVEsQ0FBQyxDQUFDLE1BQU0sR0FBRyxDQUFDLEVBQUU7Z0JBQ3BDLE1BQU0sSUFBSSxLQUFLLENBQUMscURBQXFELENBQUMsQ0FBQzthQUN4RTtZQUNELE1BQU0sQ0FBQyxNQUFNLENBQUMsUUFBUSxFQUFFLE9BQU8sQ0FBQyxDQUFDO1lBQ2pDLE9BQU8sSUFBVyxDQUFDO1FBQ3JCLENBQUM7S0FDRixDQUFDO0FBQ0osQ0FBQztBQXpDRCw0Q0F5Q0M7QUFFRDs7R0FFRztBQUNILFNBQWdCLFVBQVUsQ0FDeEIsUUFBVyxFQUNYLFVBQXNDO0lBRXRDLE9BQU8sZUFBZSxDQUFDLENBQUMsQ0FBQyxFQUFFLEVBQUUsQ0FBQyxDQUFDLENBQUMsUUFBUSxDQUFDLEVBQUUsVUFBVSxDQUFDLENBQUM7QUFDekQsQ0FBQztBQUxELGdDQUtDO0FBRUQ7O0dBRUc7QUFDSCxTQUFnQixlQUFlLENBQXNCLEVBQWUsRUFBRSxVQUFtQztJQUN2RyxNQUFNLEtBQUssR0FBOEIsRUFBRSxDQUFDO0lBQzVDLE9BQU87UUFDTCxHQUFHLEVBQUUsQ0FBQyxDQUFJLEVBQUUsRUFBRSxDQUFDLHNCQUFTLENBQUMsR0FBRyxDQUFDLEtBQUssRUFBRSxVQUFVLEVBQUUsRUFBRSxDQUFDLENBQUMsQ0FBQyxFQUFFLENBQUMsQ0FBQyxHQUFHLENBQUM7UUFDN0QsT0FBTyxFQUFFO1lBQ1AsTUFBTSxFQUFFLENBQUMsS0FBUSxFQUFFLEVBQUUsQ0FBQyxzQkFBUyxDQUFDLE9BQU8sQ0FBQyxLQUFLLEVBQUUsVUFBVSxFQUFFLEtBQUssQ0FBQztTQUMzRDtRQUNSLEtBQUs7S0FDTixDQUFDO0FBQ0osQ0FBQztBQVRELDBDQVNDO0FBRUQsU0FBZ0Isa0JBQWtCLENBQUMsQ0FBVTtJQUMzQyxPQUFPLE9BQU8sQ0FBQyxLQUFLLFFBQVEsSUFBSSxDQUFDLENBQUMsQ0FBQyxJQUFLLENBQVMsQ0FBQyxJQUFJLEtBQUssVUFBVSxDQUFDO0FBQ3hFLENBQUM7QUFGRCxnREFFQztBQUVELFNBQVMsb0JBQW9CLENBQW1CLEVBQWtCO0lBQ2hFLEtBQUssTUFBTSxDQUFDLElBQUksRUFBRSxDQUFDLE1BQU0sRUFBRSxFQUFFO1FBQzNCLElBQUksQ0FBQyxDQUFDLFdBQVcsS0FBSyxNQUFNLEVBQUU7WUFDNUIsTUFBTSxJQUFJLEtBQUssQ0FBQywwREFBMEQsQ0FBQyxDQUFDLFdBQVcsRUFBRSxDQUFDLENBQUM7U0FDNUY7S0FDRjtJQUNELE9BQU8sRUFBRSxDQUFDO0FBQ1osQ0FBQztBQU1ELFNBQWdCLEdBQUcsQ0FBbUIsQ0FBYTtJQUNqRCxPQUFPLE9BQU8sQ0FBQyxLQUFLLFFBQVEsQ0FBQyxDQUFDLENBQUMsRUFBRSxJQUFJLEVBQUUsQ0FBQyxFQUFFLENBQUMsQ0FBQyxDQUFDLEVBQUUsSUFBSSxFQUFFLENBQUMsQ0FBQyxHQUFHLEVBQUUsQ0FBQztBQUMvRCxDQUFDO0FBRkQsa0JBRUM7QUFFRDs7R0FFRztBQUNILFNBQWdCLFNBQVMsQ0FBQyxDQUFTLEVBQUUsQ0FBUztJQUM1QyxPQUFPLENBQUMsQ0FBQyxhQUFhLENBQUMsQ0FBQyxDQUFDLENBQUM7QUFDNUIsQ0FBQztBQUZELDhCQUVDO0FBRUQ7O0dBRUc7QUFDSCxTQUFnQixTQUFTLENBQUMsQ0FBUyxFQUFFLENBQVM7SUFDNUMsT0FBTyxDQUFDLEdBQUcsQ0FBQyxDQUFDO0FBQ2YsQ0FBQztBQUZELDhCQUVDO0FBRUQ7Ozs7R0FJRztBQUNILFNBQWdCLFdBQVcsQ0FBSSxHQUEyQixFQUFFLFVBQVUsR0FBRyxJQUFJO0lBQzNFLE9BQU8sQ0FBQyxDQUFnQixFQUFFLENBQWdCLEVBQUUsRUFBRTtRQUM1QyxJQUFJLENBQUMsSUFBSSxTQUFTLElBQUksQ0FBQyxJQUFJLFNBQVMsRUFBRTtZQUNwQyxPQUFPLFVBQVUsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQztTQUM1QjtRQUNELElBQUksQ0FBQyxJQUFJLFNBQVMsSUFBSSxDQUFDLElBQUksU0FBUyxFQUFFO1lBQ3BDLE9BQU8sVUFBVSxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDO1NBQzVCO1FBQ0QsSUFBSSxDQUFDLElBQUksU0FBUyxJQUFJLENBQUMsSUFBSSxTQUFTLEVBQUU7WUFDcEMsT0FBTyxDQUFDLENBQUM7U0FDVjtRQUVELE9BQU8sR0FBRyxDQUFDLENBQUUsRUFBRSxDQUFFLENBQUMsQ0FBQztJQUNyQixDQUFDLENBQUM7QUFDSixDQUFDO0FBZEQsa0NBY0MiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBzb3J0ZWRNYXAsIFNvcnRlZE11bHRpTWFwIH0gZnJvbSAnLi9zb3J0ZWQtbWFwJztcblxuZXhwb3J0IGludGVyZmFjZSBFbnRpdHkge1xuICByZWFkb25seSAkaWQ6IHN0cmluZztcbn1cblxuZXhwb3J0IHR5cGUgUGxhaW48RSBleHRlbmRzIEVudGl0eT4gPSBPbWl0PEUsICckaWQnPjtcblxudHlwZSBJbmRleGVzPEEgZXh0ZW5kcyBFbnRpdHk+ID0geyBbSyBpbiBQcm9wZXJ0eUtleV06IEVudGl0eUluZGV4PEEsIGFueT4gfTtcblxuZXhwb3J0IGludGVyZmFjZSBFbnRpdHlDb2xsZWN0aW9uPEEgZXh0ZW5kcyBFbnRpdHksIEkgZXh0ZW5kcyBJbmRleGVzPEVudGl0eT4gPSB7fT4ge1xuICByZWFkb25seSB0eXBlOiAnZW50aXRpZXMnO1xuICByZWFkb25seSBlbnRpdGllczogTWFwPHN0cmluZywgQT47XG4gIHJlYWRvbmx5IGluZGV4ZXM6IEk7XG5cbiAgYWRkKHg6IEEpOiB2b2lkO1xuICBkZWh5ZHJhdGUoKTogYW55O1xuICBoeWRyYXRlRnJvbSh4OiBhbnkpOiB2b2lkO1xuXG4gIC8qKlxuICAgKiBBZGQgaW5kZXhlcyB0byB0aGlzIGNvbGxlY3Rpb25cbiAgICpcbiAgICogQ3JlYXRpbmcgYW4gaW5kZXhlZCBjb2xsZWN0aW9uIGlzIGEgdHdvLXN0ZXAgb3BlcmF0aW9uIHNvIHRoYXQgd2UgY2FuIHNwZWNpZnkgdGhlXG4gICAqIEVudGl0eSB0eXBlLCBidXQgaW5mZXIgdGhlIGluZGV4IHR5cGVzIChUeXBlU2NyaXB0IGRvZXMgbm90IGFsbG93IGJvdGggc3BlY2lmeWluZyBBTkRcbiAgICogaW5mZXJyaW5nIGdlbmVyaWMgYXJndW1lbnRzIGluIGEgc2luZ2xlIGNhbGwpLlxuICAgKi9cbiAgaW5kZXg8SUkgZXh0ZW5kcyBJbmRleGVzPEE+PihpbmRleGVzOiBJSSk6IEVudGl0eUNvbGxlY3Rpb248QSwgSUk+O1xufVxuXG4vKipcbiAqIEludGVyZmFjZSBmb3IgaW5kZXggb2JqZWN0c1xuICovXG5leHBvcnQgaW50ZXJmYWNlIEVudGl0eUluZGV4PEEgZXh0ZW5kcyBFbnRpdHksIEluZGV4VHlwZT4ge1xuICAvKipcbiAgICogVGhlIGxvb2t1cHMgdGhhdCB0aGUgaW5kZXhlZCBmaWVsZCB0eXBlIGFmZm9yZHNcbiAgICpcbiAgICogRm9yIGV4YW1wbGUsICdlcXVhbHMnLCAnbGVzc1RoYW4nLCAncHJlZml4JywgZXRjLlxuICAgKi9cbiAgcmVhZG9ubHkgbG9va3VwczogSW5kZXhMb29rdXBzPEluZGV4VHlwZT47XG5cbiAgLyoqXG4gICAqIFRoZSBpbmRleCBkYXRhIHN0b3JlXG4gICAqL1xuICByZWFkb25seSBpbmRleDogU29ydGVkTXVsdGlNYXA8SW5kZXhUeXBlLCBzdHJpbmc+O1xuXG4gIC8qKlxuICAgKiBBZGQgYW4gZW50aXR5IHRvIHRoZSBpbmRleFxuICAgKi9cbiAgYWRkKHg6IEEpOiB2b2lkO1xufVxuXG4vKipcbiAqIE1hcCBhIHR5cGUgdGhlIHR5cGVzIG9mIGxvb2t1cHMgd2UgY2FuIGRvIG9uIHRoYXQgdHlwZVxuICovXG5leHBvcnQgdHlwZSBJbmRleExvb2t1cHM8UD4gPSBbUF0gZXh0ZW5kcyBbc3RyaW5nXVxuICA/IFN0cmluZ0luZGV4TG9va3Vwc1xuICA6IFtQXSBleHRlbmRzIFtzdHJpbmcgfCB1bmRlZmluZWRdXG4gID8gT3B0aW9uYWxTdHJpbmdJbmRleExvb2t1cHNcbiAgOiB7fTtcblxuLyoqXG4gKiBBbGwgdGhlIGxvb2t1cHMgb24gJ3N0cmluZycgdHlwZXNcbiAqXG4gKiBXZSBjdXJyZW50bHkgb25seSBoYXZlICdlcXVhbHMnIGJ1dCB3ZSBjb3VsZCBoYXZlIG1vcmUgOilcbiAqL1xuZXhwb3J0IGludGVyZmFjZSBTdHJpbmdJbmRleExvb2t1cHMge1xuICBlcXVhbHMoeDogc3RyaW5nKTogc3RyaW5nW107XG59XG5cbi8qKlxuICogQWxsIHRoZSBsb29rdXBzIG9uICdzdHJpbmcgfCB1bmRlZmluZWQnIHR5cGVzXG4gKi9cbmV4cG9ydCBpbnRlcmZhY2UgT3B0aW9uYWxTdHJpbmdJbmRleExvb2t1cHMge1xuICBlcXVhbHMoeDogc3RyaW5nIHwgdW5kZWZpbmVkKTogc3RyaW5nW107XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBlbnRpdHlDb2xsZWN0aW9uPEEgZXh0ZW5kcyBFbnRpdHk+KCk6IEVudGl0eUNvbGxlY3Rpb248QSwge30+IHtcbiAgY29uc3QgZW50aXRpZXMgPSBuZXcgTWFwPHN0cmluZywgQT4oKTtcbiAgY29uc3QgX2luZGV4ZXMgPSB7fTtcblxuICBmdW5jdGlvbiBhZGQoeDogQSkge1xuICAgIGVudGl0aWVzLnNldCh4LiRpZCwgeCk7XG4gICAgZm9yIChjb25zdCBpbmRleCBvZiBPYmplY3QudmFsdWVzKF9pbmRleGVzKSkge1xuICAgICAgLy8gRklYTUU6IHdoeSBjYW4ndCB3ZSB0eXBlIHRoaXM/XG4gICAgICAoaW5kZXggYXMgYW55KS5hZGQoeCk7XG4gICAgfVxuICB9XG5cbiAgcmV0dXJuIHtcbiAgICB0eXBlOiAnZW50aXRpZXMnLFxuICAgIGVudGl0aWVzLFxuICAgIGluZGV4ZXM6IF9pbmRleGVzIGFzIGFueSxcbiAgICBhZGQsXG4gICAgZGVoeWRyYXRlOiAoKSA9PiAoe1xuICAgICAgdHlwZTogJ2VudGl0aWVzJyxcbiAgICAgIGVudGl0aWVzOiBBcnJheS5mcm9tKHZhbGlkYXRlUGxhaW5PYmplY3RzKGVudGl0aWVzKS52YWx1ZXMoKSksXG4gICAgfSksXG4gICAgaHlkcmF0ZUZyb206ICh4KSA9PiB7XG4gICAgICBlbnRpdGllcy5jbGVhcigpO1xuICAgICAgZm9yIChjb25zdCBlIG9mIE9iamVjdC52YWx1ZXMoeC5lbnRpdGllcykpIHtcbiAgICAgICAgYWRkKGUgYXMgYW55KTtcbiAgICAgIH1cbiAgICB9LFxuICAgIGluZGV4KGluZGV4ZXMpIHtcbiAgICAgIC8vIFRoaXMgbGltaXRhdGlvbiBleGlzdHMgcHVyZWx5IGJlY2F1c2UgSSBjb3VsZG4ndCB0eXBlIGl0IG90aGVyd2lzZS5cbiAgICAgIC8vIERlY2xhcmluZyBhIHJldHVybiB0eXBlIG9mIGBFbnRpdHlDb2xsZWN0aW9uPEEsIEkgfCBJST5gIHdvdWxkIG1ha2UgYSBsb3RcbiAgICAgIC8vIG9mIG91ciBvdGhlciB0eXBlIGluc3BlY3Rpb24gY29kZSBzdG9wIHdvcmtpbmcgKHRoZSB1bmlvbiBpcyBoYXJkIHRvIHBpY2tcbiAgICAgIC8vIGFwYXJ0KS4gU2luY2UgYWRkaW5nIGluZGV4ZXMgaW4gbXVsdGlwbGUgZ29lcyBpcyBub3QgcmVhbGx5IGEgdXNlIGNhc2UsXG4gICAgICAvLyB0aGUgc2ltcGxlciBzb2x1dGlvbiBpcyBqdXN0IHRvIHR5cGUgaXQgYXMgaWYgd2UgcmVwbGFjZWQgYWxsIGluZGV4ZXNcbiAgICAgIC8vIGFuZCBhZGQgYSBydW50aW1lIGNoZWNrIHRvIG1ha2Ugc3VyZSB0aGUgdHlwZXMgYXJlbid0IGx5aW5nLlxuICAgICAgaWYgKE9iamVjdC5rZXlzKF9pbmRleGVzKS5sZW5ndGggPiAwKSB7XG4gICAgICAgIHRocm93IG5ldyBFcnJvcignWW91IG1heSBvbmx5IGNhbGwgLmluZGV4KCkgb25jZSBvbiBhIG5ldyBjb2xsZWN0aW9uJyk7XG4gICAgICB9XG4gICAgICBPYmplY3QuYXNzaWduKF9pbmRleGVzLCBpbmRleGVzKTtcbiAgICAgIHJldHVybiB0aGlzIGFzIGFueTtcbiAgICB9LFxuICB9O1xufVxuXG4vKipcbiAqIEFuIGluZGV4IHRoYXQgdXNlcyB0aGUgdmFsdWUgb2YgYW4gZW50aXR5J3MgZmllbGRcbiAqL1xuZXhwb3J0IGZ1bmN0aW9uIGZpZWxkSW5kZXg8QSBleHRlbmRzIEVudGl0eSwgUCBleHRlbmRzIGtleW9mIEE+KFxuICBwcm9wTmFtZTogUCxcbiAgY29tcGFyYXRvcjogc29ydGVkTWFwLkNvbXBhcmF0b3I8QVtQXT4sXG4pOiBFbnRpdHlJbmRleDxBLCBBW1BdPiB7XG4gIHJldHVybiBjYWxjdWxhdGVkSW5kZXgoKHgpID0+IHhbcHJvcE5hbWVdLCBjb21wYXJhdG9yKTtcbn1cblxuLyoqXG4gKiBBbiBpbmRleCB0aGF0IGlzIGNhbGN1bGF0ZWQgYmFzZWQgb24gYSBmdW5jdGlvbiBhcHBsaWVkIHRvIGFuIGVudGl0eVxuICovXG5leHBvcnQgZnVuY3Rpb24gY2FsY3VsYXRlZEluZGV4PEEgZXh0ZW5kcyBFbnRpdHksIEI+KGZuOiAoeDogQSkgPT4gQiwgY29tcGFyYXRvcjogc29ydGVkTWFwLkNvbXBhcmF0b3I8Qj4pIHtcbiAgY29uc3QgaW5kZXg6IFNvcnRlZE11bHRpTWFwPEIsIHN0cmluZz4gPSBbXTtcbiAgcmV0dXJuIHtcbiAgICBhZGQ6ICh4OiBBKSA9PiBzb3J0ZWRNYXAuYWRkKGluZGV4LCBjb21wYXJhdG9yLCBmbih4KSwgeC4kaWQpLFxuICAgIGxvb2t1cHM6IHtcbiAgICAgIGVxdWFsczogKHZhbHVlOiBCKSA9PiBzb3J0ZWRNYXAuZmluZEFsbChpbmRleCwgY29tcGFyYXRvciwgdmFsdWUpLFxuICAgIH0gYXMgYW55LFxuICAgIGluZGV4LFxuICB9O1xufVxuXG5leHBvcnQgZnVuY3Rpb24gaXNFbnRpdHlDb2xsZWN0aW9uKHg6IHVua25vd24pOiB4IGlzIEVudGl0eUNvbGxlY3Rpb248YW55PiB7XG4gIHJldHVybiB0eXBlb2YgeCA9PT0gJ29iamVjdCcgJiYgISF4ICYmICh4IGFzIGFueSkudHlwZSA9PT0gJ2VudGl0aWVzJztcbn1cblxuZnVuY3Rpb24gdmFsaWRhdGVQbGFpbk9iamVjdHM8QSBleHRlbmRzIG9iamVjdD4oeHM6IE1hcDxzdHJpbmcsIEE+KTogTWFwPHN0cmluZywgQT4ge1xuICBmb3IgKGNvbnN0IHggb2YgeHMudmFsdWVzKCkpIHtcbiAgICBpZiAoeC5jb25zdHJ1Y3RvciAhPT0gT2JqZWN0KSB7XG4gICAgICB0aHJvdyBuZXcgRXJyb3IoYEVudGl0aWVzIHNob3VsZCBiZSBwbGFpbi10ZXh0IG9iamVjdHMsIGdvdCBpbnN0YW5jZSBvZiAke3guY29uc3RydWN0b3J9YCk7XG4gICAgfVxuICB9XG4gIHJldHVybiB4cztcbn1cblxuZXhwb3J0IGludGVyZmFjZSBSZWZlcmVuY2U8RSBleHRlbmRzIEVudGl0eT4ge1xuICByZWFkb25seSAkcmVmOiBFWyckaWQnXTtcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIHJlZjxFIGV4dGVuZHMgRW50aXR5Pih4OiBFIHwgc3RyaW5nKTogUmVmZXJlbmNlPEU+IHtcbiAgcmV0dXJuIHR5cGVvZiB4ID09PSAnc3RyaW5nJyA/IHsgJHJlZjogeCB9IDogeyAkcmVmOiB4LiRpZCB9O1xufVxuXG4vKipcbiAqIERldGVybWluZXMgd2hldGhlciB0d28gc3RyaW5ncyBhcmUgZXF1aXZhbGVudCBpbiB0aGUgY3VycmVudCBvciBzcGVjaWZpZWQgbG9jYWxlLlxuICovXG5leHBvcnQgZnVuY3Rpb24gc3RyaW5nQ21wKGE6IHN0cmluZywgYjogc3RyaW5nKTogbnVtYmVyIHtcbiAgcmV0dXJuIGEubG9jYWxlQ29tcGFyZShiKTtcbn1cblxuLyoqXG4gKiBEZXRlcm1pbmVzIHdoZXRoZXIgdHdvIG51bWJlcnMgYXJlIGVxdWl2YWxlbnQuXG4gKi9cbmV4cG9ydCBmdW5jdGlvbiBudW1iZXJDbXAoYTogbnVtYmVyLCBiOiBudW1iZXIpOiBudW1iZXIge1xuICByZXR1cm4gYSAtIGI7XG59XG5cbi8qKlxuICogQ3JlYXRlcyBhIGNvbXBhcmF0b3IgdG8gZGV0ZXJtaW5lIGVxdWl2YWxlbnQgb2YgdHdvIHZhbHVlcywgdXNpbmcgYSBnaXZlbiBjb21wYXJhdG9yLCBidXQgYWxsb3dzIHZhbHVlcyB0byBiZSBvcHRpb25hbC5cbiAqXG4gKiBAcGFyYW0gZnJvbnRPcmRlciBJZiBgdHJ1ZWAsIHJldHVybnMgc28gdGhhdCB1bmRlZmluZWQgdmFsdWVzIGFyZSBvcmRlcmVkIGF0IHRoZSBmcm9udC4gSWYgYGZhbHNlYCwgdW5kZWZpbmVkIHZhbHVlcyBhcmUgb3JkZXJlZCBhdCB0aGUgYmFjay5cbiAqL1xuZXhwb3J0IGZ1bmN0aW9uIG9wdGlvbmFsQ21wPEE+KGNtcDogKGE6IEEsIGI6IEEpID0+IG51bWJlciwgZnJvbnRPcmRlciA9IHRydWUpIHtcbiAgcmV0dXJuIChhOiBBIHwgdW5kZWZpbmVkLCBiOiBBIHwgdW5kZWZpbmVkKSA9PiB7XG4gICAgaWYgKGEgPT0gdW5kZWZpbmVkICYmIGIgIT0gdW5kZWZpbmVkKSB7XG4gICAgICByZXR1cm4gZnJvbnRPcmRlciA/IC0xIDogMTtcbiAgICB9XG4gICAgaWYgKGEgIT0gdW5kZWZpbmVkICYmIGIgPT0gdW5kZWZpbmVkKSB7XG4gICAgICByZXR1cm4gZnJvbnRPcmRlciA/IDEgOiAtMTtcbiAgICB9XG4gICAgaWYgKGEgPT0gdW5kZWZpbmVkICYmIGIgPT0gdW5kZWZpbmVkKSB7XG4gICAgICByZXR1cm4gMDtcbiAgICB9XG5cbiAgICByZXR1cm4gY21wKGEhLCBiISk7XG4gIH07XG59XG4iXX0=","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\n__exportStar(require(\"./entity\"), exports);\n__exportStar(require(\"./relationship\"), exports);\n__exportStar(require(\"./database\"), exports);\n__exportStar(require(\"./invariant\"), exports);\n__exportStar(require(\"./result\"), exports);\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7Ozs7OztBQUFBLDJDQUF5QjtBQUN6QixpREFBK0I7QUFDL0IsNkNBQTJCO0FBQzNCLDhDQUE0QjtBQUM1QiwyQ0FBeUIiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2VudGl0eSc7XG5leHBvcnQgKiBmcm9tICcuL3JlbGF0aW9uc2hpcCc7XG5leHBvcnQgKiBmcm9tICcuL2RhdGFiYXNlJztcbmV4cG9ydCAqIGZyb20gJy4vaW52YXJpYW50JztcbmV4cG9ydCAqIGZyb20gJy4vcmVzdWx0JztcbiJdfQ==","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.impliesU = exports.implies = exports.evolutionInvariant = void 0;\nfunction evolutionInvariant(description, pred) {\n // TODO: Find a way\n Array.isArray(description);\n Array.isArray(pred);\n}\nexports.evolutionInvariant = evolutionInvariant;\nfunction implies(x, y) {\n return !x || y;\n}\nexports.implies = implies;\n/**\n * Implies, but treats 'undefined' as 'false'\n */\nfunction impliesU(x, y) {\n return !x || !!y;\n}\nexports.impliesU = impliesU;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW52YXJpYW50LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL2ludmFyaWFudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFJQSxTQUFnQixrQkFBa0IsQ0FBSSxXQUFtQixFQUFFLElBQStCO0lBQ3hGLG1CQUFtQjtJQUNuQixLQUFLLENBQUMsT0FBTyxDQUFDLFdBQVcsQ0FBQyxDQUFDO0lBQzNCLEtBQUssQ0FBQyxPQUFPLENBQUMsSUFBSSxDQUFDLENBQUM7QUFDdEIsQ0FBQztBQUpELGdEQUlDO0FBRUQsU0FBZ0IsT0FBTyxDQUFDLENBQVUsRUFBRSxDQUFVO0lBQzVDLE9BQU8sQ0FBQyxDQUFDLElBQUksQ0FBQyxDQUFDO0FBQ2pCLENBQUM7QUFGRCwwQkFFQztBQUVEOztHQUVHO0FBQ0gsU0FBZ0IsUUFBUSxDQUFDLENBQXNCLEVBQUUsQ0FBc0I7SUFDckUsT0FBTyxDQUFDLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQyxDQUFDO0FBQ25CLENBQUM7QUFGRCw0QkFFQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCB0eXBlIEludmFyaWFudCA9IHZvaWQ7XG5cbmV4cG9ydCB0eXBlIEV2b2x1dGlvbkludmFyaWFudFByZWQ8QT4gPSAocHJldmlvdXM6IEEsIGN1cnJlbnQ6IEEpID0+IGJvb2xlYW47XG5cbmV4cG9ydCBmdW5jdGlvbiBldm9sdXRpb25JbnZhcmlhbnQ8QT4oZGVzY3JpcHRpb246IHN0cmluZywgcHJlZDogRXZvbHV0aW9uSW52YXJpYW50UHJlZDxBPik6IEludmFyaWFudCB7XG4gIC8vIFRPRE86IEZpbmQgYSB3YXlcbiAgQXJyYXkuaXNBcnJheShkZXNjcmlwdGlvbik7XG4gIEFycmF5LmlzQXJyYXkocHJlZCk7XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBpbXBsaWVzKHg6IGJvb2xlYW4sIHk6IGJvb2xlYW4pIHtcbiAgcmV0dXJuICF4IHx8IHk7XG59XG5cbi8qKlxuICogSW1wbGllcywgYnV0IHRyZWF0cyAndW5kZWZpbmVkJyBhcyAnZmFsc2UnXG4gKi9cbmV4cG9ydCBmdW5jdGlvbiBpbXBsaWVzVSh4OiBib29sZWFuIHwgdW5kZWZpbmVkLCB5OiBib29sZWFuIHwgdW5kZWZpbmVkKSB7XG4gIHJldHVybiAheCB8fCAhIXk7XG59XG4iXX0=","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isRelationshipCollection = exports.relationshipCollection = exports.NO_RELATIONSHIPS = void 0;\nconst NO_RELATIONSHIPS = () => ({});\nexports.NO_RELATIONSHIPS = NO_RELATIONSHIPS;\nfunction relationshipCollection(fromField, toField) {\n const forward = new Map();\n const backward = new Map();\n function add(fromId, toId, attrs) {\n let f = forward.get(fromId);\n if (!f) {\n f = [];\n forward.set(fromId, f);\n }\n let b = backward.get(toId);\n if (!b) {\n b = [];\n backward.set(toId, b);\n }\n // Behaves like a set, only add new relationship if it is structurally distinct\n const forwardRel = { $id: toId, ...attrs };\n const forwardRelStr = JSON.stringify(forwardRel);\n const existingRelationship = f.find((x) => JSON.stringify(x) === forwardRelStr);\n if (!existingRelationship) {\n f.push(forwardRel);\n b.push({ $id: fromId, ...attrs });\n }\n }\n return {\n type: 'rel',\n fromColl: fromField,\n toColl: toField,\n forward,\n backward,\n add(from, to, attributes) {\n add(from.$id, to.$id, attributes);\n },\n dehydrate() {\n return {\n type: 'rel',\n forward: Object.fromEntries(forward.entries()),\n };\n },\n hydrateFrom(x) {\n forward.clear();\n backward.clear();\n for (const [fromId, targets] of Object.entries(x.forward)) {\n for (const target of targets) {\n add(fromId, target.$id, removeId(target));\n }\n }\n },\n };\n}\nexports.relationshipCollection = relationshipCollection;\nfunction isRelationshipCollection(x) {\n return typeof x === 'object' && !!x && x.type === 'rel';\n}\nexports.isRelationshipCollection = isRelationshipCollection;\nfunction removeId(x) {\n const ret = { ...x };\n delete ret.$id;\n return ret;\n}\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVsYXRpb25zaGlwLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL3JlbGF0aW9uc2hpcC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUE2Qk8sTUFBTSxnQkFBZ0IsR0FBRyxHQUFHLEVBQUUsQ0FBQyxDQUFDLEVBQUUsQ0FBQyxDQUFDO0FBQTlCLFFBQUEsZ0JBQWdCLG9CQUFjO0FBRTNDLFNBQWdCLHNCQUFzQixDQUNwQyxTQUF3QixFQUN4QixPQUFvQjtJQUVwQixNQUFNLE9BQU8sR0FBRyxJQUFJLEdBQUcsRUFBMkIsQ0FBQztJQUNuRCxNQUFNLFFBQVEsR0FBRyxJQUFJLEdBQUcsRUFBMkIsQ0FBQztJQUVwRCxTQUFTLEdBQUcsQ0FBQyxNQUFjLEVBQUUsSUFBWSxFQUFFLEtBQVU7UUFDbkQsSUFBSSxDQUFDLEdBQUcsT0FBTyxDQUFDLEdBQUcsQ0FBQyxNQUFNLENBQUMsQ0FBQztRQUM1QixJQUFJLENBQUMsQ0FBQyxFQUFFO1lBQ04sQ0FBQyxHQUFHLEVBQUUsQ0FBQztZQUNQLE9BQU8sQ0FBQyxHQUFHLENBQUMsTUFBTSxFQUFFLENBQUMsQ0FBQyxDQUFDO1NBQ3hCO1FBQ0QsSUFBSSxDQUFDLEdBQUcsUUFBUSxDQUFDLEdBQUcsQ0FBQyxJQUFJLENBQUMsQ0FBQztRQUMzQixJQUFJLENBQUMsQ0FBQyxFQUFFO1lBQ04sQ0FBQyxHQUFHLEVBQUUsQ0FBQztZQUNQLFFBQVEsQ0FBQyxHQUFHLENBQUMsSUFBSSxFQUFFLENBQUMsQ0FBQyxDQUFDO1NBQ3ZCO1FBRUQsK0VBQStFO1FBQy9FLE1BQU0sVUFBVSxHQUFHLEVBQUUsR0FBRyxFQUFFLElBQUksRUFBRSxHQUFHLEtBQUssRUFBRSxDQUFDO1FBQzNDLE1BQU0sYUFBYSxHQUFHLElBQUksQ0FBQyxTQUFTLENBQUMsVUFBVSxDQUFDLENBQUM7UUFDakQsTUFBTSxvQkFBb0IsR0FBRyxDQUFDLENBQUMsSUFBSSxDQUFDLENBQUMsQ0FBQyxFQUFFLEVBQUUsQ0FBQyxJQUFJLENBQUMsU0FBUyxDQUFDLENBQUMsQ0FBQyxLQUFLLGFBQWEsQ0FBQyxDQUFDO1FBRWhGLElBQUksQ0FBQyxvQkFBb0IsRUFBRTtZQUN6QixDQUFDLENBQUMsSUFBSSxDQUFDLFVBQVUsQ0FBQyxDQUFDO1lBQ25CLENBQUMsQ0FBQyxJQUFJLENBQUMsRUFBRSxHQUFHLEVBQUUsTUFBTSxFQUFFLEdBQUcsS0FBSyxFQUFFLENBQUMsQ0FBQztTQUNuQztJQUNILENBQUM7SUFFRCxPQUFPO1FBQ0wsSUFBSSxFQUFFLEtBQUs7UUFDWCxRQUFRLEVBQUUsU0FBUztRQUNuQixNQUFNLEVBQUUsT0FBTztRQUNmLE9BQU87UUFDUCxRQUFRO1FBQ1IsR0FBRyxDQUFDLElBQVksRUFBRSxFQUFVLEVBQUUsVUFBZTtZQUMzQyxHQUFHLENBQUMsSUFBSSxDQUFDLEdBQUcsRUFBRSxFQUFFLENBQUMsR0FBRyxFQUFFLFVBQVUsQ0FBQyxDQUFDO1FBQ3BDLENBQUM7UUFDRCxTQUFTO1lBQ1AsT0FBTztnQkFDTCxJQUFJLEVBQUUsS0FBSztnQkFDWCxPQUFPLEVBQUUsTUFBTSxDQUFDLFdBQVcsQ0FBQyxPQUFPLENBQUMsT0FBTyxFQUFFLENBQUM7YUFDL0MsQ0FBQztRQUNKLENBQUM7UUFDRCxXQUFXLENBQUMsQ0FBTTtZQUNoQixPQUFPLENBQUMsS0FBSyxFQUFFLENBQUM7WUFDaEIsUUFBUSxDQUFDLEtBQUssRUFBRSxDQUFDO1lBRWpCLEtBQUssTUFBTSxDQUFDLE1BQU0sRUFBRSxPQUFPLENBQUMsSUFBSSxNQUFNLENBQUMsT0FBTyxDQUFDLENBQUMsQ0FBQyxPQUFPLENBQUMsRUFBRTtnQkFDekQsS0FBSyxNQUFNLE1BQU0sSUFBSSxPQUEwQixFQUFFO29CQUMvQyxHQUFHLENBQUMsTUFBTSxFQUFFLE1BQU0sQ0FBQyxHQUFHLEVBQUUsUUFBUSxDQUFDLE1BQU0sQ0FBQyxDQUFDLENBQUM7aUJBQzNDO2FBQ0Y7UUFDSCxDQUFDO0tBQ0YsQ0FBQztBQUNKLENBQUM7QUF4REQsd0RBd0RDO0FBRUQsU0FBZ0Isd0JBQXdCLENBQUMsQ0FBVTtJQUNqRCxPQUFPLE9BQU8sQ0FBQyxLQUFLLFFBQVEsSUFBSSxDQUFDLENBQUMsQ0FBQyxJQUFLLENBQVMsQ0FBQyxJQUFJLEtBQUssS0FBSyxDQUFDO0FBQ25FLENBQUM7QUFGRCw0REFFQztBQUVELFNBQVMsUUFBUSxDQUFtQixDQUFJO0lBQ3RDLE1BQU0sR0FBRyxHQUFHLEVBQUUsR0FBRyxDQUFDLEVBQUUsQ0FBQztJQUNyQixPQUFRLEdBQVcsQ0FBQyxHQUFHLENBQUM7SUFDeEIsT0FBTyxHQUFHLENBQUM7QUFDYixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgRW50aXR5LCBFbnRpdHlDb2xsZWN0aW9uIH0gZnJvbSAnLi9lbnRpdHknO1xuXG5leHBvcnQgaW50ZXJmYWNlIFJlbGF0aW9uc2hpcDxGcm9tIGV4dGVuZHMgRW50aXR5LCBUbyBleHRlbmRzIEVudGl0eSwgQXR0cmlidXRlcyA9IHt9PiB7XG4gIHJlYWRvbmx5IGZyb206IEZyb207XG4gIHJlYWRvbmx5IHRvOiBUbztcbiAgcmVhZG9ubHkgYXR0cjogQXR0cmlidXRlcztcbn1cblxudHlwZSBGcm9tR2V0dGVyPFIgZXh0ZW5kcyBSZWxhdGlvbnNoaXA8YW55LCBhbnksIGFueT4+ID0gKGlkOiBzdHJpbmcpID0+IFJbJ2Zyb20nXTtcbnR5cGUgVG9HZXR0ZXI8UiBleHRlbmRzIFJlbGF0aW9uc2hpcDxhbnksIGFueSwgYW55Pj4gPSAoaWQ6IHN0cmluZykgPT4gUlsndG8nXTtcblxuZXhwb3J0IGludGVyZmFjZSBSZWxhdGlvbnNoaXBDb2xsZWN0aW9uPFIgZXh0ZW5kcyBSZWxhdGlvbnNoaXA8YW55LCBhbnksIGFueT4+IHtcbiAgcmVhZG9ubHkgdHlwZTogJ3JlbCc7XG4gIHJlYWRvbmx5IGZyb21Db2xsOiBGcm9tR2V0dGVyPFI+O1xuICByZWFkb25seSB0b0NvbGw6IFRvR2V0dGVyPFI+O1xuICByZWFkb25seSBmb3J3YXJkOiBNYXA8c3RyaW5nLCBSZWw8UlsnYXR0ciddPltdPjtcbiAgcmVhZG9ubHkgYmFja3dhcmQ6IE1hcDxzdHJpbmcsIFJlbDxSWydhdHRyJ10+W10+O1xuXG4gIGFkZChmcm9tOiBSWydmcm9tJ10sIHRvOiBSWyd0byddLCBhdHRyaWJ1dGVzOiBSWydhdHRyJ10pOiB2b2lkO1xuICBkZWh5ZHJhdGUoKTogYW55O1xuICBoeWRyYXRlRnJvbSh4OiBhbnkpOiB2b2lkO1xufVxuXG5leHBvcnQgdHlwZSBSZWw8QXR0cmlidXRlcz4gPSB7IHJlYWRvbmx5ICRpZDogc3RyaW5nIH0gJiBBdHRyaWJ1dGVzO1xuXG5leHBvcnQgdHlwZSBLZXlGb3JFbnRpdHlDb2xsZWN0aW9uPFMsIEUgZXh0ZW5kcyBFbnRpdHk+ID0ge1xuICBbSyBpbiBrZXlvZiBTXTogU1tLXSBleHRlbmRzIEVudGl0eUNvbGxlY3Rpb248RT4gPyBLIDogbmV2ZXI7XG59W2tleW9mIFNdO1xuXG5leHBvcnQgY29uc3QgTk9fUkVMQVRJT05TSElQUyA9ICgpID0+ICh7fSk7XG5cbmV4cG9ydCBmdW5jdGlvbiByZWxhdGlvbnNoaXBDb2xsZWN0aW9uPFIgZXh0ZW5kcyBSZWxhdGlvbnNoaXA8YW55LCBhbnksIGFueT4+KFxuICBmcm9tRmllbGQ6IEZyb21HZXR0ZXI8Uj4sXG4gIHRvRmllbGQ6IFRvR2V0dGVyPFI+LFxuKTogUmVsYXRpb25zaGlwQ29sbGVjdGlvbjxSPiB7XG4gIGNvbnN0IGZvcndhcmQgPSBuZXcgTWFwPHN0cmluZywgQXJyYXk8UmVsPGFueT4+PigpO1xuICBjb25zdCBiYWNrd2FyZCA9IG5ldyBNYXA8c3RyaW5nLCBBcnJheTxSZWw8YW55Pj4+KCk7XG5cbiAgZnVuY3Rpb24gYWRkKGZyb21JZDogc3RyaW5nLCB0b0lkOiBzdHJpbmcsIGF0dHJzOiBhbnkpIHtcbiAgICBsZXQgZiA9IGZvcndhcmQuZ2V0KGZyb21JZCk7XG4gICAgaWYgKCFmKSB7XG4gICAgICBmID0gW107XG4gICAgICBmb3J3YXJkLnNldChmcm9tSWQsIGYpO1xuICAgIH1cbiAgICBsZXQgYiA9IGJhY2t3YXJkLmdldCh0b0lkKTtcbiAgICBpZiAoIWIpIHtcbiAgICAgIGIgPSBbXTtcbiAgICAgIGJhY2t3YXJkLnNldCh0b0lkLCBiKTtcbiAgICB9XG5cbiAgICAvLyBCZWhhdmVzIGxpa2UgYSBzZXQsIG9ubHkgYWRkIG5ldyByZWxhdGlvbnNoaXAgaWYgaXQgaXMgc3RydWN0dXJhbGx5IGRpc3RpbmN0XG4gICAgY29uc3QgZm9yd2FyZFJlbCA9IHsgJGlkOiB0b0lkLCAuLi5hdHRycyB9O1xuICAgIGNvbnN0IGZvcndhcmRSZWxTdHIgPSBKU09OLnN0cmluZ2lmeShmb3J3YXJkUmVsKTtcbiAgICBjb25zdCBleGlzdGluZ1JlbGF0aW9uc2hpcCA9IGYuZmluZCgoeCkgPT4gSlNPTi5zdHJpbmdpZnkoeCkgPT09IGZvcndhcmRSZWxTdHIpO1xuXG4gICAgaWYgKCFleGlzdGluZ1JlbGF0aW9uc2hpcCkge1xuICAgICAgZi5wdXNoKGZvcndhcmRSZWwpO1xuICAgICAgYi5wdXNoKHsgJGlkOiBmcm9tSWQsIC4uLmF0dHJzIH0pO1xuICAgIH1cbiAgfVxuXG4gIHJldHVybiB7XG4gICAgdHlwZTogJ3JlbCcsXG4gICAgZnJvbUNvbGw6IGZyb21GaWVsZCxcbiAgICB0b0NvbGw6IHRvRmllbGQsXG4gICAgZm9yd2FyZCxcbiAgICBiYWNrd2FyZCxcbiAgICBhZGQoZnJvbTogRW50aXR5LCB0bzogRW50aXR5LCBhdHRyaWJ1dGVzOiBhbnkpIHtcbiAgICAgIGFkZChmcm9tLiRpZCwgdG8uJGlkLCBhdHRyaWJ1dGVzKTtcbiAgICB9LFxuICAgIGRlaHlkcmF0ZSgpOiBhbnkge1xuICAgICAgcmV0dXJuIHtcbiAgICAgICAgdHlwZTogJ3JlbCcsXG4gICAgICAgIGZvcndhcmQ6IE9iamVjdC5mcm9tRW50cmllcyhmb3J3YXJkLmVudHJpZXMoKSksXG4gICAgICB9O1xuICAgIH0sXG4gICAgaHlkcmF0ZUZyb20oeDogYW55KTogdm9pZCB7XG4gICAgICBmb3J3YXJkLmNsZWFyKCk7XG4gICAgICBiYWNrd2FyZC5jbGVhcigpO1xuXG4gICAgICBmb3IgKGNvbnN0IFtmcm9tSWQsIHRhcmdldHNdIG9mIE9iamVjdC5lbnRyaWVzKHguZm9yd2FyZCkpIHtcbiAgICAgICAgZm9yIChjb25zdCB0YXJnZXQgb2YgdGFyZ2V0cyBhcyBBcnJheTxSZWw8YW55Pj4pIHtcbiAgICAgICAgICBhZGQoZnJvbUlkLCB0YXJnZXQuJGlkLCByZW1vdmVJZCh0YXJnZXQpKTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIH0sXG4gIH07XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBpc1JlbGF0aW9uc2hpcENvbGxlY3Rpb24oeDogdW5rbm93bik6IHggaXMgUmVsYXRpb25zaGlwQ29sbGVjdGlvbjxhbnk+IHtcbiAgcmV0dXJuIHR5cGVvZiB4ID09PSAnb2JqZWN0JyAmJiAhIXggJiYgKHggYXMgYW55KS50eXBlID09PSAncmVsJztcbn1cblxuZnVuY3Rpb24gcmVtb3ZlSWQ8QSBleHRlbmRzIG9iamVjdD4oeDogQSk6IE9taXQ8QSwgJyRpZCc+IHtcbiAgY29uc3QgcmV0ID0geyAuLi54IH07XG4gIGRlbGV0ZSAocmV0IGFzIGFueSkuJGlkO1xuICByZXR1cm4gcmV0O1xufVxuIl19","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.liftUndefined = exports.liftResult = exports.locateFailure = exports.chain = exports.using = exports.tryCatch = exports.assertSuccess = exports.errorFrom = exports.errorMessage = exports.unpackOr = exports.unpack = exports.isSuccess = exports.isFailure = exports.failure = void 0;\n// Ensures you must use `fail()` to construct an instance of type Failure\nconst errorSym = Symbol('error');\nfunction mkLocate(prefix) {\n const ret = (error) => failure(`${prefix}: ${error}`);\n ret.in = (prefix2) => mkLocate(`${prefix}: ${prefix2}`);\n ret.locate = locateFailure(prefix);\n return ret;\n}\nfunction failure(error) {\n return { [errorSym]: error };\n}\nexports.failure = failure;\nfailure.in = (prefix) => mkLocate(prefix);\nfailure.locate = (x) => x;\nfunction isFailure(x) {\n return !!x && typeof x === 'object' && x[errorSym];\n}\nexports.isFailure = isFailure;\nfunction isSuccess(x) {\n return !isFailure(x);\n}\nexports.isSuccess = isSuccess;\nfunction unpack(x) {\n if (isFailure(x)) {\n throw new Error(`unpack: ${x[errorSym]}`);\n }\n return x;\n}\nexports.unpack = unpack;\nfunction unpackOr(x, def) {\n return (isFailure(x) ? def : x);\n}\nexports.unpackOr = unpackOr;\nfunction errorMessage(x) {\n return x[errorSym];\n}\nexports.errorMessage = errorMessage;\nfunction errorFrom(x) {\n return new Error(errorMessage(x));\n}\nexports.errorFrom = errorFrom;\nfunction assertSuccess(x) {\n if (isFailure(x)) {\n throw errorFrom(x);\n }\n}\nexports.assertSuccess = assertSuccess;\nfunction tryCatch(failOrBlock, maybeBlock) {\n const block = (maybeBlock !== null && maybeBlock !== void 0 ? maybeBlock : failOrBlock);\n const f = (maybeBlock ? failOrBlock : failure);\n try {\n return block();\n }\n catch (e) {\n return f(`Error: ${e.message}\\n${e.stack}`);\n }\n}\nexports.tryCatch = tryCatch;\nfunction using(value, block) {\n if (isFailure(value)) {\n return value;\n }\n return block(value);\n}\nexports.using = using;\nfunction chain(value, ...fns) {\n for (const fn of fns) {\n if (isFailure(value)) {\n return value;\n }\n value = fn(value);\n }\n return value;\n}\nexports.chain = chain;\n/* eslint-enable prettier/prettier */\n/**\n * Make a function that will prepend a prefix to error messages\n *\n * This is one way to be specific about the location where errors originate, by prefixing\n * errors as the call stack unwinds.\n *\n * A different method is to pass in a modified failure function using `failure.in(...)`,\n * to build the error message as the call stack deepens.\n */\nfunction locateFailure(prefix) {\n return (x) => (isFailure(x) ? failure(`${prefix}: ${x[errorSym]}`) : x);\n}\nexports.locateFailure = locateFailure;\nfunction liftResult(xs) {\n const failures = Array.isArray(xs) ? xs.filter(isFailure) : Object.values(xs).filter(isFailure);\n if (failures.length > 0) {\n return failure(failures.map(errorMessage).join(', '));\n }\n return xs;\n}\nexports.liftResult = liftResult;\nfunction liftUndefined(valueOrFunction) {\n if (typeof valueOrFunction === 'function') {\n return (...args) => {\n const value = valueOrFunction(...args);\n return value !== undefined ? value : failure('value is undefined');\n };\n }\n return valueOrFunction !== undefined ? valueOrFunction : failure('value is undefined');\n}\nexports.liftUndefined = liftUndefined;\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVzdWx0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vc3JjL3Jlc3VsdC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSx5RUFBeUU7QUFDekUsTUFBTSxRQUFRLEdBQUcsTUFBTSxDQUFDLE9BQU8sQ0FBQyxDQUFDO0FBYWpDLFNBQVMsUUFBUSxDQUFDLE1BQWM7SUFDOUIsTUFBTSxHQUFHLEdBQVMsQ0FBQyxLQUFhLEVBQUUsRUFBRSxDQUFDLE9BQU8sQ0FBQyxHQUFHLE1BQU0sS0FBSyxLQUFLLEVBQUUsQ0FBQyxDQUFDO0lBQ3BFLEdBQUcsQ0FBQyxFQUFFLEdBQUcsQ0FBQyxPQUFlLEVBQUUsRUFBRSxDQUFDLFFBQVEsQ0FBQyxHQUFHLE1BQU0sS0FBSyxPQUFPLEVBQUUsQ0FBQyxDQUFDO0lBQ2hFLEdBQUcsQ0FBQyxNQUFNLEdBQUcsYUFBYSxDQUFDLE1BQU0sQ0FBQyxDQUFDO0lBQ25DLE9BQU8sR0FBRyxDQUFDO0FBQ2IsQ0FBQztBQUlELFNBQWdCLE9BQU8sQ0FBQyxLQUFhO0lBQ25DLE9BQU8sRUFBRSxDQUFDLFFBQVEsQ0FBQyxFQUFFLEtBQUssRUFBRSxDQUFDO0FBQy9CLENBQUM7QUFGRCwwQkFFQztBQUNELE9BQU8sQ0FBQyxFQUFFLEdBQUcsQ0FBQyxNQUFjLEVBQUUsRUFBRSxDQUFDLFFBQVEsQ0FBQyxNQUFNLENBQUMsQ0FBQztBQUNsRCxPQUFPLENBQUMsTUFBTSxHQUFHLENBQUksQ0FBWSxFQUFFLEVBQUUsQ0FBQyxDQUFDLENBQUM7QUFFeEMsU0FBZ0IsU0FBUyxDQUFJLENBQVk7SUFDdkMsT0FBTyxDQUFDLENBQUMsQ0FBQyxJQUFJLE9BQU8sQ0FBQyxLQUFLLFFBQVEsSUFBSyxDQUFTLENBQUMsUUFBUSxDQUFDLENBQUM7QUFDOUQsQ0FBQztBQUZELDhCQUVDO0FBRUQsU0FBZ0IsU0FBUyxDQUFJLENBQVk7SUFDdkMsT0FBTyxDQUFDLFNBQVMsQ0FBQyxDQUFDLENBQUMsQ0FBQztBQUN2QixDQUFDO0FBRkQsOEJBRUM7QUFFRCxTQUFnQixNQUFNLENBQUksQ0FBWTtJQUNwQyxJQUFJLFNBQVMsQ0FBQyxDQUFDLENBQUMsRUFBRTtRQUNoQixNQUFNLElBQUksS0FBSyxDQUFDLFdBQVcsQ0FBQyxDQUFDLFFBQVEsQ0FBQyxFQUFFLENBQUMsQ0FBQztLQUMzQztJQUNELE9BQU8sQ0FBQyxDQUFDO0FBQ1gsQ0FBQztBQUxELHdCQUtDO0FBRUQsU0FBZ0IsUUFBUSxDQUFPLENBQVksRUFBRSxHQUFNO0lBQ2pELE9BQU8sQ0FBQyxTQUFTLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFRLENBQUM7QUFDekMsQ0FBQztBQUZELDRCQUVDO0FBRUQsU0FBZ0IsWUFBWSxDQUFDLENBQVU7SUFDckMsT0FBTyxDQUFDLENBQUMsUUFBUSxDQUFDLENBQUM7QUFDckIsQ0FBQztBQUZELG9DQUVDO0FBRUQsU0FBZ0IsU0FBUyxDQUFDLENBQVU7SUFDbEMsT0FBTyxJQUFJLEtBQUssQ0FBQyxZQUFZLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQztBQUNwQyxDQUFDO0FBRkQsOEJBRUM7QUFJRCxTQUFnQixhQUFhLENBQUMsQ0FBVTtJQUN0QyxJQUFJLFNBQVMsQ0FBQyxDQUFDLENBQUMsRUFBRTtRQUNoQixNQUFNLFNBQVMsQ0FBQyxDQUFDLENBQUMsQ0FBQztLQUNwQjtBQUNILENBQUM7QUFKRCxzQ0FJQztBQUlELFNBQWdCLFFBQVEsQ0FBSSxXQUE2QixFQUFFLFVBQW9CO0lBQzdFLE1BQU0sS0FBSyxHQUFZLENBQUMsVUFBVSxhQUFWLFVBQVUsY0FBVixVQUFVLEdBQUksV0FBVyxDQUFRLENBQUM7SUFDMUQsTUFBTSxDQUFDLEdBQVMsQ0FBQyxVQUFVLENBQUMsQ0FBQyxDQUFDLFdBQVcsQ0FBQyxDQUFDLENBQUMsT0FBTyxDQUFRLENBQUM7SUFFNUQsSUFBSTtRQUNGLE9BQU8sS0FBSyxFQUFFLENBQUM7S0FDaEI7SUFBQyxPQUFPLENBQU0sRUFBRTtRQUNmLE9BQU8sQ0FBQyxDQUFDLFVBQVUsQ0FBQyxDQUFDLE9BQU8sS0FBSyxDQUFDLENBQUMsS0FBSyxFQUFFLENBQUMsQ0FBQztLQUM3QztBQUNILENBQUM7QUFURCw0QkFTQztBQUVELFNBQWdCLEtBQUssQ0FBTyxLQUFnQixFQUFFLEtBQTBCO0lBQ3RFLElBQUksU0FBUyxDQUFDLEtBQUssQ0FBQyxFQUFFO1FBQ3BCLE9BQU8sS0FBSyxDQUFDO0tBQ2Q7SUFDRCxPQUFPLEtBQUssQ0FBQyxLQUFLLENBQUMsQ0FBQztBQUN0QixDQUFDO0FBTEQsc0JBS0M7QUFZRCxTQUFnQixLQUFLLENBQUMsS0FBa0IsRUFBRSxHQUFHLEdBQW1DO0lBQzlFLEtBQUssTUFBTSxFQUFFLElBQUksR0FBRyxFQUFFO1FBQ3BCLElBQUksU0FBUyxDQUFDLEtBQUssQ0FBQyxFQUFFO1lBQ3BCLE9BQU8sS0FBSyxDQUFDO1NBQ2Q7UUFDRCxLQUFLLEdBQUcsRUFBRSxDQUFDLEtBQUssQ0FBQyxDQUFDO0tBQ25CO0lBQ0QsT0FBTyxLQUFLLENBQUM7QUFDZixDQUFDO0FBUkQsc0JBUUM7QUFDRCxxQ0FBcUM7QUFFckM7Ozs7Ozs7O0dBUUc7QUFDSCxTQUFnQixhQUFhLENBQUMsTUFBYztJQUMxQyxPQUFPLENBQUksQ0FBWSxFQUFhLEVBQUUsQ0FBQyxDQUFDLFNBQVMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsT0FBTyxDQUFDLEdBQUcsTUFBTSxLQUFLLENBQUMsQ0FBQyxRQUFRLENBQUMsRUFBRSxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDO0FBQ25HLENBQUM7QUFGRCxzQ0FFQztBQU1ELFNBQWdCLFVBQVUsQ0FDeEIsRUFBZ0Q7SUFFaEQsTUFBTSxRQUFRLEdBQUcsS0FBSyxDQUFDLE9BQU8sQ0FBQyxFQUFFLENBQUMsQ0FBQyxDQUFDLENBQUMsRUFBRSxDQUFDLE1BQU0sQ0FBQyxTQUFTLENBQUMsQ0FBQyxDQUFDLENBQUMsTUFBTSxDQUFDLE1BQU0sQ0FBQyxFQUFFLENBQUMsQ0FBQyxNQUFNLENBQUMsU0FBUyxDQUFDLENBQUM7SUFDaEcsSUFBSSxRQUFRLENBQUMsTUFBTSxHQUFHLENBQUMsRUFBRTtRQUN2QixPQUFPLE9BQU8sQ0FBQyxRQUFRLENBQUMsR0FBRyxDQUFDLFlBQVksQ0FBQyxDQUFDLElBQUksQ0FBQyxJQUFJLENBQUMsQ0FBQyxDQUFDO0tBQ3ZEO0lBQ0QsT0FBTyxFQUFTLENBQUM7QUFDbkIsQ0FBQztBQVJELGdDQVFDO0FBT0QsU0FBZ0IsYUFBYSxDQUFDLGVBQW9CO0lBQ2hELElBQUksT0FBTyxlQUFlLEtBQUssVUFBVSxFQUFFO1FBQ3pDLE9BQU8sQ0FBQyxHQUFHLElBQVcsRUFBRSxFQUFFO1lBQ3hCLE1BQU0sS0FBSyxHQUFHLGVBQWUsQ0FBQyxHQUFHLElBQUksQ0FBQyxDQUFDO1lBQ3ZDLE9BQU8sS0FBSyxLQUFLLFNBQVMsQ0FBQyxDQUFDLENBQUMsS0FBSyxDQUFDLENBQUMsQ0FBQyxPQUFPLENBQUMsb0JBQW9CLENBQUMsQ0FBQztRQUNyRSxDQUFDLENBQUM7S0FDSDtJQUNELE9BQU8sZUFBZSxLQUFLLFNBQVMsQ0FBQyxDQUFDLENBQUMsZUFBZSxDQUFDLENBQUMsQ0FBQyxPQUFPLENBQUMsb0JBQW9CLENBQUMsQ0FBQztBQUN6RixDQUFDO0FBUkQsc0NBUUMiLCJzb3VyY2VzQ29udGVudCI6WyIvLyBFbnN1cmVzIHlvdSBtdXN0IHVzZSBgZmFpbCgpYCB0byBjb25zdHJ1Y3QgYW4gaW5zdGFuY2Ugb2YgdHlwZSBGYWlsdXJlXG5jb25zdCBlcnJvclN5bSA9IFN5bWJvbCgnZXJyb3InKTtcblxuZXhwb3J0IHR5cGUgUmVzdWx0PEE+ID0gQSB8IEZhaWx1cmU7XG5leHBvcnQgaW50ZXJmYWNlIEZhaWx1cmUge1xuICByZWFkb25seSBbZXJyb3JTeW1dOiBzdHJpbmc7XG59XG5cbmV4cG9ydCBpbnRlcmZhY2UgRmFpbCB7XG4gIChlcnJvcjogc3RyaW5nKTogRmFpbHVyZTtcbiAgaW4ocHJlZml4OiBzdHJpbmcpOiBGYWlsO1xuICBsb2NhdGU8QT4oeDogUmVzdWx0PEE+KTogUmVzdWx0PEE+O1xufVxuXG5mdW5jdGlvbiBta0xvY2F0ZShwcmVmaXg6IHN0cmluZyk6IEZhaWwge1xuICBjb25zdCByZXQ6IEZhaWwgPSAoZXJyb3I6IHN0cmluZykgPT4gZmFpbHVyZShgJHtwcmVmaXh9OiAke2Vycm9yfWApO1xuICByZXQuaW4gPSAocHJlZml4Mjogc3RyaW5nKSA9PiBta0xvY2F0ZShgJHtwcmVmaXh9OiAke3ByZWZpeDJ9YCk7XG4gIHJldC5sb2NhdGUgPSBsb2NhdGVGYWlsdXJlKHByZWZpeCk7XG4gIHJldHVybiByZXQ7XG59XG5cbmV4cG9ydCBpbnRlcmZhY2UgZmFpbHVyZSBleHRlbmRzIEZhaWwge31cblxuZXhwb3J0IGZ1bmN0aW9uIGZhaWx1cmUoZXJyb3I6IHN0cmluZyk6IEZhaWx1cmUge1xuICByZXR1cm4geyBbZXJyb3JTeW1dOiBlcnJvciB9O1xufVxuZmFpbHVyZS5pbiA9IChwcmVmaXg6IHN0cmluZykgPT4gbWtMb2NhdGUocHJlZml4KTtcbmZhaWx1cmUubG9jYXRlID0gPEE+KHg6IFJlc3VsdDxBPikgPT4geDtcblxuZXhwb3J0IGZ1bmN0aW9uIGlzRmFpbHVyZTxBPih4OiBSZXN1bHQ8QT4pOiB4IGlzIEZhaWx1cmUge1xuICByZXR1cm4gISF4ICYmIHR5cGVvZiB4ID09PSAnb2JqZWN0JyAmJiAoeCBhcyBhbnkpW2Vycm9yU3ltXTtcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIGlzU3VjY2VzczxBPih4OiBSZXN1bHQ8QT4pOiB4IGlzIEEge1xuICByZXR1cm4gIWlzRmFpbHVyZSh4KTtcbn1cblxuZXhwb3J0IGZ1bmN0aW9uIHVucGFjazxBPih4OiBSZXN1bHQ8QT4pOiBBIHtcbiAgaWYgKGlzRmFpbHVyZSh4KSkge1xuICAgIHRocm93IG5ldyBFcnJvcihgdW5wYWNrOiAke3hbZXJyb3JTeW1dfWApO1xuICB9XG4gIHJldHVybiB4O1xufVxuXG5leHBvcnQgZnVuY3Rpb24gdW5wYWNrT3I8QSwgQj4oeDogUmVzdWx0PEE+LCBkZWY6IEIpOiBCIGV4dGVuZHMgQSA/IEEgOiBBIHwgQiB7XG4gIHJldHVybiAoaXNGYWlsdXJlKHgpID8gZGVmIDogeCkgYXMgYW55O1xufVxuXG5leHBvcnQgZnVuY3Rpb24gZXJyb3JNZXNzYWdlKHg6IEZhaWx1cmUpOiBzdHJpbmcge1xuICByZXR1cm4geFtlcnJvclN5bV07XG59XG5cbmV4cG9ydCBmdW5jdGlvbiBlcnJvckZyb20oeDogRmFpbHVyZSk6IEVycm9yIHtcbiAgcmV0dXJuIG5ldyBFcnJvcihlcnJvck1lc3NhZ2UoeCkpO1xufVxuXG5leHBvcnQgZnVuY3Rpb24gYXNzZXJ0U3VjY2VzczxBPih4OiBSZXN1bHQ8QT4pOiBhc3NlcnRzIHggaXMgQTtcbmV4cG9ydCBmdW5jdGlvbiBhc3NlcnRTdWNjZXNzKHg6IEZhaWx1cmUpOiBuZXZlcjtcbmV4cG9ydCBmdW5jdGlvbiBhc3NlcnRTdWNjZXNzKHg6IEZhaWx1cmUpOiB2b2lkIHtcbiAgaWYgKGlzRmFpbHVyZSh4KSkge1xuICAgIHRocm93IGVycm9yRnJvbSh4KTtcbiAgfVxufVxuXG5leHBvcnQgZnVuY3Rpb24gdHJ5Q2F0Y2g8QT4oYmxvY2s6ICgpID0+IEEpOiBSZXN1bHQ8QT47XG5leHBvcnQgZnVuY3Rpb24gdHJ5Q2F0Y2g8QT4oZmFpbEZuOiBGYWlsLCBibG9jazogKCkgPT4gQSk6IFJlc3VsdDxBPjtcbmV4cG9ydCBmdW5jdGlvbiB0cnlDYXRjaDxBPihmYWlsT3JCbG9jazogRmFpbCB8ICgoKSA9PiBBKSwgbWF5YmVCbG9jaz86ICgpID0+IEEpOiBSZXN1bHQ8QT4ge1xuICBjb25zdCBibG9jazogKCkgPT4gQSA9IChtYXliZUJsb2NrID8/IGZhaWxPckJsb2NrKSBhcyBhbnk7XG4gIGNvbnN0IGY6IEZhaWwgPSAobWF5YmVCbG9jayA/IGZhaWxPckJsb2NrIDogZmFpbHVyZSkgYXMgYW55O1xuXG4gIHRyeSB7XG4gICAgcmV0dXJuIGJsb2NrKCk7XG4gIH0gY2F0Y2ggKGU6IGFueSkge1xuICAgIHJldHVybiBmKGBFcnJvcjogJHtlLm1lc3NhZ2V9XFxuJHtlLnN0YWNrfWApO1xuICB9XG59XG5cbmV4cG9ydCBmdW5jdGlvbiB1c2luZzxBLCBCPih2YWx1ZTogUmVzdWx0PEE+LCBibG9jazogKHg6IEEpID0+IFJlc3VsdDxCPik6IFJlc3VsdDxCPiB7XG4gIGlmIChpc0ZhaWx1cmUodmFsdWUpKSB7XG4gICAgcmV0dXJuIHZhbHVlO1xuICB9XG4gIHJldHVybiBibG9jayh2YWx1ZSk7XG59XG5cbi8qKlxuICogTGlrZSAndXNpbmcnLCBidXQgY2FuIHRha2UgYW55IG51bWJlciBvZiBmdW5jdGlvbnNcbiAqL1xuLyogZXNsaW50LWRpc2FibGUgcHJldHRpZXIvcHJldHRpZXIgKi9cbmV4cG9ydCBmdW5jdGlvbiBjaGFpbjxBLCBCPih2YWx1ZTogUmVzdWx0PEE+LCBiMDogKHg6IEEpID0+IFJlc3VsdDxCPik6IFJlc3VsdDxCPjtcbmV4cG9ydCBmdW5jdGlvbiBjaGFpbjxBLCBCLCBDPih2YWx1ZTogUmVzdWx0PEE+LCBiMDogKHg6IEEpID0+IFJlc3VsdDxCPiwgYjE6ICh4OiBCKSA9PiBSZXN1bHQ8Qz4pOiBSZXN1bHQ8Qz47XG5leHBvcnQgZnVuY3Rpb24gY2hhaW48QSwgQiwgQywgRD4odmFsdWU6IFJlc3VsdDxBPiwgYjA6ICh4OiBBKSA9PiBSZXN1bHQ8Qj4sIGIxOiAoeDogQikgPT4gUmVzdWx0PEM+LCBiMjogKHg6IEMpID0+IFJlc3VsdDxEPik6IFJlc3VsdDxEPjtcbmV4cG9ydCBmdW5jdGlvbiBjaGFpbjxBLCBCLCBDLCBELCBFPih2YWx1ZTogUmVzdWx0PEE+LCBiMDogKHg6IEEpID0+IFJlc3VsdDxCPiwgYjE6ICh4OiBCKSA9PiBSZXN1bHQ8Qz4sIGIyOiAoeDogQykgPT4gUmVzdWx0PEQ+LCBiMzogKHg6IEQpID0+IFJlc3VsdDxFPik6IFJlc3VsdDxFPjtcbmV4cG9ydCBmdW5jdGlvbiBjaGFpbjxBLCBCLCBDLCBELCBFLCBGPih2YWx1ZTogUmVzdWx0PEE+LCBiMDogKHg6IEEpID0+IFJlc3VsdDxCPiwgYjE6ICh4OiBCKSA9PiBSZXN1bHQ8Qz4sIGIyOiAoeDogQykgPT4gUmVzdWx0PEQ+LCBiMzogKHg6IEQpID0+IFJlc3VsdDxFPiwgYjQ6ICh4OiBFKSA9PiBSZXN1bHQ8Rj4pOiBSZXN1bHQ8Rj47XG5leHBvcnQgZnVuY3Rpb24gY2hhaW48QSwgQiwgQywgRCwgRSwgRiwgRz4odmFsdWU6IFJlc3VsdDxBPiwgYjA6ICh4OiBBKSA9PiBSZXN1bHQ8Qj4sIGIxOiAoeDogQikgPT4gUmVzdWx0PEM+LCBiMjogKHg6IEMpID0+IFJlc3VsdDxEPiwgYjM6ICh4OiBEKSA9PiBSZXN1bHQ8RT4sIGI0OiAoeDogRSkgPT4gUmVzdWx0PEY+LCBiNTogKHg6IEYpID0+IFJlc3VsdDxHPik6IFJlc3VsdDxHPjtcbmV4cG9ydCBmdW5jdGlvbiBjaGFpbih2YWx1ZTogUmVzdWx0PGFueT4sIC4uLmZuczogQXJyYXk8KHg6IGFueSkgPT4gUmVzdWx0PGFueT4+KTogUmVzdWx0PGFueT4ge1xuICBmb3IgKGNvbnN0IGZuIG9mIGZucykge1xuICAgIGlmIChpc0ZhaWx1cmUodmFsdWUpKSB7XG4gICAgICByZXR1cm4gdmFsdWU7XG4gICAgfVxuICAgIHZhbHVlID0gZm4odmFsdWUpO1xuICB9XG4gIHJldHVybiB2YWx1ZTtcbn1cbi8qIGVzbGludC1lbmFibGUgcHJldHRpZXIvcHJldHRpZXIgKi9cblxuLyoqXG4gKiBNYWtlIGEgZnVuY3Rpb24gdGhhdCB3aWxsIHByZXBlbmQgYSBwcmVmaXggdG8gZXJyb3IgbWVzc2FnZXNcbiAqXG4gKiBUaGlzIGlzIG9uZSB3YXkgdG8gYmUgc3BlY2lmaWMgYWJvdXQgdGhlIGxvY2F0aW9uIHdoZXJlIGVycm9ycyBvcmlnaW5hdGUsIGJ5IHByZWZpeGluZ1xuICogZXJyb3JzIGFzIHRoZSBjYWxsIHN0YWNrIHVud2luZHMuXG4gKlxuICogQSBkaWZmZXJlbnQgbWV0aG9kIGlzIHRvIHBhc3MgaW4gYSBtb2RpZmllZCBmYWlsdXJlIGZ1bmN0aW9uIHVzaW5nIGBmYWlsdXJlLmluKC4uLilgLFxuICogdG8gYnVpbGQgdGhlIGVycm9yIG1lc3NhZ2UgYXMgdGhlIGNhbGwgc3RhY2sgZGVlcGVucy5cbiAqL1xuZXhwb3J0IGZ1bmN0aW9uIGxvY2F0ZUZhaWx1cmUocHJlZml4OiBzdHJpbmcpIHtcbiAgcmV0dXJuIDxBPih4OiBSZXN1bHQ8QT4pOiBSZXN1bHQ8QT4gPT4gKGlzRmFpbHVyZSh4KSA/IGZhaWx1cmUoYCR7cHJlZml4fTogJHt4W2Vycm9yU3ltXX1gKSA6IHgpO1xufVxuXG5leHBvcnQgdHlwZSBGYWlsdXJlcyA9IEFycmF5PEZhaWx1cmU+O1xuXG5leHBvcnQgZnVuY3Rpb24gbGlmdFJlc3VsdDxBPih4czogUmVjb3JkPHN0cmluZywgUmVzdWx0PEE+Pik6IFJlc3VsdDxSZWNvcmQ8c3RyaW5nLCBBPj47XG5leHBvcnQgZnVuY3Rpb24gbGlmdFJlc3VsdDxBPih4czogQXJyYXk8UmVzdWx0PEE+Pik6IFJlc3VsdDxBcnJheTxBPj47XG5leHBvcnQgZnVuY3Rpb24gbGlmdFJlc3VsdDxBPihcbiAgeHM6IFJlY29yZDxzdHJpbmcsIFJlc3VsdDxBPj4gfCBBcnJheTxSZXN1bHQ8QT4+LFxuKTogUmVzdWx0PFJlY29yZDxzdHJpbmcsIEE+PiB8IFJlc3VsdDxBcnJheTxBPj4ge1xuICBjb25zdCBmYWlsdXJlcyA9IEFycmF5LmlzQXJyYXkoeHMpID8geHMuZmlsdGVyKGlzRmFpbHVyZSkgOiBPYmplY3QudmFsdWVzKHhzKS5maWx0ZXIoaXNGYWlsdXJlKTtcbiAgaWYgKGZhaWx1cmVzLmxlbmd0aCA+IDApIHtcbiAgICByZXR1cm4gZmFpbHVyZShmYWlsdXJlcy5tYXAoZXJyb3JNZXNzYWdlKS5qb2luKCcsICcpKTtcbiAgfVxuICByZXR1cm4geHMgYXMgYW55O1xufVxuXG4vKipcbiAqIExpZnQgYSB2YWx1ZSB0aGF0IGNhbiBiZSAndW5kZWZpbmVkJyB0byBhIHJlc3VsdCwgb3IgYSBmdW5jdGlvbiB0aGF0IGNhbiByZXR1cm4gdW5kZWZpbmVkLlxuICovXG5leHBvcnQgZnVuY3Rpb24gbGlmdFVuZGVmaW5lZDxBPih2OiBBIHwgdW5kZWZpbmVkKTogUmVzdWx0PE5vbk51bGxhYmxlPEE+PjtcbmV4cG9ydCBmdW5jdGlvbiBsaWZ0VW5kZWZpbmVkPEEsIEYgZXh0ZW5kcyAoLi4uYXJnczogYW55W10pID0+IEE+KHY6IEYpOiAoeDogUGFyYW1ldGVyczxGPikgPT4gUmVzdWx0PE5vbk51bGxhYmxlPEE+PjtcbmV4cG9ydCBmdW5jdGlvbiBsaWZ0VW5kZWZpbmVkKHZhbHVlT3JGdW5jdGlvbjogYW55KTogYW55IHtcbiAgaWYgKHR5cGVvZiB2YWx1ZU9yRnVuY3Rpb24gPT09ICdmdW5jdGlvbicpIHtcbiAgICByZXR1cm4gKC4uLmFyZ3M6IGFueVtdKSA9PiB7XG4gICAgICBjb25zdCB2YWx1ZSA9IHZhbHVlT3JGdW5jdGlvbiguLi5hcmdzKTtcbiAgICAgIHJldHVybiB2YWx1ZSAhPT0gdW5kZWZpbmVkID8gdmFsdWUgOiBmYWlsdXJlKCd2YWx1ZSBpcyB1bmRlZmluZWQnKTtcbiAgICB9O1xuICB9XG4gIHJldHVybiB2YWx1ZU9yRnVuY3Rpb24gIT09IHVuZGVmaW5lZCA/IHZhbHVlT3JGdW5jdGlvbiA6IGZhaWx1cmUoJ3ZhbHVlIGlzIHVuZGVmaW5lZCcpO1xufVxuIl19","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.sortedMap = void 0;\n/**\n * A sorted map that may contain the same key multiple times\n *\n * Stored as a sorted array of [key, value] pairs, using binary search to locate\n * entries.\n */\nvar sortedMap;\n(function (sortedMap) {\n function add(map, cmp, key, value) {\n const i = lowerBound(map, cmp, key);\n map.splice(i, 0, [key, value]);\n }\n sortedMap.add = add;\n function find(map, cmp, key) {\n const i = lowerBound(map, cmp, key);\n if (i === map.length) {\n return undefined;\n }\n const [foundKey, value] = map[i];\n return cmp(foundKey, key) === 0 ? value : undefined;\n }\n sortedMap.find = find;\n function findAll(map, cmp, key) {\n let i = lowerBound(map, cmp, key);\n const ret = [];\n while (i < map.length && cmp(map[i][0], key) === 0) {\n ret.push(map[i][1]);\n i += 1;\n }\n return ret;\n }\n sortedMap.findAll = findAll;\n /**\n * Return the index to the first element in the the sorted map\n *\n * @see https://en.cppreference.com/w/cpp/algorithm/lower_bound#Version_2\n */\n function lowerBound(map, cmp, key) {\n let first = 0;\n let count = map.length;\n while (count > 0) {\n let it = first;\n let step = Math.floor(count / 2);\n it += step;\n if (cmp(map[it][0], key) < 0) {\n first = ++it;\n count -= step + 1;\n }\n else {\n count = step;\n }\n }\n return first;\n }\n})(sortedMap = exports.sortedMap || (exports.sortedMap = {}));\n//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic29ydGVkLW1hcC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9zb3J0ZWQtbWFwLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUVBOzs7OztHQUtHO0FBQ0gsSUFBaUIsU0FBUyxDQXNEekI7QUF0REQsV0FBaUIsU0FBUztJQUd4QixTQUFnQixHQUFHLENBQU8sR0FBeUIsRUFBRSxHQUFrQixFQUFFLEdBQU0sRUFBRSxLQUFRO1FBQ3ZGLE1BQU0sQ0FBQyxHQUFHLFVBQVUsQ0FBQyxHQUFHLEVBQUUsR0FBRyxFQUFFLEdBQUcsQ0FBQyxDQUFDO1FBQ3BDLEdBQUcsQ0FBQyxNQUFNLENBQUMsQ0FBQyxFQUFFLENBQUMsRUFBRSxDQUFDLEdBQUcsRUFBRSxLQUFLLENBQUMsQ0FBQyxDQUFDO0lBQ2pDLENBQUM7SUFIZSxhQUFHLE1BR2xCLENBQUE7SUFFRCxTQUFnQixJQUFJLENBQU8sR0FBeUIsRUFBRSxHQUFrQixFQUFFLEdBQU07UUFDOUUsTUFBTSxDQUFDLEdBQUcsVUFBVSxDQUFDLEdBQUcsRUFBRSxHQUFHLEVBQUUsR0FBRyxDQUFDLENBQUM7UUFDcEMsSUFBSSxDQUFDLEtBQUssR0FBRyxDQUFDLE1BQU0sRUFBRTtZQUNwQixPQUFPLFNBQVMsQ0FBQztTQUNsQjtRQUVELE1BQU0sQ0FBQyxRQUFRLEVBQUUsS0FBSyxDQUFDLEdBQUcsR0FBRyxDQUFDLENBQUMsQ0FBQyxDQUFDO1FBQ2pDLE9BQU8sR0FBRyxDQUFDLFFBQVEsRUFBRSxHQUFHLENBQUMsS0FBSyxDQUFDLENBQUMsQ0FBQyxDQUFDLEtBQUssQ0FBQyxDQUFDLENBQUMsU0FBUyxDQUFDO0lBQ3RELENBQUM7SUFSZSxjQUFJLE9BUW5CLENBQUE7SUFFRCxTQUFnQixPQUFPLENBQU8sR0FBeUIsRUFBRSxHQUFrQixFQUFFLEdBQU07UUFDakYsSUFBSSxDQUFDLEdBQUcsVUFBVSxDQUFDLEdBQUcsRUFBRSxHQUFHLEVBQUUsR0FBRyxDQUFDLENBQUM7UUFFbEMsTUFBTSxHQUFHLEdBQUcsRUFBRSxDQUFDO1FBQ2YsT0FBTyxDQUFDLEdBQUcsR0FBRyxDQUFDLE1BQU0sSUFBSSxHQUFHLENBQUMsR0FBRyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxFQUFFLEdBQUcsQ0FBQyxLQUFLLENBQUMsRUFBRTtZQUNsRCxHQUFHLENBQUMsSUFBSSxDQUFDLEdBQUcsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUFDO1lBQ3BCLENBQUMsSUFBSSxDQUFDLENBQUM7U0FDUjtRQUVELE9BQU8sR0FBRyxDQUFDO0lBQ2IsQ0FBQztJQVZlLGlCQUFPLFVBVXRCLENBQUE7SUFFRDs7OztPQUlHO0lBQ0gsU0FBUyxVQUFVLENBQU8sR0FBeUIsRUFBRSxHQUFrQixFQUFFLEdBQU07UUFDN0UsSUFBSSxLQUFLLEdBQUcsQ0FBQyxDQUFDO1FBQ2QsSUFBSSxLQUFLLEdBQUcsR0FBRyxDQUFDLE1BQU0sQ0FBQztRQUV2QixPQUFPLEtBQUssR0FBRyxDQUFDLEVBQUU7WUFDaEIsSUFBSSxFQUFFLEdBQUcsS0FBSyxDQUFDO1lBQ2YsSUFBSSxJQUFJLEdBQUcsSUFBSSxDQUFDLEtBQUssQ0FBQyxLQUFLLEdBQUcsQ0FBQyxDQUFDLENBQUM7WUFDakMsRUFBRSxJQUFJLElBQUksQ0FBQztZQUVYLElBQUksR0FBRyxDQUFDLEdBQUcsQ0FBQyxFQUFFLENBQUMsQ0FBQyxDQUFDLENBQUMsRUFBRSxHQUFHLENBQUMsR0FBRyxDQUFDLEVBQUU7Z0JBQzVCLEtBQUssR0FBRyxFQUFFLEVBQUUsQ0FBQztnQkFDYixLQUFLLElBQUksSUFBSSxHQUFHLENBQUMsQ0FBQzthQUNuQjtpQkFBTTtnQkFDTCxLQUFLLEdBQUcsSUFBSSxDQUFDO2FBQ2Q7U0FDRjtRQUVELE9BQU8sS0FBSyxDQUFDO0lBQ2YsQ0FBQztBQUNILENBQUMsRUF0RGdCLFNBQVMsR0FBVCxpQkFBUyxLQUFULGlCQUFTLFFBc0R6QiIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCB0eXBlIFNvcnRlZE11bHRpTWFwPEEsIEI+ID0gQXJyYXk8W0EsIEJdPjtcblxuLyoqXG4gKiBBIHNvcnRlZCBtYXAgdGhhdCBtYXkgY29udGFpbiB0aGUgc2FtZSBrZXkgbXVsdGlwbGUgdGltZXNcbiAqXG4gKiBTdG9yZWQgYXMgYSBzb3J0ZWQgYXJyYXkgb2YgW2tleSwgdmFsdWVdIHBhaXJzLCB1c2luZyBiaW5hcnkgc2VhcmNoIHRvIGxvY2F0ZVxuICogZW50cmllcy5cbiAqL1xuZXhwb3J0IG5hbWVzcGFjZSBzb3J0ZWRNYXAge1xuICBleHBvcnQgdHlwZSBDb21wYXJhdG9yPEE+ID0gKGE6IEEsIGI6IEEpID0+IG51bWJlcjtcblxuICBleHBvcnQgZnVuY3Rpb24gYWRkPEEsIEI+KG1hcDogU29ydGVkTXVsdGlNYXA8QSwgQj4sIGNtcDogQ29tcGFyYXRvcjxBPiwga2V5OiBBLCB2YWx1ZTogQikge1xuICAgIGNvbnN0IGkgPSBsb3dlckJvdW5kKG1hcCwgY21wLCBrZXkpO1xuICAgIG1hcC5zcGxpY2UoaSwgMCwgW2tleSwgdmFsdWVdKTtcbiAgfVxuXG4gIGV4cG9ydCBmdW5jdGlvbiBmaW5kPEEsIEI+KG1hcDogU29ydGVkTXVsdGlNYXA8QSwgQj4sIGNtcDogQ29tcGFyYXRvcjxBPiwga2V5OiBBKTogQiB8IHVuZGVmaW5lZCB7XG4gICAgY29uc3QgaSA9IGxvd2VyQm91bmQobWFwLCBjbXAsIGtleSk7XG4gICAgaWYgKGkgPT09IG1hcC5sZW5ndGgpIHtcbiAgICAgIHJldHVybiB1bmRlZmluZWQ7XG4gICAgfVxuXG4gICAgY29uc3QgW2ZvdW5kS2V5LCB2YWx1ZV0gPSBtYXBbaV07XG4gICAgcmV0dXJuIGNtcChmb3VuZEtleSwga2V5KSA9PT0gMCA/IHZhbHVlIDogdW5kZWZpbmVkO1xuICB9XG5cbiAgZXhwb3J0IGZ1bmN0aW9uIGZpbmRBbGw8QSwgQj4obWFwOiBTb3J0ZWRNdWx0aU1hcDxBLCBCPiwgY21wOiBDb21wYXJhdG9yPEE+LCBrZXk6IEEpOiBCW10ge1xuICAgIGxldCBpID0gbG93ZXJCb3VuZChtYXAsIGNtcCwga2V5KTtcblxuICAgIGNvbnN0IHJldCA9IFtdO1xuICAgIHdoaWxlIChpIDwgbWFwLmxlbmd0aCAmJiBjbXAobWFwW2ldWzBdLCBrZXkpID09PSAwKSB7XG4gICAgICByZXQucHVzaChtYXBbaV1bMV0pO1xuICAgICAgaSArPSAxO1xuICAgIH1cblxuICAgIHJldHVybiByZXQ7XG4gIH1cblxuICAvKipcbiAgICogUmV0dXJuIHRoZSBpbmRleCB0byB0aGUgZmlyc3QgZWxlbWVudCBpbiB0aGUgdGhlIHNvcnRlZCBtYXBcbiAgICpcbiAgICogQHNlZSBodHRwczovL2VuLmNwcHJlZmVyZW5jZS5jb20vdy9jcHAvYWxnb3JpdGhtL2xvd2VyX2JvdW5kI1ZlcnNpb25fMlxuICAgKi9cbiAgZnVuY3Rpb24gbG93ZXJCb3VuZDxBLCBCPihtYXA6IFNvcnRlZE11bHRpTWFwPEEsIEI+LCBjbXA6IENvbXBhcmF0b3I8QT4sIGtleTogQSk6IG51bWJlciB7XG4gICAgbGV0IGZpcnN0ID0gMDtcbiAgICBsZXQgY291bnQgPSBtYXAubGVuZ3RoO1xuXG4gICAgd2hpbGUgKGNvdW50ID4gMCkge1xuICAgICAgbGV0IGl0ID0gZmlyc3Q7XG4gICAgICBsZXQgc3RlcCA9IE1hdGguZmxvb3IoY291bnQgLyAyKTtcbiAgICAgIGl0ICs9IHN0ZXA7XG5cbiAgICAgIGlmIChjbXAobWFwW2l0XVswXSwga2V5KSA8IDApIHtcbiAgICAgICAgZmlyc3QgPSArK2l0O1xuICAgICAgICBjb3VudCAtPSBzdGVwICsgMTtcbiAgICAgIH0gZWxzZSB7XG4gICAgICAgIGNvdW50ID0gc3RlcDtcbiAgICAgIH1cbiAgICB9XG5cbiAgICByZXR1cm4gZmlyc3Q7XG4gIH1cbn1cbiJdfQ==","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// pkg/dist-src/index.js\nvar dist_src_exports = {};\n__export(dist_src_exports, {\n createTokenAuth: () => createTokenAuth\n});\nmodule.exports = __toCommonJS(dist_src_exports);\n\n// pkg/dist-src/auth.js\nvar REGEX_IS_INSTALLATION_LEGACY = /^v1\\./;\nvar REGEX_IS_INSTALLATION = /^ghs_/;\nvar REGEX_IS_USER_TO_SERVER = /^ghu_/;\nasync function auth(token) {\n const isApp = token.split(/\\./).length === 3;\n const isInstallation = REGEX_IS_INSTALLATION_LEGACY.test(token) || REGEX_IS_INSTALLATION.test(token);\n const isUserToServer = REGEX_IS_USER_TO_SERVER.test(token);\n const tokenType = isApp ? \"app\" : isInstallation ? \"installation\" : isUserToServer ? \"user-to-server\" : \"oauth\";\n return {\n type: \"token\",\n token,\n tokenType\n };\n}\n\n// pkg/dist-src/with-authorization-prefix.js\nfunction withAuthorizationPrefix(token) {\n if (token.split(/\\./).length === 3) {\n return `bearer ${token}`;\n }\n return `token ${token}`;\n}\n\n// pkg/dist-src/hook.js\nasync function hook(token, request, route, parameters) {\n const endpoint = request.endpoint.merge(\n route,\n parameters\n );\n endpoint.headers.authorization = withAuthorizationPrefix(token);\n return request(endpoint);\n}\n\n// pkg/dist-src/index.js\nvar createTokenAuth = function createTokenAuth2(token) {\n if (!token) {\n throw new Error(\"[@octokit/auth-token] No token passed to createTokenAuth\");\n }\n if (typeof token !== \"string\") {\n throw new Error(\n \"[@octokit/auth-token] Token passed to createTokenAuth is not a string\"\n );\n }\n token = token.replace(/^(token|bearer) +/i, \"\");\n return Object.assign(auth.bind(null, token), {\n hook: hook.bind(null, token)\n });\n};\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n createTokenAuth\n});\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// pkg/dist-src/index.js\nvar index_exports = {};\n__export(index_exports, {\n Octokit: () => Octokit\n});\nmodule.exports = __toCommonJS(index_exports);\nvar import_universal_user_agent = require(\"universal-user-agent\");\nvar import_before_after_hook = require(\"before-after-hook\");\nvar import_request = require(\"@octokit/request\");\nvar import_graphql = require(\"@octokit/graphql\");\nvar import_auth_token = require(\"@octokit/auth-token\");\n\n// pkg/dist-src/version.js\nvar VERSION = \"5.2.1\";\n\n// pkg/dist-src/index.js\nvar noop = () => {\n};\nvar consoleWarn = console.warn.bind(console);\nvar consoleError = console.error.bind(console);\nvar userAgentTrail = `octokit-core.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`;\nvar Octokit = class {\n static {\n this.VERSION = VERSION;\n }\n static defaults(defaults) {\n const OctokitWithDefaults = class extends this {\n constructor(...args) {\n const options = args[0] || {};\n if (typeof defaults === \"function\") {\n super(defaults(options));\n return;\n }\n super(\n Object.assign(\n {},\n defaults,\n options,\n options.userAgent && defaults.userAgent ? {\n userAgent: `${options.userAgent} ${defaults.userAgent}`\n } : null\n )\n );\n }\n };\n return OctokitWithDefaults;\n }\n static {\n this.plugins = [];\n }\n /**\n * Attach a plugin (or many) to your Octokit instance.\n *\n * @example\n * const API = Octokit.plugin(plugin1, plugin2, plugin3, ...)\n */\n static plugin(...newPlugins) {\n const currentPlugins = this.plugins;\n const NewOctokit = class extends this {\n static {\n this.plugins = currentPlugins.concat(\n newPlugins.filter((plugin) => !currentPlugins.includes(plugin))\n );\n }\n };\n return NewOctokit;\n }\n constructor(options = {}) {\n const hook = new import_before_after_hook.Collection();\n const requestDefaults = {\n baseUrl: import_request.request.endpoint.DEFAULTS.baseUrl,\n headers: {},\n request: Object.assign({}, options.request, {\n // @ts-ignore internal usage only, no need to type\n hook: hook.bind(null, \"request\")\n }),\n mediaType: {\n previews: [],\n format: \"\"\n }\n };\n requestDefaults.headers[\"user-agent\"] = options.userAgent ? `${options.userAgent} ${userAgentTrail}` : userAgentTrail;\n if (options.baseUrl) {\n requestDefaults.baseUrl = options.baseUrl;\n }\n if (options.previews) {\n requestDefaults.mediaType.previews = options.previews;\n }\n if (options.timeZone) {\n requestDefaults.headers[\"time-zone\"] = options.timeZone;\n }\n this.request = import_request.request.defaults(requestDefaults);\n this.graphql = (0, import_graphql.withCustomRequest)(this.request).defaults(requestDefaults);\n this.log = Object.assign(\n {\n debug: noop,\n info: noop,\n warn: consoleWarn,\n error: consoleError\n },\n options.log\n );\n this.hook = hook;\n if (!options.authStrategy) {\n if (!options.auth) {\n this.auth = async () => ({\n type: \"unauthenticated\"\n });\n } else {\n const auth = (0, import_auth_token.createTokenAuth)(options.auth);\n hook.wrap(\"request\", auth.hook);\n this.auth = auth;\n }\n } else {\n const { authStrategy, ...otherOptions } = options;\n const auth = authStrategy(\n Object.assign(\n {\n request: this.request,\n log: this.log,\n // we pass the current octokit instance as well as its constructor options\n // to allow for authentication strategies that return a new octokit instance\n // that shares the same internal state as the current one. The original\n // requirement for this was the \"event-octokit\" authentication strategy\n // of https://github.com/probot/octokit-auth-probot.\n octokit: this,\n octokitOptions: otherOptions\n },\n options.auth\n )\n );\n hook.wrap(\"request\", auth.hook);\n this.auth = auth;\n }\n const classConstructor = this.constructor;\n for (let i = 0; i < classConstructor.plugins.length; ++i) {\n Object.assign(this, classConstructor.plugins[i](this, options));\n }\n }\n};\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n Octokit\n});\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// pkg/dist-src/index.js\nvar dist_src_exports = {};\n__export(dist_src_exports, {\n endpoint: () => endpoint\n});\nmodule.exports = __toCommonJS(dist_src_exports);\n\n// pkg/dist-src/defaults.js\nvar import_universal_user_agent = require(\"universal-user-agent\");\n\n// pkg/dist-src/version.js\nvar VERSION = \"9.0.6\";\n\n// pkg/dist-src/defaults.js\nvar userAgent = `octokit-endpoint.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`;\nvar DEFAULTS = {\n method: \"GET\",\n baseUrl: \"https://api.github.com\",\n headers: {\n accept: \"application/vnd.github.v3+json\",\n \"user-agent\": userAgent\n },\n mediaType: {\n format: \"\"\n }\n};\n\n// pkg/dist-src/util/lowercase-keys.js\nfunction lowercaseKeys(object) {\n if (!object) {\n return {};\n }\n return Object.keys(object).reduce((newObj, key) => {\n newObj[key.toLowerCase()] = object[key];\n return newObj;\n }, {});\n}\n\n// pkg/dist-src/util/is-plain-object.js\nfunction isPlainObject(value) {\n if (typeof value !== \"object\" || value === null)\n return false;\n if (Object.prototype.toString.call(value) !== \"[object Object]\")\n return false;\n const proto = Object.getPrototypeOf(value);\n if (proto === null)\n return true;\n const Ctor = Object.prototype.hasOwnProperty.call(proto, \"constructor\") && proto.constructor;\n return typeof Ctor === \"function\" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value);\n}\n\n// pkg/dist-src/util/merge-deep.js\nfunction mergeDeep(defaults, options) {\n const result = Object.assign({}, defaults);\n Object.keys(options).forEach((key) => {\n if (isPlainObject(options[key])) {\n if (!(key in defaults))\n Object.assign(result, { [key]: options[key] });\n else\n result[key] = mergeDeep(defaults[key], options[key]);\n } else {\n Object.assign(result, { [key]: options[key] });\n }\n });\n return result;\n}\n\n// pkg/dist-src/util/remove-undefined-properties.js\nfunction removeUndefinedProperties(obj) {\n for (const key in obj) {\n if (obj[key] === void 0) {\n delete obj[key];\n }\n }\n return obj;\n}\n\n// pkg/dist-src/merge.js\nfunction merge(defaults, route, options) {\n if (typeof route === \"string\") {\n let [method, url] = route.split(\" \");\n options = Object.assign(url ? { method, url } : { url: method }, options);\n } else {\n options = Object.assign({}, route);\n }\n options.headers = lowercaseKeys(options.headers);\n removeUndefinedProperties(options);\n removeUndefinedProperties(options.headers);\n const mergedOptions = mergeDeep(defaults || {}, options);\n if (options.url === \"/graphql\") {\n if (defaults && defaults.mediaType.previews?.length) {\n mergedOptions.mediaType.previews = defaults.mediaType.previews.filter(\n (preview) => !mergedOptions.mediaType.previews.includes(preview)\n ).concat(mergedOptions.mediaType.previews);\n }\n mergedOptions.mediaType.previews = (mergedOptions.mediaType.previews || []).map((preview) => preview.replace(/-preview/, \"\"));\n }\n return mergedOptions;\n}\n\n// pkg/dist-src/util/add-query-parameters.js\nfunction addQueryParameters(url, parameters) {\n const separator = /\\?/.test(url) ? \"&\" : \"?\";\n const names = Object.keys(parameters);\n if (names.length === 0) {\n return url;\n }\n return url + separator + names.map((name) => {\n if (name === \"q\") {\n return \"q=\" + parameters.q.split(\"+\").map(encodeURIComponent).join(\"+\");\n }\n return `${name}=${encodeURIComponent(parameters[name])}`;\n }).join(\"&\");\n}\n\n// pkg/dist-src/util/extract-url-variable-names.js\nvar urlVariableRegex = /\\{[^{}}]+\\}/g;\nfunction removeNonChars(variableName) {\n return variableName.replace(/(?:^\\W+)|(?:(? a.concat(b), []);\n}\n\n// pkg/dist-src/util/omit.js\nfunction omit(object, keysToOmit) {\n const result = { __proto__: null };\n for (const key of Object.keys(object)) {\n if (keysToOmit.indexOf(key) === -1) {\n result[key] = object[key];\n }\n }\n return result;\n}\n\n// pkg/dist-src/util/url-template.js\nfunction encodeReserved(str) {\n return str.split(/(%[0-9A-Fa-f]{2})/g).map(function(part) {\n if (!/%[0-9A-Fa-f]/.test(part)) {\n part = encodeURI(part).replace(/%5B/g, \"[\").replace(/%5D/g, \"]\");\n }\n return part;\n }).join(\"\");\n}\nfunction encodeUnreserved(str) {\n return encodeURIComponent(str).replace(/[!'()*]/g, function(c) {\n return \"%\" + c.charCodeAt(0).toString(16).toUpperCase();\n });\n}\nfunction encodeValue(operator, value, key) {\n value = operator === \"+\" || operator === \"#\" ? encodeReserved(value) : encodeUnreserved(value);\n if (key) {\n return encodeUnreserved(key) + \"=\" + value;\n } else {\n return value;\n }\n}\nfunction isDefined(value) {\n return value !== void 0 && value !== null;\n}\nfunction isKeyOperator(operator) {\n return operator === \";\" || operator === \"&\" || operator === \"?\";\n}\nfunction getValues(context, operator, key, modifier) {\n var value = context[key], result = [];\n if (isDefined(value) && value !== \"\") {\n if (typeof value === \"string\" || typeof value === \"number\" || typeof value === \"boolean\") {\n value = value.toString();\n if (modifier && modifier !== \"*\") {\n value = value.substring(0, parseInt(modifier, 10));\n }\n result.push(\n encodeValue(operator, value, isKeyOperator(operator) ? key : \"\")\n );\n } else {\n if (modifier === \"*\") {\n if (Array.isArray(value)) {\n value.filter(isDefined).forEach(function(value2) {\n result.push(\n encodeValue(operator, value2, isKeyOperator(operator) ? key : \"\")\n );\n });\n } else {\n Object.keys(value).forEach(function(k) {\n if (isDefined(value[k])) {\n result.push(encodeValue(operator, value[k], k));\n }\n });\n }\n } else {\n const tmp = [];\n if (Array.isArray(value)) {\n value.filter(isDefined).forEach(function(value2) {\n tmp.push(encodeValue(operator, value2));\n });\n } else {\n Object.keys(value).forEach(function(k) {\n if (isDefined(value[k])) {\n tmp.push(encodeUnreserved(k));\n tmp.push(encodeValue(operator, value[k].toString()));\n }\n });\n }\n if (isKeyOperator(operator)) {\n result.push(encodeUnreserved(key) + \"=\" + tmp.join(\",\"));\n } else if (tmp.length !== 0) {\n result.push(tmp.join(\",\"));\n }\n }\n }\n } else {\n if (operator === \";\") {\n if (isDefined(value)) {\n result.push(encodeUnreserved(key));\n }\n } else if (value === \"\" && (operator === \"&\" || operator === \"?\")) {\n result.push(encodeUnreserved(key) + \"=\");\n } else if (value === \"\") {\n result.push(\"\");\n }\n }\n return result;\n}\nfunction parseUrl(template) {\n return {\n expand: expand.bind(null, template)\n };\n}\nfunction expand(template, context) {\n var operators = [\"+\", \"#\", \".\", \"/\", \";\", \"?\", \"&\"];\n template = template.replace(\n /\\{([^\\{\\}]+)\\}|([^\\{\\}]+)/g,\n function(_, expression, literal) {\n if (expression) {\n let operator = \"\";\n const values = [];\n if (operators.indexOf(expression.charAt(0)) !== -1) {\n operator = expression.charAt(0);\n expression = expression.substr(1);\n }\n expression.split(/,/g).forEach(function(variable) {\n var tmp = /([^:\\*]*)(?::(\\d+)|(\\*))?/.exec(variable);\n values.push(getValues(context, operator, tmp[1], tmp[2] || tmp[3]));\n });\n if (operator && operator !== \"+\") {\n var separator = \",\";\n if (operator === \"?\") {\n separator = \"&\";\n } else if (operator !== \"#\") {\n separator = operator;\n }\n return (values.length !== 0 ? operator : \"\") + values.join(separator);\n } else {\n return values.join(\",\");\n }\n } else {\n return encodeReserved(literal);\n }\n }\n );\n if (template === \"/\") {\n return template;\n } else {\n return template.replace(/\\/$/, \"\");\n }\n}\n\n// pkg/dist-src/parse.js\nfunction parse(options) {\n let method = options.method.toUpperCase();\n let url = (options.url || \"/\").replace(/:([a-z]\\w+)/g, \"{$1}\");\n let headers = Object.assign({}, options.headers);\n let body;\n let parameters = omit(options, [\n \"method\",\n \"baseUrl\",\n \"url\",\n \"headers\",\n \"request\",\n \"mediaType\"\n ]);\n const urlVariableNames = extractUrlVariableNames(url);\n url = parseUrl(url).expand(parameters);\n if (!/^http/.test(url)) {\n url = options.baseUrl + url;\n }\n const omittedParameters = Object.keys(options).filter((option) => urlVariableNames.includes(option)).concat(\"baseUrl\");\n const remainingParameters = omit(parameters, omittedParameters);\n const isBinaryRequest = /application\\/octet-stream/i.test(headers.accept);\n if (!isBinaryRequest) {\n if (options.mediaType.format) {\n headers.accept = headers.accept.split(/,/).map(\n (format) => format.replace(\n /application\\/vnd(\\.\\w+)(\\.v3)?(\\.\\w+)?(\\+json)?$/,\n `application/vnd$1$2.${options.mediaType.format}`\n )\n ).join(\",\");\n }\n if (url.endsWith(\"/graphql\")) {\n if (options.mediaType.previews?.length) {\n const previewsFromAcceptHeader = headers.accept.match(/(? {\n const format = options.mediaType.format ? `.${options.mediaType.format}` : \"+json\";\n return `application/vnd.github.${preview}-preview${format}`;\n }).join(\",\");\n }\n }\n }\n if ([\"GET\", \"HEAD\"].includes(method)) {\n url = addQueryParameters(url, remainingParameters);\n } else {\n if (\"data\" in remainingParameters) {\n body = remainingParameters.data;\n } else {\n if (Object.keys(remainingParameters).length) {\n body = remainingParameters;\n }\n }\n }\n if (!headers[\"content-type\"] && typeof body !== \"undefined\") {\n headers[\"content-type\"] = \"application/json; charset=utf-8\";\n }\n if ([\"PATCH\", \"PUT\"].includes(method) && typeof body === \"undefined\") {\n body = \"\";\n }\n return Object.assign(\n { method, url, headers },\n typeof body !== \"undefined\" ? { body } : null,\n options.request ? { request: options.request } : null\n );\n}\n\n// pkg/dist-src/endpoint-with-defaults.js\nfunction endpointWithDefaults(defaults, route, options) {\n return parse(merge(defaults, route, options));\n}\n\n// pkg/dist-src/with-defaults.js\nfunction withDefaults(oldDefaults, newDefaults) {\n const DEFAULTS2 = merge(oldDefaults, newDefaults);\n const endpoint2 = endpointWithDefaults.bind(null, DEFAULTS2);\n return Object.assign(endpoint2, {\n DEFAULTS: DEFAULTS2,\n defaults: withDefaults.bind(null, DEFAULTS2),\n merge: merge.bind(null, DEFAULTS2),\n parse\n });\n}\n\n// pkg/dist-src/index.js\nvar endpoint = withDefaults(null, DEFAULTS);\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n endpoint\n});\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// pkg/dist-src/index.js\nvar index_exports = {};\n__export(index_exports, {\n GraphqlResponseError: () => GraphqlResponseError,\n graphql: () => graphql2,\n withCustomRequest: () => withCustomRequest\n});\nmodule.exports = __toCommonJS(index_exports);\nvar import_request3 = require(\"@octokit/request\");\nvar import_universal_user_agent = require(\"universal-user-agent\");\n\n// pkg/dist-src/version.js\nvar VERSION = \"7.1.1\";\n\n// pkg/dist-src/with-defaults.js\nvar import_request2 = require(\"@octokit/request\");\n\n// pkg/dist-src/graphql.js\nvar import_request = require(\"@octokit/request\");\n\n// pkg/dist-src/error.js\nfunction _buildMessageForResponseErrors(data) {\n return `Request failed due to following response errors:\n` + data.errors.map((e) => ` - ${e.message}`).join(\"\\n\");\n}\nvar GraphqlResponseError = class extends Error {\n constructor(request2, headers, response) {\n super(_buildMessageForResponseErrors(response));\n this.request = request2;\n this.headers = headers;\n this.response = response;\n this.name = \"GraphqlResponseError\";\n this.errors = response.errors;\n this.data = response.data;\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n }\n};\n\n// pkg/dist-src/graphql.js\nvar NON_VARIABLE_OPTIONS = [\n \"method\",\n \"baseUrl\",\n \"url\",\n \"headers\",\n \"request\",\n \"query\",\n \"mediaType\"\n];\nvar FORBIDDEN_VARIABLE_OPTIONS = [\"query\", \"method\", \"url\"];\nvar GHES_V3_SUFFIX_REGEX = /\\/api\\/v3\\/?$/;\nfunction graphql(request2, query, options) {\n if (options) {\n if (typeof query === \"string\" && \"query\" in options) {\n return Promise.reject(\n new Error(`[@octokit/graphql] \"query\" cannot be used as variable name`)\n );\n }\n for (const key in options) {\n if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key)) continue;\n return Promise.reject(\n new Error(\n `[@octokit/graphql] \"${key}\" cannot be used as variable name`\n )\n );\n }\n }\n const parsedOptions = typeof query === \"string\" ? Object.assign({ query }, options) : query;\n const requestOptions = Object.keys(\n parsedOptions\n ).reduce((result, key) => {\n if (NON_VARIABLE_OPTIONS.includes(key)) {\n result[key] = parsedOptions[key];\n return result;\n }\n if (!result.variables) {\n result.variables = {};\n }\n result.variables[key] = parsedOptions[key];\n return result;\n }, {});\n const baseUrl = parsedOptions.baseUrl || request2.endpoint.DEFAULTS.baseUrl;\n if (GHES_V3_SUFFIX_REGEX.test(baseUrl)) {\n requestOptions.url = baseUrl.replace(GHES_V3_SUFFIX_REGEX, \"/api/graphql\");\n }\n return request2(requestOptions).then((response) => {\n if (response.data.errors) {\n const headers = {};\n for (const key of Object.keys(response.headers)) {\n headers[key] = response.headers[key];\n }\n throw new GraphqlResponseError(\n requestOptions,\n headers,\n response.data\n );\n }\n return response.data.data;\n });\n}\n\n// pkg/dist-src/with-defaults.js\nfunction withDefaults(request2, newDefaults) {\n const newRequest = request2.defaults(newDefaults);\n const newApi = (query, options) => {\n return graphql(newRequest, query, options);\n };\n return Object.assign(newApi, {\n defaults: withDefaults.bind(null, newRequest),\n endpoint: newRequest.endpoint\n });\n}\n\n// pkg/dist-src/index.js\nvar graphql2 = withDefaults(import_request3.request, {\n headers: {\n \"user-agent\": `octokit-graphql.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`\n },\n method: \"POST\",\n url: \"/graphql\"\n});\nfunction withCustomRequest(customRequest) {\n return withDefaults(customRequest, {\n method: \"POST\",\n url: \"/graphql\"\n });\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n GraphqlResponseError,\n graphql,\n withCustomRequest\n});\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// pkg/dist-src/index.js\nvar dist_src_exports = {};\n__export(dist_src_exports, {\n composePaginateRest: () => composePaginateRest,\n isPaginatingEndpoint: () => isPaginatingEndpoint,\n paginateRest: () => paginateRest,\n paginatingEndpoints: () => paginatingEndpoints\n});\nmodule.exports = __toCommonJS(dist_src_exports);\n\n// pkg/dist-src/version.js\nvar VERSION = \"9.2.2\";\n\n// pkg/dist-src/normalize-paginated-list-response.js\nfunction normalizePaginatedListResponse(response) {\n if (!response.data) {\n return {\n ...response,\n data: []\n };\n }\n const responseNeedsNormalization = \"total_count\" in response.data && !(\"url\" in response.data);\n if (!responseNeedsNormalization)\n return response;\n const incompleteResults = response.data.incomplete_results;\n const repositorySelection = response.data.repository_selection;\n const totalCount = response.data.total_count;\n delete response.data.incomplete_results;\n delete response.data.repository_selection;\n delete response.data.total_count;\n const namespaceKey = Object.keys(response.data)[0];\n const data = response.data[namespaceKey];\n response.data = data;\n if (typeof incompleteResults !== \"undefined\") {\n response.data.incomplete_results = incompleteResults;\n }\n if (typeof repositorySelection !== \"undefined\") {\n response.data.repository_selection = repositorySelection;\n }\n response.data.total_count = totalCount;\n return response;\n}\n\n// pkg/dist-src/iterator.js\nfunction iterator(octokit, route, parameters) {\n const options = typeof route === \"function\" ? route.endpoint(parameters) : octokit.request.endpoint(route, parameters);\n const requestMethod = typeof route === \"function\" ? route : octokit.request;\n const method = options.method;\n const headers = options.headers;\n let url = options.url;\n return {\n [Symbol.asyncIterator]: () => ({\n async next() {\n if (!url)\n return { done: true };\n try {\n const response = await requestMethod({ method, url, headers });\n const normalizedResponse = normalizePaginatedListResponse(response);\n url = ((normalizedResponse.headers.link || \"\").match(\n /<([^<>]+)>;\\s*rel=\"next\"/\n ) || [])[1];\n return { value: normalizedResponse };\n } catch (error) {\n if (error.status !== 409)\n throw error;\n url = \"\";\n return {\n value: {\n status: 200,\n headers: {},\n data: []\n }\n };\n }\n }\n })\n };\n}\n\n// pkg/dist-src/paginate.js\nfunction paginate(octokit, route, parameters, mapFn) {\n if (typeof parameters === \"function\") {\n mapFn = parameters;\n parameters = void 0;\n }\n return gather(\n octokit,\n [],\n iterator(octokit, route, parameters)[Symbol.asyncIterator](),\n mapFn\n );\n}\nfunction gather(octokit, results, iterator2, mapFn) {\n return iterator2.next().then((result) => {\n if (result.done) {\n return results;\n }\n let earlyExit = false;\n function done() {\n earlyExit = true;\n }\n results = results.concat(\n mapFn ? mapFn(result.value, done) : result.value.data\n );\n if (earlyExit) {\n return results;\n }\n return gather(octokit, results, iterator2, mapFn);\n });\n}\n\n// pkg/dist-src/compose-paginate.js\nvar composePaginateRest = Object.assign(paginate, {\n iterator\n});\n\n// pkg/dist-src/generated/paginating-endpoints.js\nvar paginatingEndpoints = [\n \"GET /advisories\",\n \"GET /app/hook/deliveries\",\n \"GET /app/installation-requests\",\n \"GET /app/installations\",\n \"GET /assignments/{assignment_id}/accepted_assignments\",\n \"GET /classrooms\",\n \"GET /classrooms/{classroom_id}/assignments\",\n \"GET /enterprises/{enterprise}/dependabot/alerts\",\n \"GET /enterprises/{enterprise}/secret-scanning/alerts\",\n \"GET /events\",\n \"GET /gists\",\n \"GET /gists/public\",\n \"GET /gists/starred\",\n \"GET /gists/{gist_id}/comments\",\n \"GET /gists/{gist_id}/commits\",\n \"GET /gists/{gist_id}/forks\",\n \"GET /installation/repositories\",\n \"GET /issues\",\n \"GET /licenses\",\n \"GET /marketplace_listing/plans\",\n \"GET /marketplace_listing/plans/{plan_id}/accounts\",\n \"GET /marketplace_listing/stubbed/plans\",\n \"GET /marketplace_listing/stubbed/plans/{plan_id}/accounts\",\n \"GET /networks/{owner}/{repo}/events\",\n \"GET /notifications\",\n \"GET /organizations\",\n \"GET /orgs/{org}/actions/cache/usage-by-repository\",\n \"GET /orgs/{org}/actions/permissions/repositories\",\n \"GET /orgs/{org}/actions/runners\",\n \"GET /orgs/{org}/actions/secrets\",\n \"GET /orgs/{org}/actions/secrets/{secret_name}/repositories\",\n \"GET /orgs/{org}/actions/variables\",\n \"GET /orgs/{org}/actions/variables/{name}/repositories\",\n \"GET /orgs/{org}/blocks\",\n \"GET /orgs/{org}/code-scanning/alerts\",\n \"GET /orgs/{org}/codespaces\",\n \"GET /orgs/{org}/codespaces/secrets\",\n \"GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories\",\n \"GET /orgs/{org}/copilot/billing/seats\",\n \"GET /orgs/{org}/dependabot/alerts\",\n \"GET /orgs/{org}/dependabot/secrets\",\n \"GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories\",\n \"GET /orgs/{org}/events\",\n \"GET /orgs/{org}/failed_invitations\",\n \"GET /orgs/{org}/hooks\",\n \"GET /orgs/{org}/hooks/{hook_id}/deliveries\",\n \"GET /orgs/{org}/installations\",\n \"GET /orgs/{org}/invitations\",\n \"GET /orgs/{org}/invitations/{invitation_id}/teams\",\n \"GET /orgs/{org}/issues\",\n \"GET /orgs/{org}/members\",\n \"GET /orgs/{org}/members/{username}/codespaces\",\n \"GET /orgs/{org}/migrations\",\n \"GET /orgs/{org}/migrations/{migration_id}/repositories\",\n \"GET /orgs/{org}/organization-roles/{role_id}/teams\",\n \"GET /orgs/{org}/organization-roles/{role_id}/users\",\n \"GET /orgs/{org}/outside_collaborators\",\n \"GET /orgs/{org}/packages\",\n \"GET /orgs/{org}/packages/{package_type}/{package_name}/versions\",\n \"GET /orgs/{org}/personal-access-token-requests\",\n \"GET /orgs/{org}/personal-access-token-requests/{pat_request_id}/repositories\",\n \"GET /orgs/{org}/personal-access-tokens\",\n \"GET /orgs/{org}/personal-access-tokens/{pat_id}/repositories\",\n \"GET /orgs/{org}/projects\",\n \"GET /orgs/{org}/properties/values\",\n \"GET /orgs/{org}/public_members\",\n \"GET /orgs/{org}/repos\",\n \"GET /orgs/{org}/rulesets\",\n \"GET /orgs/{org}/rulesets/rule-suites\",\n \"GET /orgs/{org}/secret-scanning/alerts\",\n \"GET /orgs/{org}/security-advisories\",\n \"GET /orgs/{org}/teams\",\n \"GET /orgs/{org}/teams/{team_slug}/discussions\",\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments\",\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions\",\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions\",\n \"GET /orgs/{org}/teams/{team_slug}/invitations\",\n \"GET /orgs/{org}/teams/{team_slug}/members\",\n \"GET /orgs/{org}/teams/{team_slug}/projects\",\n \"GET /orgs/{org}/teams/{team_slug}/repos\",\n \"GET /orgs/{org}/teams/{team_slug}/teams\",\n \"GET /projects/columns/{column_id}/cards\",\n \"GET /projects/{project_id}/collaborators\",\n \"GET /projects/{project_id}/columns\",\n \"GET /repos/{owner}/{repo}/actions/artifacts\",\n \"GET /repos/{owner}/{repo}/actions/caches\",\n \"GET /repos/{owner}/{repo}/actions/organization-secrets\",\n \"GET /repos/{owner}/{repo}/actions/organization-variables\",\n \"GET /repos/{owner}/{repo}/actions/runners\",\n \"GET /repos/{owner}/{repo}/actions/runs\",\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts\",\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs\",\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs\",\n \"GET /repos/{owner}/{repo}/actions/secrets\",\n \"GET /repos/{owner}/{repo}/actions/variables\",\n \"GET /repos/{owner}/{repo}/actions/workflows\",\n \"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs\",\n \"GET /repos/{owner}/{repo}/activity\",\n \"GET /repos/{owner}/{repo}/assignees\",\n \"GET /repos/{owner}/{repo}/branches\",\n \"GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations\",\n \"GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs\",\n \"GET /repos/{owner}/{repo}/code-scanning/alerts\",\n \"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances\",\n \"GET /repos/{owner}/{repo}/code-scanning/analyses\",\n \"GET /repos/{owner}/{repo}/codespaces\",\n \"GET /repos/{owner}/{repo}/codespaces/devcontainers\",\n \"GET /repos/{owner}/{repo}/codespaces/secrets\",\n \"GET /repos/{owner}/{repo}/collaborators\",\n \"GET /repos/{owner}/{repo}/comments\",\n \"GET /repos/{owner}/{repo}/comments/{comment_id}/reactions\",\n \"GET /repos/{owner}/{repo}/commits\",\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/comments\",\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls\",\n \"GET /repos/{owner}/{repo}/commits/{ref}/check-runs\",\n \"GET /repos/{owner}/{repo}/commits/{ref}/check-suites\",\n \"GET /repos/{owner}/{repo}/commits/{ref}/status\",\n \"GET /repos/{owner}/{repo}/commits/{ref}/statuses\",\n \"GET /repos/{owner}/{repo}/contributors\",\n \"GET /repos/{owner}/{repo}/dependabot/alerts\",\n \"GET /repos/{owner}/{repo}/dependabot/secrets\",\n \"GET /repos/{owner}/{repo}/deployments\",\n \"GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses\",\n \"GET /repos/{owner}/{repo}/environments\",\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies\",\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps\",\n \"GET /repos/{owner}/{repo}/events\",\n \"GET /repos/{owner}/{repo}/forks\",\n \"GET /repos/{owner}/{repo}/hooks\",\n \"GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries\",\n \"GET /repos/{owner}/{repo}/invitations\",\n \"GET /repos/{owner}/{repo}/issues\",\n \"GET /repos/{owner}/{repo}/issues/comments\",\n \"GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions\",\n \"GET /repos/{owner}/{repo}/issues/events\",\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/comments\",\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/events\",\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/labels\",\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/reactions\",\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/timeline\",\n \"GET /repos/{owner}/{repo}/keys\",\n \"GET /repos/{owner}/{repo}/labels\",\n \"GET /repos/{owner}/{repo}/milestones\",\n \"GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels\",\n \"GET /repos/{owner}/{repo}/notifications\",\n \"GET /repos/{owner}/{repo}/pages/builds\",\n \"GET /repos/{owner}/{repo}/projects\",\n \"GET /repos/{owner}/{repo}/pulls\",\n \"GET /repos/{owner}/{repo}/pulls/comments\",\n \"GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/comments\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/commits\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/files\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews\",\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments\",\n \"GET /repos/{owner}/{repo}/releases\",\n \"GET /repos/{owner}/{repo}/releases/{release_id}/assets\",\n \"GET /repos/{owner}/{repo}/releases/{release_id}/reactions\",\n \"GET /repos/{owner}/{repo}/rules/branches/{branch}\",\n \"GET /repos/{owner}/{repo}/rulesets\",\n \"GET /repos/{owner}/{repo}/rulesets/rule-suites\",\n \"GET /repos/{owner}/{repo}/secret-scanning/alerts\",\n \"GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations\",\n \"GET /repos/{owner}/{repo}/security-advisories\",\n \"GET /repos/{owner}/{repo}/stargazers\",\n \"GET /repos/{owner}/{repo}/subscribers\",\n \"GET /repos/{owner}/{repo}/tags\",\n \"GET /repos/{owner}/{repo}/teams\",\n \"GET /repos/{owner}/{repo}/topics\",\n \"GET /repositories\",\n \"GET /repositories/{repository_id}/environments/{environment_name}/secrets\",\n \"GET /repositories/{repository_id}/environments/{environment_name}/variables\",\n \"GET /search/code\",\n \"GET /search/commits\",\n \"GET /search/issues\",\n \"GET /search/labels\",\n \"GET /search/repositories\",\n \"GET /search/topics\",\n \"GET /search/users\",\n \"GET /teams/{team_id}/discussions\",\n \"GET /teams/{team_id}/discussions/{discussion_number}/comments\",\n \"GET /teams/{team_id}/discussions/{discussion_number}/comments/{comment_number}/reactions\",\n \"GET /teams/{team_id}/discussions/{discussion_number}/reactions\",\n \"GET /teams/{team_id}/invitations\",\n \"GET /teams/{team_id}/members\",\n \"GET /teams/{team_id}/projects\",\n \"GET /teams/{team_id}/repos\",\n \"GET /teams/{team_id}/teams\",\n \"GET /user/blocks\",\n \"GET /user/codespaces\",\n \"GET /user/codespaces/secrets\",\n \"GET /user/emails\",\n \"GET /user/followers\",\n \"GET /user/following\",\n \"GET /user/gpg_keys\",\n \"GET /user/installations\",\n \"GET /user/installations/{installation_id}/repositories\",\n \"GET /user/issues\",\n \"GET /user/keys\",\n \"GET /user/marketplace_purchases\",\n \"GET /user/marketplace_purchases/stubbed\",\n \"GET /user/memberships/orgs\",\n \"GET /user/migrations\",\n \"GET /user/migrations/{migration_id}/repositories\",\n \"GET /user/orgs\",\n \"GET /user/packages\",\n \"GET /user/packages/{package_type}/{package_name}/versions\",\n \"GET /user/public_emails\",\n \"GET /user/repos\",\n \"GET /user/repository_invitations\",\n \"GET /user/social_accounts\",\n \"GET /user/ssh_signing_keys\",\n \"GET /user/starred\",\n \"GET /user/subscriptions\",\n \"GET /user/teams\",\n \"GET /users\",\n \"GET /users/{username}/events\",\n \"GET /users/{username}/events/orgs/{org}\",\n \"GET /users/{username}/events/public\",\n \"GET /users/{username}/followers\",\n \"GET /users/{username}/following\",\n \"GET /users/{username}/gists\",\n \"GET /users/{username}/gpg_keys\",\n \"GET /users/{username}/keys\",\n \"GET /users/{username}/orgs\",\n \"GET /users/{username}/packages\",\n \"GET /users/{username}/projects\",\n \"GET /users/{username}/received_events\",\n \"GET /users/{username}/received_events/public\",\n \"GET /users/{username}/repos\",\n \"GET /users/{username}/social_accounts\",\n \"GET /users/{username}/ssh_signing_keys\",\n \"GET /users/{username}/starred\",\n \"GET /users/{username}/subscriptions\"\n];\n\n// pkg/dist-src/paginating-endpoints.js\nfunction isPaginatingEndpoint(arg) {\n if (typeof arg === \"string\") {\n return paginatingEndpoints.includes(arg);\n } else {\n return false;\n }\n}\n\n// pkg/dist-src/index.js\nfunction paginateRest(octokit) {\n return {\n paginate: Object.assign(paginate.bind(null, octokit), {\n iterator: iterator.bind(null, octokit)\n })\n };\n}\npaginateRest.VERSION = VERSION;\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n composePaginateRest,\n isPaginatingEndpoint,\n paginateRest,\n paginatingEndpoints\n});\n","\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// pkg/dist-src/index.js\nvar dist_src_exports = {};\n__export(dist_src_exports, {\n legacyRestEndpointMethods: () => legacyRestEndpointMethods,\n restEndpointMethods: () => restEndpointMethods\n});\nmodule.exports = __toCommonJS(dist_src_exports);\n\n// pkg/dist-src/version.js\nvar VERSION = \"10.4.1\";\n\n// pkg/dist-src/generated/endpoints.js\nvar Endpoints = {\n actions: {\n addCustomLabelsToSelfHostedRunnerForOrg: [\n \"POST /orgs/{org}/actions/runners/{runner_id}/labels\"\n ],\n addCustomLabelsToSelfHostedRunnerForRepo: [\n \"POST /repos/{owner}/{repo}/actions/runners/{runner_id}/labels\"\n ],\n addSelectedRepoToOrgSecret: [\n \"PUT /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}\"\n ],\n addSelectedRepoToOrgVariable: [\n \"PUT /orgs/{org}/actions/variables/{name}/repositories/{repository_id}\"\n ],\n approveWorkflowRun: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/approve\"\n ],\n cancelWorkflowRun: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/cancel\"\n ],\n createEnvironmentVariable: [\n \"POST /repositories/{repository_id}/environments/{environment_name}/variables\"\n ],\n createOrUpdateEnvironmentSecret: [\n \"PUT /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}\"\n ],\n createOrUpdateOrgSecret: [\"PUT /orgs/{org}/actions/secrets/{secret_name}\"],\n createOrUpdateRepoSecret: [\n \"PUT /repos/{owner}/{repo}/actions/secrets/{secret_name}\"\n ],\n createOrgVariable: [\"POST /orgs/{org}/actions/variables\"],\n createRegistrationTokenForOrg: [\n \"POST /orgs/{org}/actions/runners/registration-token\"\n ],\n createRegistrationTokenForRepo: [\n \"POST /repos/{owner}/{repo}/actions/runners/registration-token\"\n ],\n createRemoveTokenForOrg: [\"POST /orgs/{org}/actions/runners/remove-token\"],\n createRemoveTokenForRepo: [\n \"POST /repos/{owner}/{repo}/actions/runners/remove-token\"\n ],\n createRepoVariable: [\"POST /repos/{owner}/{repo}/actions/variables\"],\n createWorkflowDispatch: [\n \"POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches\"\n ],\n deleteActionsCacheById: [\n \"DELETE /repos/{owner}/{repo}/actions/caches/{cache_id}\"\n ],\n deleteActionsCacheByKey: [\n \"DELETE /repos/{owner}/{repo}/actions/caches{?key,ref}\"\n ],\n deleteArtifact: [\n \"DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id}\"\n ],\n deleteEnvironmentSecret: [\n \"DELETE /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}\"\n ],\n deleteEnvironmentVariable: [\n \"DELETE /repositories/{repository_id}/environments/{environment_name}/variables/{name}\"\n ],\n deleteOrgSecret: [\"DELETE /orgs/{org}/actions/secrets/{secret_name}\"],\n deleteOrgVariable: [\"DELETE /orgs/{org}/actions/variables/{name}\"],\n deleteRepoSecret: [\n \"DELETE /repos/{owner}/{repo}/actions/secrets/{secret_name}\"\n ],\n deleteRepoVariable: [\n \"DELETE /repos/{owner}/{repo}/actions/variables/{name}\"\n ],\n deleteSelfHostedRunnerFromOrg: [\n \"DELETE /orgs/{org}/actions/runners/{runner_id}\"\n ],\n deleteSelfHostedRunnerFromRepo: [\n \"DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}\"\n ],\n deleteWorkflowRun: [\"DELETE /repos/{owner}/{repo}/actions/runs/{run_id}\"],\n deleteWorkflowRunLogs: [\n \"DELETE /repos/{owner}/{repo}/actions/runs/{run_id}/logs\"\n ],\n disableSelectedRepositoryGithubActionsOrganization: [\n \"DELETE /orgs/{org}/actions/permissions/repositories/{repository_id}\"\n ],\n disableWorkflow: [\n \"PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/disable\"\n ],\n downloadArtifact: [\n \"GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}/{archive_format}\"\n ],\n downloadJobLogsForWorkflowRun: [\n \"GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs\"\n ],\n downloadWorkflowRunAttemptLogs: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/logs\"\n ],\n downloadWorkflowRunLogs: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/logs\"\n ],\n enableSelectedRepositoryGithubActionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions/repositories/{repository_id}\"\n ],\n enableWorkflow: [\n \"PUT /repos/{owner}/{repo}/actions/workflows/{workflow_id}/enable\"\n ],\n forceCancelWorkflowRun: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/force-cancel\"\n ],\n generateRunnerJitconfigForOrg: [\n \"POST /orgs/{org}/actions/runners/generate-jitconfig\"\n ],\n generateRunnerJitconfigForRepo: [\n \"POST /repos/{owner}/{repo}/actions/runners/generate-jitconfig\"\n ],\n getActionsCacheList: [\"GET /repos/{owner}/{repo}/actions/caches\"],\n getActionsCacheUsage: [\"GET /repos/{owner}/{repo}/actions/cache/usage\"],\n getActionsCacheUsageByRepoForOrg: [\n \"GET /orgs/{org}/actions/cache/usage-by-repository\"\n ],\n getActionsCacheUsageForOrg: [\"GET /orgs/{org}/actions/cache/usage\"],\n getAllowedActionsOrganization: [\n \"GET /orgs/{org}/actions/permissions/selected-actions\"\n ],\n getAllowedActionsRepository: [\n \"GET /repos/{owner}/{repo}/actions/permissions/selected-actions\"\n ],\n getArtifact: [\"GET /repos/{owner}/{repo}/actions/artifacts/{artifact_id}\"],\n getCustomOidcSubClaimForRepo: [\n \"GET /repos/{owner}/{repo}/actions/oidc/customization/sub\"\n ],\n getEnvironmentPublicKey: [\n \"GET /repositories/{repository_id}/environments/{environment_name}/secrets/public-key\"\n ],\n getEnvironmentSecret: [\n \"GET /repositories/{repository_id}/environments/{environment_name}/secrets/{secret_name}\"\n ],\n getEnvironmentVariable: [\n \"GET /repositories/{repository_id}/environments/{environment_name}/variables/{name}\"\n ],\n getGithubActionsDefaultWorkflowPermissionsOrganization: [\n \"GET /orgs/{org}/actions/permissions/workflow\"\n ],\n getGithubActionsDefaultWorkflowPermissionsRepository: [\n \"GET /repos/{owner}/{repo}/actions/permissions/workflow\"\n ],\n getGithubActionsPermissionsOrganization: [\n \"GET /orgs/{org}/actions/permissions\"\n ],\n getGithubActionsPermissionsRepository: [\n \"GET /repos/{owner}/{repo}/actions/permissions\"\n ],\n getJobForWorkflowRun: [\"GET /repos/{owner}/{repo}/actions/jobs/{job_id}\"],\n getOrgPublicKey: [\"GET /orgs/{org}/actions/secrets/public-key\"],\n getOrgSecret: [\"GET /orgs/{org}/actions/secrets/{secret_name}\"],\n getOrgVariable: [\"GET /orgs/{org}/actions/variables/{name}\"],\n getPendingDeploymentsForRun: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments\"\n ],\n getRepoPermissions: [\n \"GET /repos/{owner}/{repo}/actions/permissions\",\n {},\n { renamed: [\"actions\", \"getGithubActionsPermissionsRepository\"] }\n ],\n getRepoPublicKey: [\"GET /repos/{owner}/{repo}/actions/secrets/public-key\"],\n getRepoSecret: [\"GET /repos/{owner}/{repo}/actions/secrets/{secret_name}\"],\n getRepoVariable: [\"GET /repos/{owner}/{repo}/actions/variables/{name}\"],\n getReviewsForRun: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/approvals\"\n ],\n getSelfHostedRunnerForOrg: [\"GET /orgs/{org}/actions/runners/{runner_id}\"],\n getSelfHostedRunnerForRepo: [\n \"GET /repos/{owner}/{repo}/actions/runners/{runner_id}\"\n ],\n getWorkflow: [\"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}\"],\n getWorkflowAccessToRepository: [\n \"GET /repos/{owner}/{repo}/actions/permissions/access\"\n ],\n getWorkflowRun: [\"GET /repos/{owner}/{repo}/actions/runs/{run_id}\"],\n getWorkflowRunAttempt: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}\"\n ],\n getWorkflowRunUsage: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/timing\"\n ],\n getWorkflowUsage: [\n \"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/timing\"\n ],\n listArtifactsForRepo: [\"GET /repos/{owner}/{repo}/actions/artifacts\"],\n listEnvironmentSecrets: [\n \"GET /repositories/{repository_id}/environments/{environment_name}/secrets\"\n ],\n listEnvironmentVariables: [\n \"GET /repositories/{repository_id}/environments/{environment_name}/variables\"\n ],\n listJobsForWorkflowRun: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/jobs\"\n ],\n listJobsForWorkflowRunAttempt: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/attempts/{attempt_number}/jobs\"\n ],\n listLabelsForSelfHostedRunnerForOrg: [\n \"GET /orgs/{org}/actions/runners/{runner_id}/labels\"\n ],\n listLabelsForSelfHostedRunnerForRepo: [\n \"GET /repos/{owner}/{repo}/actions/runners/{runner_id}/labels\"\n ],\n listOrgSecrets: [\"GET /orgs/{org}/actions/secrets\"],\n listOrgVariables: [\"GET /orgs/{org}/actions/variables\"],\n listRepoOrganizationSecrets: [\n \"GET /repos/{owner}/{repo}/actions/organization-secrets\"\n ],\n listRepoOrganizationVariables: [\n \"GET /repos/{owner}/{repo}/actions/organization-variables\"\n ],\n listRepoSecrets: [\"GET /repos/{owner}/{repo}/actions/secrets\"],\n listRepoVariables: [\"GET /repos/{owner}/{repo}/actions/variables\"],\n listRepoWorkflows: [\"GET /repos/{owner}/{repo}/actions/workflows\"],\n listRunnerApplicationsForOrg: [\"GET /orgs/{org}/actions/runners/downloads\"],\n listRunnerApplicationsForRepo: [\n \"GET /repos/{owner}/{repo}/actions/runners/downloads\"\n ],\n listSelectedReposForOrgSecret: [\n \"GET /orgs/{org}/actions/secrets/{secret_name}/repositories\"\n ],\n listSelectedReposForOrgVariable: [\n \"GET /orgs/{org}/actions/variables/{name}/repositories\"\n ],\n listSelectedRepositoriesEnabledGithubActionsOrganization: [\n \"GET /orgs/{org}/actions/permissions/repositories\"\n ],\n listSelfHostedRunnersForOrg: [\"GET /orgs/{org}/actions/runners\"],\n listSelfHostedRunnersForRepo: [\"GET /repos/{owner}/{repo}/actions/runners\"],\n listWorkflowRunArtifacts: [\n \"GET /repos/{owner}/{repo}/actions/runs/{run_id}/artifacts\"\n ],\n listWorkflowRuns: [\n \"GET /repos/{owner}/{repo}/actions/workflows/{workflow_id}/runs\"\n ],\n listWorkflowRunsForRepo: [\"GET /repos/{owner}/{repo}/actions/runs\"],\n reRunJobForWorkflowRun: [\n \"POST /repos/{owner}/{repo}/actions/jobs/{job_id}/rerun\"\n ],\n reRunWorkflow: [\"POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun\"],\n reRunWorkflowFailedJobs: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/rerun-failed-jobs\"\n ],\n removeAllCustomLabelsFromSelfHostedRunnerForOrg: [\n \"DELETE /orgs/{org}/actions/runners/{runner_id}/labels\"\n ],\n removeAllCustomLabelsFromSelfHostedRunnerForRepo: [\n \"DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels\"\n ],\n removeCustomLabelFromSelfHostedRunnerForOrg: [\n \"DELETE /orgs/{org}/actions/runners/{runner_id}/labels/{name}\"\n ],\n removeCustomLabelFromSelfHostedRunnerForRepo: [\n \"DELETE /repos/{owner}/{repo}/actions/runners/{runner_id}/labels/{name}\"\n ],\n removeSelectedRepoFromOrgSecret: [\n \"DELETE /orgs/{org}/actions/secrets/{secret_name}/repositories/{repository_id}\"\n ],\n removeSelectedRepoFromOrgVariable: [\n \"DELETE /orgs/{org}/actions/variables/{name}/repositories/{repository_id}\"\n ],\n reviewCustomGatesForRun: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/deployment_protection_rule\"\n ],\n reviewPendingDeploymentsForRun: [\n \"POST /repos/{owner}/{repo}/actions/runs/{run_id}/pending_deployments\"\n ],\n setAllowedActionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions/selected-actions\"\n ],\n setAllowedActionsRepository: [\n \"PUT /repos/{owner}/{repo}/actions/permissions/selected-actions\"\n ],\n setCustomLabelsForSelfHostedRunnerForOrg: [\n \"PUT /orgs/{org}/actions/runners/{runner_id}/labels\"\n ],\n setCustomLabelsForSelfHostedRunnerForRepo: [\n \"PUT /repos/{owner}/{repo}/actions/runners/{runner_id}/labels\"\n ],\n setCustomOidcSubClaimForRepo: [\n \"PUT /repos/{owner}/{repo}/actions/oidc/customization/sub\"\n ],\n setGithubActionsDefaultWorkflowPermissionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions/workflow\"\n ],\n setGithubActionsDefaultWorkflowPermissionsRepository: [\n \"PUT /repos/{owner}/{repo}/actions/permissions/workflow\"\n ],\n setGithubActionsPermissionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions\"\n ],\n setGithubActionsPermissionsRepository: [\n \"PUT /repos/{owner}/{repo}/actions/permissions\"\n ],\n setSelectedReposForOrgSecret: [\n \"PUT /orgs/{org}/actions/secrets/{secret_name}/repositories\"\n ],\n setSelectedReposForOrgVariable: [\n \"PUT /orgs/{org}/actions/variables/{name}/repositories\"\n ],\n setSelectedRepositoriesEnabledGithubActionsOrganization: [\n \"PUT /orgs/{org}/actions/permissions/repositories\"\n ],\n setWorkflowAccessToRepository: [\n \"PUT /repos/{owner}/{repo}/actions/permissions/access\"\n ],\n updateEnvironmentVariable: [\n \"PATCH /repositories/{repository_id}/environments/{environment_name}/variables/{name}\"\n ],\n updateOrgVariable: [\"PATCH /orgs/{org}/actions/variables/{name}\"],\n updateRepoVariable: [\n \"PATCH /repos/{owner}/{repo}/actions/variables/{name}\"\n ]\n },\n activity: {\n checkRepoIsStarredByAuthenticatedUser: [\"GET /user/starred/{owner}/{repo}\"],\n deleteRepoSubscription: [\"DELETE /repos/{owner}/{repo}/subscription\"],\n deleteThreadSubscription: [\n \"DELETE /notifications/threads/{thread_id}/subscription\"\n ],\n getFeeds: [\"GET /feeds\"],\n getRepoSubscription: [\"GET /repos/{owner}/{repo}/subscription\"],\n getThread: [\"GET /notifications/threads/{thread_id}\"],\n getThreadSubscriptionForAuthenticatedUser: [\n \"GET /notifications/threads/{thread_id}/subscription\"\n ],\n listEventsForAuthenticatedUser: [\"GET /users/{username}/events\"],\n listNotificationsForAuthenticatedUser: [\"GET /notifications\"],\n listOrgEventsForAuthenticatedUser: [\n \"GET /users/{username}/events/orgs/{org}\"\n ],\n listPublicEvents: [\"GET /events\"],\n listPublicEventsForRepoNetwork: [\"GET /networks/{owner}/{repo}/events\"],\n listPublicEventsForUser: [\"GET /users/{username}/events/public\"],\n listPublicOrgEvents: [\"GET /orgs/{org}/events\"],\n listReceivedEventsForUser: [\"GET /users/{username}/received_events\"],\n listReceivedPublicEventsForUser: [\n \"GET /users/{username}/received_events/public\"\n ],\n listRepoEvents: [\"GET /repos/{owner}/{repo}/events\"],\n listRepoNotificationsForAuthenticatedUser: [\n \"GET /repos/{owner}/{repo}/notifications\"\n ],\n listReposStarredByAuthenticatedUser: [\"GET /user/starred\"],\n listReposStarredByUser: [\"GET /users/{username}/starred\"],\n listReposWatchedByUser: [\"GET /users/{username}/subscriptions\"],\n listStargazersForRepo: [\"GET /repos/{owner}/{repo}/stargazers\"],\n listWatchedReposForAuthenticatedUser: [\"GET /user/subscriptions\"],\n listWatchersForRepo: [\"GET /repos/{owner}/{repo}/subscribers\"],\n markNotificationsAsRead: [\"PUT /notifications\"],\n markRepoNotificationsAsRead: [\"PUT /repos/{owner}/{repo}/notifications\"],\n markThreadAsDone: [\"DELETE /notifications/threads/{thread_id}\"],\n markThreadAsRead: [\"PATCH /notifications/threads/{thread_id}\"],\n setRepoSubscription: [\"PUT /repos/{owner}/{repo}/subscription\"],\n setThreadSubscription: [\n \"PUT /notifications/threads/{thread_id}/subscription\"\n ],\n starRepoForAuthenticatedUser: [\"PUT /user/starred/{owner}/{repo}\"],\n unstarRepoForAuthenticatedUser: [\"DELETE /user/starred/{owner}/{repo}\"]\n },\n apps: {\n addRepoToInstallation: [\n \"PUT /user/installations/{installation_id}/repositories/{repository_id}\",\n {},\n { renamed: [\"apps\", \"addRepoToInstallationForAuthenticatedUser\"] }\n ],\n addRepoToInstallationForAuthenticatedUser: [\n \"PUT /user/installations/{installation_id}/repositories/{repository_id}\"\n ],\n checkToken: [\"POST /applications/{client_id}/token\"],\n createFromManifest: [\"POST /app-manifests/{code}/conversions\"],\n createInstallationAccessToken: [\n \"POST /app/installations/{installation_id}/access_tokens\"\n ],\n deleteAuthorization: [\"DELETE /applications/{client_id}/grant\"],\n deleteInstallation: [\"DELETE /app/installations/{installation_id}\"],\n deleteToken: [\"DELETE /applications/{client_id}/token\"],\n getAuthenticated: [\"GET /app\"],\n getBySlug: [\"GET /apps/{app_slug}\"],\n getInstallation: [\"GET /app/installations/{installation_id}\"],\n getOrgInstallation: [\"GET /orgs/{org}/installation\"],\n getRepoInstallation: [\"GET /repos/{owner}/{repo}/installation\"],\n getSubscriptionPlanForAccount: [\n \"GET /marketplace_listing/accounts/{account_id}\"\n ],\n getSubscriptionPlanForAccountStubbed: [\n \"GET /marketplace_listing/stubbed/accounts/{account_id}\"\n ],\n getUserInstallation: [\"GET /users/{username}/installation\"],\n getWebhookConfigForApp: [\"GET /app/hook/config\"],\n getWebhookDelivery: [\"GET /app/hook/deliveries/{delivery_id}\"],\n listAccountsForPlan: [\"GET /marketplace_listing/plans/{plan_id}/accounts\"],\n listAccountsForPlanStubbed: [\n \"GET /marketplace_listing/stubbed/plans/{plan_id}/accounts\"\n ],\n listInstallationReposForAuthenticatedUser: [\n \"GET /user/installations/{installation_id}/repositories\"\n ],\n listInstallationRequestsForAuthenticatedApp: [\n \"GET /app/installation-requests\"\n ],\n listInstallations: [\"GET /app/installations\"],\n listInstallationsForAuthenticatedUser: [\"GET /user/installations\"],\n listPlans: [\"GET /marketplace_listing/plans\"],\n listPlansStubbed: [\"GET /marketplace_listing/stubbed/plans\"],\n listReposAccessibleToInstallation: [\"GET /installation/repositories\"],\n listSubscriptionsForAuthenticatedUser: [\"GET /user/marketplace_purchases\"],\n listSubscriptionsForAuthenticatedUserStubbed: [\n \"GET /user/marketplace_purchases/stubbed\"\n ],\n listWebhookDeliveries: [\"GET /app/hook/deliveries\"],\n redeliverWebhookDelivery: [\n \"POST /app/hook/deliveries/{delivery_id}/attempts\"\n ],\n removeRepoFromInstallation: [\n \"DELETE /user/installations/{installation_id}/repositories/{repository_id}\",\n {},\n { renamed: [\"apps\", \"removeRepoFromInstallationForAuthenticatedUser\"] }\n ],\n removeRepoFromInstallationForAuthenticatedUser: [\n \"DELETE /user/installations/{installation_id}/repositories/{repository_id}\"\n ],\n resetToken: [\"PATCH /applications/{client_id}/token\"],\n revokeInstallationAccessToken: [\"DELETE /installation/token\"],\n scopeToken: [\"POST /applications/{client_id}/token/scoped\"],\n suspendInstallation: [\"PUT /app/installations/{installation_id}/suspended\"],\n unsuspendInstallation: [\n \"DELETE /app/installations/{installation_id}/suspended\"\n ],\n updateWebhookConfigForApp: [\"PATCH /app/hook/config\"]\n },\n billing: {\n getGithubActionsBillingOrg: [\"GET /orgs/{org}/settings/billing/actions\"],\n getGithubActionsBillingUser: [\n \"GET /users/{username}/settings/billing/actions\"\n ],\n getGithubPackagesBillingOrg: [\"GET /orgs/{org}/settings/billing/packages\"],\n getGithubPackagesBillingUser: [\n \"GET /users/{username}/settings/billing/packages\"\n ],\n getSharedStorageBillingOrg: [\n \"GET /orgs/{org}/settings/billing/shared-storage\"\n ],\n getSharedStorageBillingUser: [\n \"GET /users/{username}/settings/billing/shared-storage\"\n ]\n },\n checks: {\n create: [\"POST /repos/{owner}/{repo}/check-runs\"],\n createSuite: [\"POST /repos/{owner}/{repo}/check-suites\"],\n get: [\"GET /repos/{owner}/{repo}/check-runs/{check_run_id}\"],\n getSuite: [\"GET /repos/{owner}/{repo}/check-suites/{check_suite_id}\"],\n listAnnotations: [\n \"GET /repos/{owner}/{repo}/check-runs/{check_run_id}/annotations\"\n ],\n listForRef: [\"GET /repos/{owner}/{repo}/commits/{ref}/check-runs\"],\n listForSuite: [\n \"GET /repos/{owner}/{repo}/check-suites/{check_suite_id}/check-runs\"\n ],\n listSuitesForRef: [\"GET /repos/{owner}/{repo}/commits/{ref}/check-suites\"],\n rerequestRun: [\n \"POST /repos/{owner}/{repo}/check-runs/{check_run_id}/rerequest\"\n ],\n rerequestSuite: [\n \"POST /repos/{owner}/{repo}/check-suites/{check_suite_id}/rerequest\"\n ],\n setSuitesPreferences: [\n \"PATCH /repos/{owner}/{repo}/check-suites/preferences\"\n ],\n update: [\"PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}\"]\n },\n codeScanning: {\n deleteAnalysis: [\n \"DELETE /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}{?confirm_delete}\"\n ],\n getAlert: [\n \"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}\",\n {},\n { renamedParameters: { alert_id: \"alert_number\" } }\n ],\n getAnalysis: [\n \"GET /repos/{owner}/{repo}/code-scanning/analyses/{analysis_id}\"\n ],\n getCodeqlDatabase: [\n \"GET /repos/{owner}/{repo}/code-scanning/codeql/databases/{language}\"\n ],\n getDefaultSetup: [\"GET /repos/{owner}/{repo}/code-scanning/default-setup\"],\n getSarif: [\"GET /repos/{owner}/{repo}/code-scanning/sarifs/{sarif_id}\"],\n listAlertInstances: [\n \"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances\"\n ],\n listAlertsForOrg: [\"GET /orgs/{org}/code-scanning/alerts\"],\n listAlertsForRepo: [\"GET /repos/{owner}/{repo}/code-scanning/alerts\"],\n listAlertsInstances: [\n \"GET /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}/instances\",\n {},\n { renamed: [\"codeScanning\", \"listAlertInstances\"] }\n ],\n listCodeqlDatabases: [\n \"GET /repos/{owner}/{repo}/code-scanning/codeql/databases\"\n ],\n listRecentAnalyses: [\"GET /repos/{owner}/{repo}/code-scanning/analyses\"],\n updateAlert: [\n \"PATCH /repos/{owner}/{repo}/code-scanning/alerts/{alert_number}\"\n ],\n updateDefaultSetup: [\n \"PATCH /repos/{owner}/{repo}/code-scanning/default-setup\"\n ],\n uploadSarif: [\"POST /repos/{owner}/{repo}/code-scanning/sarifs\"]\n },\n codesOfConduct: {\n getAllCodesOfConduct: [\"GET /codes_of_conduct\"],\n getConductCode: [\"GET /codes_of_conduct/{key}\"]\n },\n codespaces: {\n addRepositoryForSecretForAuthenticatedUser: [\n \"PUT /user/codespaces/secrets/{secret_name}/repositories/{repository_id}\"\n ],\n addSelectedRepoToOrgSecret: [\n \"PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}\"\n ],\n checkPermissionsForDevcontainer: [\n \"GET /repos/{owner}/{repo}/codespaces/permissions_check\"\n ],\n codespaceMachinesForAuthenticatedUser: [\n \"GET /user/codespaces/{codespace_name}/machines\"\n ],\n createForAuthenticatedUser: [\"POST /user/codespaces\"],\n createOrUpdateOrgSecret: [\n \"PUT /orgs/{org}/codespaces/secrets/{secret_name}\"\n ],\n createOrUpdateRepoSecret: [\n \"PUT /repos/{owner}/{repo}/codespaces/secrets/{secret_name}\"\n ],\n createOrUpdateSecretForAuthenticatedUser: [\n \"PUT /user/codespaces/secrets/{secret_name}\"\n ],\n createWithPrForAuthenticatedUser: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/codespaces\"\n ],\n createWithRepoForAuthenticatedUser: [\n \"POST /repos/{owner}/{repo}/codespaces\"\n ],\n deleteForAuthenticatedUser: [\"DELETE /user/codespaces/{codespace_name}\"],\n deleteFromOrganization: [\n \"DELETE /orgs/{org}/members/{username}/codespaces/{codespace_name}\"\n ],\n deleteOrgSecret: [\"DELETE /orgs/{org}/codespaces/secrets/{secret_name}\"],\n deleteRepoSecret: [\n \"DELETE /repos/{owner}/{repo}/codespaces/secrets/{secret_name}\"\n ],\n deleteSecretForAuthenticatedUser: [\n \"DELETE /user/codespaces/secrets/{secret_name}\"\n ],\n exportForAuthenticatedUser: [\n \"POST /user/codespaces/{codespace_name}/exports\"\n ],\n getCodespacesForUserInOrg: [\n \"GET /orgs/{org}/members/{username}/codespaces\"\n ],\n getExportDetailsForAuthenticatedUser: [\n \"GET /user/codespaces/{codespace_name}/exports/{export_id}\"\n ],\n getForAuthenticatedUser: [\"GET /user/codespaces/{codespace_name}\"],\n getOrgPublicKey: [\"GET /orgs/{org}/codespaces/secrets/public-key\"],\n getOrgSecret: [\"GET /orgs/{org}/codespaces/secrets/{secret_name}\"],\n getPublicKeyForAuthenticatedUser: [\n \"GET /user/codespaces/secrets/public-key\"\n ],\n getRepoPublicKey: [\n \"GET /repos/{owner}/{repo}/codespaces/secrets/public-key\"\n ],\n getRepoSecret: [\n \"GET /repos/{owner}/{repo}/codespaces/secrets/{secret_name}\"\n ],\n getSecretForAuthenticatedUser: [\n \"GET /user/codespaces/secrets/{secret_name}\"\n ],\n listDevcontainersInRepositoryForAuthenticatedUser: [\n \"GET /repos/{owner}/{repo}/codespaces/devcontainers\"\n ],\n listForAuthenticatedUser: [\"GET /user/codespaces\"],\n listInOrganization: [\n \"GET /orgs/{org}/codespaces\",\n {},\n { renamedParameters: { org_id: \"org\" } }\n ],\n listInRepositoryForAuthenticatedUser: [\n \"GET /repos/{owner}/{repo}/codespaces\"\n ],\n listOrgSecrets: [\"GET /orgs/{org}/codespaces/secrets\"],\n listRepoSecrets: [\"GET /repos/{owner}/{repo}/codespaces/secrets\"],\n listRepositoriesForSecretForAuthenticatedUser: [\n \"GET /user/codespaces/secrets/{secret_name}/repositories\"\n ],\n listSecretsForAuthenticatedUser: [\"GET /user/codespaces/secrets\"],\n listSelectedReposForOrgSecret: [\n \"GET /orgs/{org}/codespaces/secrets/{secret_name}/repositories\"\n ],\n preFlightWithRepoForAuthenticatedUser: [\n \"GET /repos/{owner}/{repo}/codespaces/new\"\n ],\n publishForAuthenticatedUser: [\n \"POST /user/codespaces/{codespace_name}/publish\"\n ],\n removeRepositoryForSecretForAuthenticatedUser: [\n \"DELETE /user/codespaces/secrets/{secret_name}/repositories/{repository_id}\"\n ],\n removeSelectedRepoFromOrgSecret: [\n \"DELETE /orgs/{org}/codespaces/secrets/{secret_name}/repositories/{repository_id}\"\n ],\n repoMachinesForAuthenticatedUser: [\n \"GET /repos/{owner}/{repo}/codespaces/machines\"\n ],\n setRepositoriesForSecretForAuthenticatedUser: [\n \"PUT /user/codespaces/secrets/{secret_name}/repositories\"\n ],\n setSelectedReposForOrgSecret: [\n \"PUT /orgs/{org}/codespaces/secrets/{secret_name}/repositories\"\n ],\n startForAuthenticatedUser: [\"POST /user/codespaces/{codespace_name}/start\"],\n stopForAuthenticatedUser: [\"POST /user/codespaces/{codespace_name}/stop\"],\n stopInOrganization: [\n \"POST /orgs/{org}/members/{username}/codespaces/{codespace_name}/stop\"\n ],\n updateForAuthenticatedUser: [\"PATCH /user/codespaces/{codespace_name}\"]\n },\n copilot: {\n addCopilotSeatsForTeams: [\n \"POST /orgs/{org}/copilot/billing/selected_teams\"\n ],\n addCopilotSeatsForUsers: [\n \"POST /orgs/{org}/copilot/billing/selected_users\"\n ],\n cancelCopilotSeatAssignmentForTeams: [\n \"DELETE /orgs/{org}/copilot/billing/selected_teams\"\n ],\n cancelCopilotSeatAssignmentForUsers: [\n \"DELETE /orgs/{org}/copilot/billing/selected_users\"\n ],\n getCopilotOrganizationDetails: [\"GET /orgs/{org}/copilot/billing\"],\n getCopilotSeatDetailsForUser: [\n \"GET /orgs/{org}/members/{username}/copilot\"\n ],\n listCopilotSeats: [\"GET /orgs/{org}/copilot/billing/seats\"]\n },\n dependabot: {\n addSelectedRepoToOrgSecret: [\n \"PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}\"\n ],\n createOrUpdateOrgSecret: [\n \"PUT /orgs/{org}/dependabot/secrets/{secret_name}\"\n ],\n createOrUpdateRepoSecret: [\n \"PUT /repos/{owner}/{repo}/dependabot/secrets/{secret_name}\"\n ],\n deleteOrgSecret: [\"DELETE /orgs/{org}/dependabot/secrets/{secret_name}\"],\n deleteRepoSecret: [\n \"DELETE /repos/{owner}/{repo}/dependabot/secrets/{secret_name}\"\n ],\n getAlert: [\"GET /repos/{owner}/{repo}/dependabot/alerts/{alert_number}\"],\n getOrgPublicKey: [\"GET /orgs/{org}/dependabot/secrets/public-key\"],\n getOrgSecret: [\"GET /orgs/{org}/dependabot/secrets/{secret_name}\"],\n getRepoPublicKey: [\n \"GET /repos/{owner}/{repo}/dependabot/secrets/public-key\"\n ],\n getRepoSecret: [\n \"GET /repos/{owner}/{repo}/dependabot/secrets/{secret_name}\"\n ],\n listAlertsForEnterprise: [\n \"GET /enterprises/{enterprise}/dependabot/alerts\"\n ],\n listAlertsForOrg: [\"GET /orgs/{org}/dependabot/alerts\"],\n listAlertsForRepo: [\"GET /repos/{owner}/{repo}/dependabot/alerts\"],\n listOrgSecrets: [\"GET /orgs/{org}/dependabot/secrets\"],\n listRepoSecrets: [\"GET /repos/{owner}/{repo}/dependabot/secrets\"],\n listSelectedReposForOrgSecret: [\n \"GET /orgs/{org}/dependabot/secrets/{secret_name}/repositories\"\n ],\n removeSelectedRepoFromOrgSecret: [\n \"DELETE /orgs/{org}/dependabot/secrets/{secret_name}/repositories/{repository_id}\"\n ],\n setSelectedReposForOrgSecret: [\n \"PUT /orgs/{org}/dependabot/secrets/{secret_name}/repositories\"\n ],\n updateAlert: [\n \"PATCH /repos/{owner}/{repo}/dependabot/alerts/{alert_number}\"\n ]\n },\n dependencyGraph: {\n createRepositorySnapshot: [\n \"POST /repos/{owner}/{repo}/dependency-graph/snapshots\"\n ],\n diffRange: [\n \"GET /repos/{owner}/{repo}/dependency-graph/compare/{basehead}\"\n ],\n exportSbom: [\"GET /repos/{owner}/{repo}/dependency-graph/sbom\"]\n },\n emojis: { get: [\"GET /emojis\"] },\n gists: {\n checkIsStarred: [\"GET /gists/{gist_id}/star\"],\n create: [\"POST /gists\"],\n createComment: [\"POST /gists/{gist_id}/comments\"],\n delete: [\"DELETE /gists/{gist_id}\"],\n deleteComment: [\"DELETE /gists/{gist_id}/comments/{comment_id}\"],\n fork: [\"POST /gists/{gist_id}/forks\"],\n get: [\"GET /gists/{gist_id}\"],\n getComment: [\"GET /gists/{gist_id}/comments/{comment_id}\"],\n getRevision: [\"GET /gists/{gist_id}/{sha}\"],\n list: [\"GET /gists\"],\n listComments: [\"GET /gists/{gist_id}/comments\"],\n listCommits: [\"GET /gists/{gist_id}/commits\"],\n listForUser: [\"GET /users/{username}/gists\"],\n listForks: [\"GET /gists/{gist_id}/forks\"],\n listPublic: [\"GET /gists/public\"],\n listStarred: [\"GET /gists/starred\"],\n star: [\"PUT /gists/{gist_id}/star\"],\n unstar: [\"DELETE /gists/{gist_id}/star\"],\n update: [\"PATCH /gists/{gist_id}\"],\n updateComment: [\"PATCH /gists/{gist_id}/comments/{comment_id}\"]\n },\n git: {\n createBlob: [\"POST /repos/{owner}/{repo}/git/blobs\"],\n createCommit: [\"POST /repos/{owner}/{repo}/git/commits\"],\n createRef: [\"POST /repos/{owner}/{repo}/git/refs\"],\n createTag: [\"POST /repos/{owner}/{repo}/git/tags\"],\n createTree: [\"POST /repos/{owner}/{repo}/git/trees\"],\n deleteRef: [\"DELETE /repos/{owner}/{repo}/git/refs/{ref}\"],\n getBlob: [\"GET /repos/{owner}/{repo}/git/blobs/{file_sha}\"],\n getCommit: [\"GET /repos/{owner}/{repo}/git/commits/{commit_sha}\"],\n getRef: [\"GET /repos/{owner}/{repo}/git/ref/{ref}\"],\n getTag: [\"GET /repos/{owner}/{repo}/git/tags/{tag_sha}\"],\n getTree: [\"GET /repos/{owner}/{repo}/git/trees/{tree_sha}\"],\n listMatchingRefs: [\"GET /repos/{owner}/{repo}/git/matching-refs/{ref}\"],\n updateRef: [\"PATCH /repos/{owner}/{repo}/git/refs/{ref}\"]\n },\n gitignore: {\n getAllTemplates: [\"GET /gitignore/templates\"],\n getTemplate: [\"GET /gitignore/templates/{name}\"]\n },\n interactions: {\n getRestrictionsForAuthenticatedUser: [\"GET /user/interaction-limits\"],\n getRestrictionsForOrg: [\"GET /orgs/{org}/interaction-limits\"],\n getRestrictionsForRepo: [\"GET /repos/{owner}/{repo}/interaction-limits\"],\n getRestrictionsForYourPublicRepos: [\n \"GET /user/interaction-limits\",\n {},\n { renamed: [\"interactions\", \"getRestrictionsForAuthenticatedUser\"] }\n ],\n removeRestrictionsForAuthenticatedUser: [\"DELETE /user/interaction-limits\"],\n removeRestrictionsForOrg: [\"DELETE /orgs/{org}/interaction-limits\"],\n removeRestrictionsForRepo: [\n \"DELETE /repos/{owner}/{repo}/interaction-limits\"\n ],\n removeRestrictionsForYourPublicRepos: [\n \"DELETE /user/interaction-limits\",\n {},\n { renamed: [\"interactions\", \"removeRestrictionsForAuthenticatedUser\"] }\n ],\n setRestrictionsForAuthenticatedUser: [\"PUT /user/interaction-limits\"],\n setRestrictionsForOrg: [\"PUT /orgs/{org}/interaction-limits\"],\n setRestrictionsForRepo: [\"PUT /repos/{owner}/{repo}/interaction-limits\"],\n setRestrictionsForYourPublicRepos: [\n \"PUT /user/interaction-limits\",\n {},\n { renamed: [\"interactions\", \"setRestrictionsForAuthenticatedUser\"] }\n ]\n },\n issues: {\n addAssignees: [\n \"POST /repos/{owner}/{repo}/issues/{issue_number}/assignees\"\n ],\n addLabels: [\"POST /repos/{owner}/{repo}/issues/{issue_number}/labels\"],\n checkUserCanBeAssigned: [\"GET /repos/{owner}/{repo}/assignees/{assignee}\"],\n checkUserCanBeAssignedToIssue: [\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/assignees/{assignee}\"\n ],\n create: [\"POST /repos/{owner}/{repo}/issues\"],\n createComment: [\n \"POST /repos/{owner}/{repo}/issues/{issue_number}/comments\"\n ],\n createLabel: [\"POST /repos/{owner}/{repo}/labels\"],\n createMilestone: [\"POST /repos/{owner}/{repo}/milestones\"],\n deleteComment: [\n \"DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}\"\n ],\n deleteLabel: [\"DELETE /repos/{owner}/{repo}/labels/{name}\"],\n deleteMilestone: [\n \"DELETE /repos/{owner}/{repo}/milestones/{milestone_number}\"\n ],\n get: [\"GET /repos/{owner}/{repo}/issues/{issue_number}\"],\n getComment: [\"GET /repos/{owner}/{repo}/issues/comments/{comment_id}\"],\n getEvent: [\"GET /repos/{owner}/{repo}/issues/events/{event_id}\"],\n getLabel: [\"GET /repos/{owner}/{repo}/labels/{name}\"],\n getMilestone: [\"GET /repos/{owner}/{repo}/milestones/{milestone_number}\"],\n list: [\"GET /issues\"],\n listAssignees: [\"GET /repos/{owner}/{repo}/assignees\"],\n listComments: [\"GET /repos/{owner}/{repo}/issues/{issue_number}/comments\"],\n listCommentsForRepo: [\"GET /repos/{owner}/{repo}/issues/comments\"],\n listEvents: [\"GET /repos/{owner}/{repo}/issues/{issue_number}/events\"],\n listEventsForRepo: [\"GET /repos/{owner}/{repo}/issues/events\"],\n listEventsForTimeline: [\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/timeline\"\n ],\n listForAuthenticatedUser: [\"GET /user/issues\"],\n listForOrg: [\"GET /orgs/{org}/issues\"],\n listForRepo: [\"GET /repos/{owner}/{repo}/issues\"],\n listLabelsForMilestone: [\n \"GET /repos/{owner}/{repo}/milestones/{milestone_number}/labels\"\n ],\n listLabelsForRepo: [\"GET /repos/{owner}/{repo}/labels\"],\n listLabelsOnIssue: [\n \"GET /repos/{owner}/{repo}/issues/{issue_number}/labels\"\n ],\n listMilestones: [\"GET /repos/{owner}/{repo}/milestones\"],\n lock: [\"PUT /repos/{owner}/{repo}/issues/{issue_number}/lock\"],\n removeAllLabels: [\n \"DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels\"\n ],\n removeAssignees: [\n \"DELETE /repos/{owner}/{repo}/issues/{issue_number}/assignees\"\n ],\n removeLabel: [\n \"DELETE /repos/{owner}/{repo}/issues/{issue_number}/labels/{name}\"\n ],\n setLabels: [\"PUT /repos/{owner}/{repo}/issues/{issue_number}/labels\"],\n unlock: [\"DELETE /repos/{owner}/{repo}/issues/{issue_number}/lock\"],\n update: [\"PATCH /repos/{owner}/{repo}/issues/{issue_number}\"],\n updateComment: [\"PATCH /repos/{owner}/{repo}/issues/comments/{comment_id}\"],\n updateLabel: [\"PATCH /repos/{owner}/{repo}/labels/{name}\"],\n updateMilestone: [\n \"PATCH /repos/{owner}/{repo}/milestones/{milestone_number}\"\n ]\n },\n licenses: {\n get: [\"GET /licenses/{license}\"],\n getAllCommonlyUsed: [\"GET /licenses\"],\n getForRepo: [\"GET /repos/{owner}/{repo}/license\"]\n },\n markdown: {\n render: [\"POST /markdown\"],\n renderRaw: [\n \"POST /markdown/raw\",\n { headers: { \"content-type\": \"text/plain; charset=utf-8\" } }\n ]\n },\n meta: {\n get: [\"GET /meta\"],\n getAllVersions: [\"GET /versions\"],\n getOctocat: [\"GET /octocat\"],\n getZen: [\"GET /zen\"],\n root: [\"GET /\"]\n },\n migrations: {\n cancelImport: [\n \"DELETE /repos/{owner}/{repo}/import\",\n {},\n {\n deprecated: \"octokit.rest.migrations.cancelImport() is deprecated, see https://docs.github.com/rest/migrations/source-imports#cancel-an-import\"\n }\n ],\n deleteArchiveForAuthenticatedUser: [\n \"DELETE /user/migrations/{migration_id}/archive\"\n ],\n deleteArchiveForOrg: [\n \"DELETE /orgs/{org}/migrations/{migration_id}/archive\"\n ],\n downloadArchiveForOrg: [\n \"GET /orgs/{org}/migrations/{migration_id}/archive\"\n ],\n getArchiveForAuthenticatedUser: [\n \"GET /user/migrations/{migration_id}/archive\"\n ],\n getCommitAuthors: [\n \"GET /repos/{owner}/{repo}/import/authors\",\n {},\n {\n deprecated: \"octokit.rest.migrations.getCommitAuthors() is deprecated, see https://docs.github.com/rest/migrations/source-imports#get-commit-authors\"\n }\n ],\n getImportStatus: [\n \"GET /repos/{owner}/{repo}/import\",\n {},\n {\n deprecated: \"octokit.rest.migrations.getImportStatus() is deprecated, see https://docs.github.com/rest/migrations/source-imports#get-an-import-status\"\n }\n ],\n getLargeFiles: [\n \"GET /repos/{owner}/{repo}/import/large_files\",\n {},\n {\n deprecated: \"octokit.rest.migrations.getLargeFiles() is deprecated, see https://docs.github.com/rest/migrations/source-imports#get-large-files\"\n }\n ],\n getStatusForAuthenticatedUser: [\"GET /user/migrations/{migration_id}\"],\n getStatusForOrg: [\"GET /orgs/{org}/migrations/{migration_id}\"],\n listForAuthenticatedUser: [\"GET /user/migrations\"],\n listForOrg: [\"GET /orgs/{org}/migrations\"],\n listReposForAuthenticatedUser: [\n \"GET /user/migrations/{migration_id}/repositories\"\n ],\n listReposForOrg: [\"GET /orgs/{org}/migrations/{migration_id}/repositories\"],\n listReposForUser: [\n \"GET /user/migrations/{migration_id}/repositories\",\n {},\n { renamed: [\"migrations\", \"listReposForAuthenticatedUser\"] }\n ],\n mapCommitAuthor: [\n \"PATCH /repos/{owner}/{repo}/import/authors/{author_id}\",\n {},\n {\n deprecated: \"octokit.rest.migrations.mapCommitAuthor() is deprecated, see https://docs.github.com/rest/migrations/source-imports#map-a-commit-author\"\n }\n ],\n setLfsPreference: [\n \"PATCH /repos/{owner}/{repo}/import/lfs\",\n {},\n {\n deprecated: \"octokit.rest.migrations.setLfsPreference() is deprecated, see https://docs.github.com/rest/migrations/source-imports#update-git-lfs-preference\"\n }\n ],\n startForAuthenticatedUser: [\"POST /user/migrations\"],\n startForOrg: [\"POST /orgs/{org}/migrations\"],\n startImport: [\n \"PUT /repos/{owner}/{repo}/import\",\n {},\n {\n deprecated: \"octokit.rest.migrations.startImport() is deprecated, see https://docs.github.com/rest/migrations/source-imports#start-an-import\"\n }\n ],\n unlockRepoForAuthenticatedUser: [\n \"DELETE /user/migrations/{migration_id}/repos/{repo_name}/lock\"\n ],\n unlockRepoForOrg: [\n \"DELETE /orgs/{org}/migrations/{migration_id}/repos/{repo_name}/lock\"\n ],\n updateImport: [\n \"PATCH /repos/{owner}/{repo}/import\",\n {},\n {\n deprecated: \"octokit.rest.migrations.updateImport() is deprecated, see https://docs.github.com/rest/migrations/source-imports#update-an-import\"\n }\n ]\n },\n oidc: {\n getOidcCustomSubTemplateForOrg: [\n \"GET /orgs/{org}/actions/oidc/customization/sub\"\n ],\n updateOidcCustomSubTemplateForOrg: [\n \"PUT /orgs/{org}/actions/oidc/customization/sub\"\n ]\n },\n orgs: {\n addSecurityManagerTeam: [\n \"PUT /orgs/{org}/security-managers/teams/{team_slug}\"\n ],\n assignTeamToOrgRole: [\n \"PUT /orgs/{org}/organization-roles/teams/{team_slug}/{role_id}\"\n ],\n assignUserToOrgRole: [\n \"PUT /orgs/{org}/organization-roles/users/{username}/{role_id}\"\n ],\n blockUser: [\"PUT /orgs/{org}/blocks/{username}\"],\n cancelInvitation: [\"DELETE /orgs/{org}/invitations/{invitation_id}\"],\n checkBlockedUser: [\"GET /orgs/{org}/blocks/{username}\"],\n checkMembershipForUser: [\"GET /orgs/{org}/members/{username}\"],\n checkPublicMembershipForUser: [\"GET /orgs/{org}/public_members/{username}\"],\n convertMemberToOutsideCollaborator: [\n \"PUT /orgs/{org}/outside_collaborators/{username}\"\n ],\n createCustomOrganizationRole: [\"POST /orgs/{org}/organization-roles\"],\n createInvitation: [\"POST /orgs/{org}/invitations\"],\n createOrUpdateCustomProperties: [\"PATCH /orgs/{org}/properties/schema\"],\n createOrUpdateCustomPropertiesValuesForRepos: [\n \"PATCH /orgs/{org}/properties/values\"\n ],\n createOrUpdateCustomProperty: [\n \"PUT /orgs/{org}/properties/schema/{custom_property_name}\"\n ],\n createWebhook: [\"POST /orgs/{org}/hooks\"],\n delete: [\"DELETE /orgs/{org}\"],\n deleteCustomOrganizationRole: [\n \"DELETE /orgs/{org}/organization-roles/{role_id}\"\n ],\n deleteWebhook: [\"DELETE /orgs/{org}/hooks/{hook_id}\"],\n enableOrDisableSecurityProductOnAllOrgRepos: [\n \"POST /orgs/{org}/{security_product}/{enablement}\"\n ],\n get: [\"GET /orgs/{org}\"],\n getAllCustomProperties: [\"GET /orgs/{org}/properties/schema\"],\n getCustomProperty: [\n \"GET /orgs/{org}/properties/schema/{custom_property_name}\"\n ],\n getMembershipForAuthenticatedUser: [\"GET /user/memberships/orgs/{org}\"],\n getMembershipForUser: [\"GET /orgs/{org}/memberships/{username}\"],\n getOrgRole: [\"GET /orgs/{org}/organization-roles/{role_id}\"],\n getWebhook: [\"GET /orgs/{org}/hooks/{hook_id}\"],\n getWebhookConfigForOrg: [\"GET /orgs/{org}/hooks/{hook_id}/config\"],\n getWebhookDelivery: [\n \"GET /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}\"\n ],\n list: [\"GET /organizations\"],\n listAppInstallations: [\"GET /orgs/{org}/installations\"],\n listBlockedUsers: [\"GET /orgs/{org}/blocks\"],\n listCustomPropertiesValuesForRepos: [\"GET /orgs/{org}/properties/values\"],\n listFailedInvitations: [\"GET /orgs/{org}/failed_invitations\"],\n listForAuthenticatedUser: [\"GET /user/orgs\"],\n listForUser: [\"GET /users/{username}/orgs\"],\n listInvitationTeams: [\"GET /orgs/{org}/invitations/{invitation_id}/teams\"],\n listMembers: [\"GET /orgs/{org}/members\"],\n listMembershipsForAuthenticatedUser: [\"GET /user/memberships/orgs\"],\n listOrgRoleTeams: [\"GET /orgs/{org}/organization-roles/{role_id}/teams\"],\n listOrgRoleUsers: [\"GET /orgs/{org}/organization-roles/{role_id}/users\"],\n listOrgRoles: [\"GET /orgs/{org}/organization-roles\"],\n listOrganizationFineGrainedPermissions: [\n \"GET /orgs/{org}/organization-fine-grained-permissions\"\n ],\n listOutsideCollaborators: [\"GET /orgs/{org}/outside_collaborators\"],\n listPatGrantRepositories: [\n \"GET /orgs/{org}/personal-access-tokens/{pat_id}/repositories\"\n ],\n listPatGrantRequestRepositories: [\n \"GET /orgs/{org}/personal-access-token-requests/{pat_request_id}/repositories\"\n ],\n listPatGrantRequests: [\"GET /orgs/{org}/personal-access-token-requests\"],\n listPatGrants: [\"GET /orgs/{org}/personal-access-tokens\"],\n listPendingInvitations: [\"GET /orgs/{org}/invitations\"],\n listPublicMembers: [\"GET /orgs/{org}/public_members\"],\n listSecurityManagerTeams: [\"GET /orgs/{org}/security-managers\"],\n listWebhookDeliveries: [\"GET /orgs/{org}/hooks/{hook_id}/deliveries\"],\n listWebhooks: [\"GET /orgs/{org}/hooks\"],\n patchCustomOrganizationRole: [\n \"PATCH /orgs/{org}/organization-roles/{role_id}\"\n ],\n pingWebhook: [\"POST /orgs/{org}/hooks/{hook_id}/pings\"],\n redeliverWebhookDelivery: [\n \"POST /orgs/{org}/hooks/{hook_id}/deliveries/{delivery_id}/attempts\"\n ],\n removeCustomProperty: [\n \"DELETE /orgs/{org}/properties/schema/{custom_property_name}\"\n ],\n removeMember: [\"DELETE /orgs/{org}/members/{username}\"],\n removeMembershipForUser: [\"DELETE /orgs/{org}/memberships/{username}\"],\n removeOutsideCollaborator: [\n \"DELETE /orgs/{org}/outside_collaborators/{username}\"\n ],\n removePublicMembershipForAuthenticatedUser: [\n \"DELETE /orgs/{org}/public_members/{username}\"\n ],\n removeSecurityManagerTeam: [\n \"DELETE /orgs/{org}/security-managers/teams/{team_slug}\"\n ],\n reviewPatGrantRequest: [\n \"POST /orgs/{org}/personal-access-token-requests/{pat_request_id}\"\n ],\n reviewPatGrantRequestsInBulk: [\n \"POST /orgs/{org}/personal-access-token-requests\"\n ],\n revokeAllOrgRolesTeam: [\n \"DELETE /orgs/{org}/organization-roles/teams/{team_slug}\"\n ],\n revokeAllOrgRolesUser: [\n \"DELETE /orgs/{org}/organization-roles/users/{username}\"\n ],\n revokeOrgRoleTeam: [\n \"DELETE /orgs/{org}/organization-roles/teams/{team_slug}/{role_id}\"\n ],\n revokeOrgRoleUser: [\n \"DELETE /orgs/{org}/organization-roles/users/{username}/{role_id}\"\n ],\n setMembershipForUser: [\"PUT /orgs/{org}/memberships/{username}\"],\n setPublicMembershipForAuthenticatedUser: [\n \"PUT /orgs/{org}/public_members/{username}\"\n ],\n unblockUser: [\"DELETE /orgs/{org}/blocks/{username}\"],\n update: [\"PATCH /orgs/{org}\"],\n updateMembershipForAuthenticatedUser: [\n \"PATCH /user/memberships/orgs/{org}\"\n ],\n updatePatAccess: [\"POST /orgs/{org}/personal-access-tokens/{pat_id}\"],\n updatePatAccesses: [\"POST /orgs/{org}/personal-access-tokens\"],\n updateWebhook: [\"PATCH /orgs/{org}/hooks/{hook_id}\"],\n updateWebhookConfigForOrg: [\"PATCH /orgs/{org}/hooks/{hook_id}/config\"]\n },\n packages: {\n deletePackageForAuthenticatedUser: [\n \"DELETE /user/packages/{package_type}/{package_name}\"\n ],\n deletePackageForOrg: [\n \"DELETE /orgs/{org}/packages/{package_type}/{package_name}\"\n ],\n deletePackageForUser: [\n \"DELETE /users/{username}/packages/{package_type}/{package_name}\"\n ],\n deletePackageVersionForAuthenticatedUser: [\n \"DELETE /user/packages/{package_type}/{package_name}/versions/{package_version_id}\"\n ],\n deletePackageVersionForOrg: [\n \"DELETE /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}\"\n ],\n deletePackageVersionForUser: [\n \"DELETE /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}\"\n ],\n getAllPackageVersionsForAPackageOwnedByAnOrg: [\n \"GET /orgs/{org}/packages/{package_type}/{package_name}/versions\",\n {},\n { renamed: [\"packages\", \"getAllPackageVersionsForPackageOwnedByOrg\"] }\n ],\n getAllPackageVersionsForAPackageOwnedByTheAuthenticatedUser: [\n \"GET /user/packages/{package_type}/{package_name}/versions\",\n {},\n {\n renamed: [\n \"packages\",\n \"getAllPackageVersionsForPackageOwnedByAuthenticatedUser\"\n ]\n }\n ],\n getAllPackageVersionsForPackageOwnedByAuthenticatedUser: [\n \"GET /user/packages/{package_type}/{package_name}/versions\"\n ],\n getAllPackageVersionsForPackageOwnedByOrg: [\n \"GET /orgs/{org}/packages/{package_type}/{package_name}/versions\"\n ],\n getAllPackageVersionsForPackageOwnedByUser: [\n \"GET /users/{username}/packages/{package_type}/{package_name}/versions\"\n ],\n getPackageForAuthenticatedUser: [\n \"GET /user/packages/{package_type}/{package_name}\"\n ],\n getPackageForOrganization: [\n \"GET /orgs/{org}/packages/{package_type}/{package_name}\"\n ],\n getPackageForUser: [\n \"GET /users/{username}/packages/{package_type}/{package_name}\"\n ],\n getPackageVersionForAuthenticatedUser: [\n \"GET /user/packages/{package_type}/{package_name}/versions/{package_version_id}\"\n ],\n getPackageVersionForOrganization: [\n \"GET /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}\"\n ],\n getPackageVersionForUser: [\n \"GET /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}\"\n ],\n listDockerMigrationConflictingPackagesForAuthenticatedUser: [\n \"GET /user/docker/conflicts\"\n ],\n listDockerMigrationConflictingPackagesForOrganization: [\n \"GET /orgs/{org}/docker/conflicts\"\n ],\n listDockerMigrationConflictingPackagesForUser: [\n \"GET /users/{username}/docker/conflicts\"\n ],\n listPackagesForAuthenticatedUser: [\"GET /user/packages\"],\n listPackagesForOrganization: [\"GET /orgs/{org}/packages\"],\n listPackagesForUser: [\"GET /users/{username}/packages\"],\n restorePackageForAuthenticatedUser: [\n \"POST /user/packages/{package_type}/{package_name}/restore{?token}\"\n ],\n restorePackageForOrg: [\n \"POST /orgs/{org}/packages/{package_type}/{package_name}/restore{?token}\"\n ],\n restorePackageForUser: [\n \"POST /users/{username}/packages/{package_type}/{package_name}/restore{?token}\"\n ],\n restorePackageVersionForAuthenticatedUser: [\n \"POST /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore\"\n ],\n restorePackageVersionForOrg: [\n \"POST /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore\"\n ],\n restorePackageVersionForUser: [\n \"POST /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore\"\n ]\n },\n projects: {\n addCollaborator: [\"PUT /projects/{project_id}/collaborators/{username}\"],\n createCard: [\"POST /projects/columns/{column_id}/cards\"],\n createColumn: [\"POST /projects/{project_id}/columns\"],\n createForAuthenticatedUser: [\"POST /user/projects\"],\n createForOrg: [\"POST /orgs/{org}/projects\"],\n createForRepo: [\"POST /repos/{owner}/{repo}/projects\"],\n delete: [\"DELETE /projects/{project_id}\"],\n deleteCard: [\"DELETE /projects/columns/cards/{card_id}\"],\n deleteColumn: [\"DELETE /projects/columns/{column_id}\"],\n get: [\"GET /projects/{project_id}\"],\n getCard: [\"GET /projects/columns/cards/{card_id}\"],\n getColumn: [\"GET /projects/columns/{column_id}\"],\n getPermissionForUser: [\n \"GET /projects/{project_id}/collaborators/{username}/permission\"\n ],\n listCards: [\"GET /projects/columns/{column_id}/cards\"],\n listCollaborators: [\"GET /projects/{project_id}/collaborators\"],\n listColumns: [\"GET /projects/{project_id}/columns\"],\n listForOrg: [\"GET /orgs/{org}/projects\"],\n listForRepo: [\"GET /repos/{owner}/{repo}/projects\"],\n listForUser: [\"GET /users/{username}/projects\"],\n moveCard: [\"POST /projects/columns/cards/{card_id}/moves\"],\n moveColumn: [\"POST /projects/columns/{column_id}/moves\"],\n removeCollaborator: [\n \"DELETE /projects/{project_id}/collaborators/{username}\"\n ],\n update: [\"PATCH /projects/{project_id}\"],\n updateCard: [\"PATCH /projects/columns/cards/{card_id}\"],\n updateColumn: [\"PATCH /projects/columns/{column_id}\"]\n },\n pulls: {\n checkIfMerged: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/merge\"],\n create: [\"POST /repos/{owner}/{repo}/pulls\"],\n createReplyForReviewComment: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/comments/{comment_id}/replies\"\n ],\n createReview: [\"POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews\"],\n createReviewComment: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/comments\"\n ],\n deletePendingReview: [\n \"DELETE /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}\"\n ],\n deleteReviewComment: [\n \"DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}\"\n ],\n dismissReview: [\n \"PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/dismissals\"\n ],\n get: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}\"],\n getReview: [\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}\"\n ],\n getReviewComment: [\"GET /repos/{owner}/{repo}/pulls/comments/{comment_id}\"],\n list: [\"GET /repos/{owner}/{repo}/pulls\"],\n listCommentsForReview: [\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/comments\"\n ],\n listCommits: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/commits\"],\n listFiles: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/files\"],\n listRequestedReviewers: [\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers\"\n ],\n listReviewComments: [\n \"GET /repos/{owner}/{repo}/pulls/{pull_number}/comments\"\n ],\n listReviewCommentsForRepo: [\"GET /repos/{owner}/{repo}/pulls/comments\"],\n listReviews: [\"GET /repos/{owner}/{repo}/pulls/{pull_number}/reviews\"],\n merge: [\"PUT /repos/{owner}/{repo}/pulls/{pull_number}/merge\"],\n removeRequestedReviewers: [\n \"DELETE /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers\"\n ],\n requestReviewers: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/requested_reviewers\"\n ],\n submitReview: [\n \"POST /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}/events\"\n ],\n update: [\"PATCH /repos/{owner}/{repo}/pulls/{pull_number}\"],\n updateBranch: [\n \"PUT /repos/{owner}/{repo}/pulls/{pull_number}/update-branch\"\n ],\n updateReview: [\n \"PUT /repos/{owner}/{repo}/pulls/{pull_number}/reviews/{review_id}\"\n ],\n updateReviewComment: [\n \"PATCH /repos/{owner}/{repo}/pulls/comments/{comment_id}\"\n ]\n },\n rateLimit: { get: [\"GET /rate_limit\"] },\n reactions: {\n createForCommitComment: [\n \"POST /repos/{owner}/{repo}/comments/{comment_id}/reactions\"\n ],\n createForIssue: [\n \"POST /repos/{owner}/{repo}/issues/{issue_number}/reactions\"\n ],\n createForIssueComment: [\n \"POST /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions\"\n ],\n createForPullRequestReviewComment: [\n \"POST /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions\"\n ],\n createForRelease: [\n \"POST /repos/{owner}/{repo}/releases/{release_id}/reactions\"\n ],\n createForTeamDiscussionCommentInOrg: [\n \"POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions\"\n ],\n createForTeamDiscussionInOrg: [\n \"POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions\"\n ],\n deleteForCommitComment: [\n \"DELETE /repos/{owner}/{repo}/comments/{comment_id}/reactions/{reaction_id}\"\n ],\n deleteForIssue: [\n \"DELETE /repos/{owner}/{repo}/issues/{issue_number}/reactions/{reaction_id}\"\n ],\n deleteForIssueComment: [\n \"DELETE /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions/{reaction_id}\"\n ],\n deleteForPullRequestComment: [\n \"DELETE /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions/{reaction_id}\"\n ],\n deleteForRelease: [\n \"DELETE /repos/{owner}/{repo}/releases/{release_id}/reactions/{reaction_id}\"\n ],\n deleteForTeamDiscussion: [\n \"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions/{reaction_id}\"\n ],\n deleteForTeamDiscussionComment: [\n \"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions/{reaction_id}\"\n ],\n listForCommitComment: [\n \"GET /repos/{owner}/{repo}/comments/{comment_id}/reactions\"\n ],\n listForIssue: [\"GET /repos/{owner}/{repo}/issues/{issue_number}/reactions\"],\n listForIssueComment: [\n \"GET /repos/{owner}/{repo}/issues/comments/{comment_id}/reactions\"\n ],\n listForPullRequestReviewComment: [\n \"GET /repos/{owner}/{repo}/pulls/comments/{comment_id}/reactions\"\n ],\n listForRelease: [\n \"GET /repos/{owner}/{repo}/releases/{release_id}/reactions\"\n ],\n listForTeamDiscussionCommentInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}/reactions\"\n ],\n listForTeamDiscussionInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/reactions\"\n ]\n },\n repos: {\n acceptInvitation: [\n \"PATCH /user/repository_invitations/{invitation_id}\",\n {},\n { renamed: [\"repos\", \"acceptInvitationForAuthenticatedUser\"] }\n ],\n acceptInvitationForAuthenticatedUser: [\n \"PATCH /user/repository_invitations/{invitation_id}\"\n ],\n addAppAccessRestrictions: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps\",\n {},\n { mapToData: \"apps\" }\n ],\n addCollaborator: [\"PUT /repos/{owner}/{repo}/collaborators/{username}\"],\n addStatusCheckContexts: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts\",\n {},\n { mapToData: \"contexts\" }\n ],\n addTeamAccessRestrictions: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams\",\n {},\n { mapToData: \"teams\" }\n ],\n addUserAccessRestrictions: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users\",\n {},\n { mapToData: \"users\" }\n ],\n cancelPagesDeployment: [\n \"POST /repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}/cancel\"\n ],\n checkAutomatedSecurityFixes: [\n \"GET /repos/{owner}/{repo}/automated-security-fixes\"\n ],\n checkCollaborator: [\"GET /repos/{owner}/{repo}/collaborators/{username}\"],\n checkVulnerabilityAlerts: [\n \"GET /repos/{owner}/{repo}/vulnerability-alerts\"\n ],\n codeownersErrors: [\"GET /repos/{owner}/{repo}/codeowners/errors\"],\n compareCommits: [\"GET /repos/{owner}/{repo}/compare/{base}...{head}\"],\n compareCommitsWithBasehead: [\n \"GET /repos/{owner}/{repo}/compare/{basehead}\"\n ],\n createAutolink: [\"POST /repos/{owner}/{repo}/autolinks\"],\n createCommitComment: [\n \"POST /repos/{owner}/{repo}/commits/{commit_sha}/comments\"\n ],\n createCommitSignatureProtection: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures\"\n ],\n createCommitStatus: [\"POST /repos/{owner}/{repo}/statuses/{sha}\"],\n createDeployKey: [\"POST /repos/{owner}/{repo}/keys\"],\n createDeployment: [\"POST /repos/{owner}/{repo}/deployments\"],\n createDeploymentBranchPolicy: [\n \"POST /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies\"\n ],\n createDeploymentProtectionRule: [\n \"POST /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules\"\n ],\n createDeploymentStatus: [\n \"POST /repos/{owner}/{repo}/deployments/{deployment_id}/statuses\"\n ],\n createDispatchEvent: [\"POST /repos/{owner}/{repo}/dispatches\"],\n createForAuthenticatedUser: [\"POST /user/repos\"],\n createFork: [\"POST /repos/{owner}/{repo}/forks\"],\n createInOrg: [\"POST /orgs/{org}/repos\"],\n createOrUpdateCustomPropertiesValues: [\n \"PATCH /repos/{owner}/{repo}/properties/values\"\n ],\n createOrUpdateEnvironment: [\n \"PUT /repos/{owner}/{repo}/environments/{environment_name}\"\n ],\n createOrUpdateFileContents: [\"PUT /repos/{owner}/{repo}/contents/{path}\"],\n createOrgRuleset: [\"POST /orgs/{org}/rulesets\"],\n createPagesDeployment: [\"POST /repos/{owner}/{repo}/pages/deployments\"],\n createPagesSite: [\"POST /repos/{owner}/{repo}/pages\"],\n createRelease: [\"POST /repos/{owner}/{repo}/releases\"],\n createRepoRuleset: [\"POST /repos/{owner}/{repo}/rulesets\"],\n createTagProtection: [\"POST /repos/{owner}/{repo}/tags/protection\"],\n createUsingTemplate: [\n \"POST /repos/{template_owner}/{template_repo}/generate\"\n ],\n createWebhook: [\"POST /repos/{owner}/{repo}/hooks\"],\n declineInvitation: [\n \"DELETE /user/repository_invitations/{invitation_id}\",\n {},\n { renamed: [\"repos\", \"declineInvitationForAuthenticatedUser\"] }\n ],\n declineInvitationForAuthenticatedUser: [\n \"DELETE /user/repository_invitations/{invitation_id}\"\n ],\n delete: [\"DELETE /repos/{owner}/{repo}\"],\n deleteAccessRestrictions: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions\"\n ],\n deleteAdminBranchProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins\"\n ],\n deleteAnEnvironment: [\n \"DELETE /repos/{owner}/{repo}/environments/{environment_name}\"\n ],\n deleteAutolink: [\"DELETE /repos/{owner}/{repo}/autolinks/{autolink_id}\"],\n deleteBranchProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection\"\n ],\n deleteCommitComment: [\"DELETE /repos/{owner}/{repo}/comments/{comment_id}\"],\n deleteCommitSignatureProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures\"\n ],\n deleteDeployKey: [\"DELETE /repos/{owner}/{repo}/keys/{key_id}\"],\n deleteDeployment: [\n \"DELETE /repos/{owner}/{repo}/deployments/{deployment_id}\"\n ],\n deleteDeploymentBranchPolicy: [\n \"DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}\"\n ],\n deleteFile: [\"DELETE /repos/{owner}/{repo}/contents/{path}\"],\n deleteInvitation: [\n \"DELETE /repos/{owner}/{repo}/invitations/{invitation_id}\"\n ],\n deleteOrgRuleset: [\"DELETE /orgs/{org}/rulesets/{ruleset_id}\"],\n deletePagesSite: [\"DELETE /repos/{owner}/{repo}/pages\"],\n deletePullRequestReviewProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews\"\n ],\n deleteRelease: [\"DELETE /repos/{owner}/{repo}/releases/{release_id}\"],\n deleteReleaseAsset: [\n \"DELETE /repos/{owner}/{repo}/releases/assets/{asset_id}\"\n ],\n deleteRepoRuleset: [\"DELETE /repos/{owner}/{repo}/rulesets/{ruleset_id}\"],\n deleteTagProtection: [\n \"DELETE /repos/{owner}/{repo}/tags/protection/{tag_protection_id}\"\n ],\n deleteWebhook: [\"DELETE /repos/{owner}/{repo}/hooks/{hook_id}\"],\n disableAutomatedSecurityFixes: [\n \"DELETE /repos/{owner}/{repo}/automated-security-fixes\"\n ],\n disableDeploymentProtectionRule: [\n \"DELETE /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}\"\n ],\n disablePrivateVulnerabilityReporting: [\n \"DELETE /repos/{owner}/{repo}/private-vulnerability-reporting\"\n ],\n disableVulnerabilityAlerts: [\n \"DELETE /repos/{owner}/{repo}/vulnerability-alerts\"\n ],\n downloadArchive: [\n \"GET /repos/{owner}/{repo}/zipball/{ref}\",\n {},\n { renamed: [\"repos\", \"downloadZipballArchive\"] }\n ],\n downloadTarballArchive: [\"GET /repos/{owner}/{repo}/tarball/{ref}\"],\n downloadZipballArchive: [\"GET /repos/{owner}/{repo}/zipball/{ref}\"],\n enableAutomatedSecurityFixes: [\n \"PUT /repos/{owner}/{repo}/automated-security-fixes\"\n ],\n enablePrivateVulnerabilityReporting: [\n \"PUT /repos/{owner}/{repo}/private-vulnerability-reporting\"\n ],\n enableVulnerabilityAlerts: [\n \"PUT /repos/{owner}/{repo}/vulnerability-alerts\"\n ],\n generateReleaseNotes: [\n \"POST /repos/{owner}/{repo}/releases/generate-notes\"\n ],\n get: [\"GET /repos/{owner}/{repo}\"],\n getAccessRestrictions: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions\"\n ],\n getAdminBranchProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins\"\n ],\n getAllDeploymentProtectionRules: [\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules\"\n ],\n getAllEnvironments: [\"GET /repos/{owner}/{repo}/environments\"],\n getAllStatusCheckContexts: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts\"\n ],\n getAllTopics: [\"GET /repos/{owner}/{repo}/topics\"],\n getAppsWithAccessToProtectedBranch: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps\"\n ],\n getAutolink: [\"GET /repos/{owner}/{repo}/autolinks/{autolink_id}\"],\n getBranch: [\"GET /repos/{owner}/{repo}/branches/{branch}\"],\n getBranchProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection\"\n ],\n getBranchRules: [\"GET /repos/{owner}/{repo}/rules/branches/{branch}\"],\n getClones: [\"GET /repos/{owner}/{repo}/traffic/clones\"],\n getCodeFrequencyStats: [\"GET /repos/{owner}/{repo}/stats/code_frequency\"],\n getCollaboratorPermissionLevel: [\n \"GET /repos/{owner}/{repo}/collaborators/{username}/permission\"\n ],\n getCombinedStatusForRef: [\"GET /repos/{owner}/{repo}/commits/{ref}/status\"],\n getCommit: [\"GET /repos/{owner}/{repo}/commits/{ref}\"],\n getCommitActivityStats: [\"GET /repos/{owner}/{repo}/stats/commit_activity\"],\n getCommitComment: [\"GET /repos/{owner}/{repo}/comments/{comment_id}\"],\n getCommitSignatureProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_signatures\"\n ],\n getCommunityProfileMetrics: [\"GET /repos/{owner}/{repo}/community/profile\"],\n getContent: [\"GET /repos/{owner}/{repo}/contents/{path}\"],\n getContributorsStats: [\"GET /repos/{owner}/{repo}/stats/contributors\"],\n getCustomDeploymentProtectionRule: [\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/{protection_rule_id}\"\n ],\n getCustomPropertiesValues: [\"GET /repos/{owner}/{repo}/properties/values\"],\n getDeployKey: [\"GET /repos/{owner}/{repo}/keys/{key_id}\"],\n getDeployment: [\"GET /repos/{owner}/{repo}/deployments/{deployment_id}\"],\n getDeploymentBranchPolicy: [\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}\"\n ],\n getDeploymentStatus: [\n \"GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses/{status_id}\"\n ],\n getEnvironment: [\n \"GET /repos/{owner}/{repo}/environments/{environment_name}\"\n ],\n getLatestPagesBuild: [\"GET /repos/{owner}/{repo}/pages/builds/latest\"],\n getLatestRelease: [\"GET /repos/{owner}/{repo}/releases/latest\"],\n getOrgRuleSuite: [\"GET /orgs/{org}/rulesets/rule-suites/{rule_suite_id}\"],\n getOrgRuleSuites: [\"GET /orgs/{org}/rulesets/rule-suites\"],\n getOrgRuleset: [\"GET /orgs/{org}/rulesets/{ruleset_id}\"],\n getOrgRulesets: [\"GET /orgs/{org}/rulesets\"],\n getPages: [\"GET /repos/{owner}/{repo}/pages\"],\n getPagesBuild: [\"GET /repos/{owner}/{repo}/pages/builds/{build_id}\"],\n getPagesDeployment: [\n \"GET /repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}\"\n ],\n getPagesHealthCheck: [\"GET /repos/{owner}/{repo}/pages/health\"],\n getParticipationStats: [\"GET /repos/{owner}/{repo}/stats/participation\"],\n getPullRequestReviewProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews\"\n ],\n getPunchCardStats: [\"GET /repos/{owner}/{repo}/stats/punch_card\"],\n getReadme: [\"GET /repos/{owner}/{repo}/readme\"],\n getReadmeInDirectory: [\"GET /repos/{owner}/{repo}/readme/{dir}\"],\n getRelease: [\"GET /repos/{owner}/{repo}/releases/{release_id}\"],\n getReleaseAsset: [\"GET /repos/{owner}/{repo}/releases/assets/{asset_id}\"],\n getReleaseByTag: [\"GET /repos/{owner}/{repo}/releases/tags/{tag}\"],\n getRepoRuleSuite: [\n \"GET /repos/{owner}/{repo}/rulesets/rule-suites/{rule_suite_id}\"\n ],\n getRepoRuleSuites: [\"GET /repos/{owner}/{repo}/rulesets/rule-suites\"],\n getRepoRuleset: [\"GET /repos/{owner}/{repo}/rulesets/{ruleset_id}\"],\n getRepoRulesets: [\"GET /repos/{owner}/{repo}/rulesets\"],\n getStatusChecksProtection: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks\"\n ],\n getTeamsWithAccessToProtectedBranch: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams\"\n ],\n getTopPaths: [\"GET /repos/{owner}/{repo}/traffic/popular/paths\"],\n getTopReferrers: [\"GET /repos/{owner}/{repo}/traffic/popular/referrers\"],\n getUsersWithAccessToProtectedBranch: [\n \"GET /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users\"\n ],\n getViews: [\"GET /repos/{owner}/{repo}/traffic/views\"],\n getWebhook: [\"GET /repos/{owner}/{repo}/hooks/{hook_id}\"],\n getWebhookConfigForRepo: [\n \"GET /repos/{owner}/{repo}/hooks/{hook_id}/config\"\n ],\n getWebhookDelivery: [\n \"GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}\"\n ],\n listActivities: [\"GET /repos/{owner}/{repo}/activity\"],\n listAutolinks: [\"GET /repos/{owner}/{repo}/autolinks\"],\n listBranches: [\"GET /repos/{owner}/{repo}/branches\"],\n listBranchesForHeadCommit: [\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/branches-where-head\"\n ],\n listCollaborators: [\"GET /repos/{owner}/{repo}/collaborators\"],\n listCommentsForCommit: [\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/comments\"\n ],\n listCommitCommentsForRepo: [\"GET /repos/{owner}/{repo}/comments\"],\n listCommitStatusesForRef: [\n \"GET /repos/{owner}/{repo}/commits/{ref}/statuses\"\n ],\n listCommits: [\"GET /repos/{owner}/{repo}/commits\"],\n listContributors: [\"GET /repos/{owner}/{repo}/contributors\"],\n listCustomDeploymentRuleIntegrations: [\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment_protection_rules/apps\"\n ],\n listDeployKeys: [\"GET /repos/{owner}/{repo}/keys\"],\n listDeploymentBranchPolicies: [\n \"GET /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies\"\n ],\n listDeploymentStatuses: [\n \"GET /repos/{owner}/{repo}/deployments/{deployment_id}/statuses\"\n ],\n listDeployments: [\"GET /repos/{owner}/{repo}/deployments\"],\n listForAuthenticatedUser: [\"GET /user/repos\"],\n listForOrg: [\"GET /orgs/{org}/repos\"],\n listForUser: [\"GET /users/{username}/repos\"],\n listForks: [\"GET /repos/{owner}/{repo}/forks\"],\n listInvitations: [\"GET /repos/{owner}/{repo}/invitations\"],\n listInvitationsForAuthenticatedUser: [\"GET /user/repository_invitations\"],\n listLanguages: [\"GET /repos/{owner}/{repo}/languages\"],\n listPagesBuilds: [\"GET /repos/{owner}/{repo}/pages/builds\"],\n listPublic: [\"GET /repositories\"],\n listPullRequestsAssociatedWithCommit: [\n \"GET /repos/{owner}/{repo}/commits/{commit_sha}/pulls\"\n ],\n listReleaseAssets: [\n \"GET /repos/{owner}/{repo}/releases/{release_id}/assets\"\n ],\n listReleases: [\"GET /repos/{owner}/{repo}/releases\"],\n listTagProtection: [\"GET /repos/{owner}/{repo}/tags/protection\"],\n listTags: [\"GET /repos/{owner}/{repo}/tags\"],\n listTeams: [\"GET /repos/{owner}/{repo}/teams\"],\n listWebhookDeliveries: [\n \"GET /repos/{owner}/{repo}/hooks/{hook_id}/deliveries\"\n ],\n listWebhooks: [\"GET /repos/{owner}/{repo}/hooks\"],\n merge: [\"POST /repos/{owner}/{repo}/merges\"],\n mergeUpstream: [\"POST /repos/{owner}/{repo}/merge-upstream\"],\n pingWebhook: [\"POST /repos/{owner}/{repo}/hooks/{hook_id}/pings\"],\n redeliverWebhookDelivery: [\n \"POST /repos/{owner}/{repo}/hooks/{hook_id}/deliveries/{delivery_id}/attempts\"\n ],\n removeAppAccessRestrictions: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps\",\n {},\n { mapToData: \"apps\" }\n ],\n removeCollaborator: [\n \"DELETE /repos/{owner}/{repo}/collaborators/{username}\"\n ],\n removeStatusCheckContexts: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts\",\n {},\n { mapToData: \"contexts\" }\n ],\n removeStatusCheckProtection: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks\"\n ],\n removeTeamAccessRestrictions: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams\",\n {},\n { mapToData: \"teams\" }\n ],\n removeUserAccessRestrictions: [\n \"DELETE /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users\",\n {},\n { mapToData: \"users\" }\n ],\n renameBranch: [\"POST /repos/{owner}/{repo}/branches/{branch}/rename\"],\n replaceAllTopics: [\"PUT /repos/{owner}/{repo}/topics\"],\n requestPagesBuild: [\"POST /repos/{owner}/{repo}/pages/builds\"],\n setAdminBranchProtection: [\n \"POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins\"\n ],\n setAppAccessRestrictions: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/apps\",\n {},\n { mapToData: \"apps\" }\n ],\n setStatusCheckContexts: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks/contexts\",\n {},\n { mapToData: \"contexts\" }\n ],\n setTeamAccessRestrictions: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams\",\n {},\n { mapToData: \"teams\" }\n ],\n setUserAccessRestrictions: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/users\",\n {},\n { mapToData: \"users\" }\n ],\n testPushWebhook: [\"POST /repos/{owner}/{repo}/hooks/{hook_id}/tests\"],\n transfer: [\"POST /repos/{owner}/{repo}/transfer\"],\n update: [\"PATCH /repos/{owner}/{repo}\"],\n updateBranchProtection: [\n \"PUT /repos/{owner}/{repo}/branches/{branch}/protection\"\n ],\n updateCommitComment: [\"PATCH /repos/{owner}/{repo}/comments/{comment_id}\"],\n updateDeploymentBranchPolicy: [\n \"PUT /repos/{owner}/{repo}/environments/{environment_name}/deployment-branch-policies/{branch_policy_id}\"\n ],\n updateInformationAboutPagesSite: [\"PUT /repos/{owner}/{repo}/pages\"],\n updateInvitation: [\n \"PATCH /repos/{owner}/{repo}/invitations/{invitation_id}\"\n ],\n updateOrgRuleset: [\"PUT /orgs/{org}/rulesets/{ruleset_id}\"],\n updatePullRequestReviewProtection: [\n \"PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_pull_request_reviews\"\n ],\n updateRelease: [\"PATCH /repos/{owner}/{repo}/releases/{release_id}\"],\n updateReleaseAsset: [\n \"PATCH /repos/{owner}/{repo}/releases/assets/{asset_id}\"\n ],\n updateRepoRuleset: [\"PUT /repos/{owner}/{repo}/rulesets/{ruleset_id}\"],\n updateStatusCheckPotection: [\n \"PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks\",\n {},\n { renamed: [\"repos\", \"updateStatusCheckProtection\"] }\n ],\n updateStatusCheckProtection: [\n \"PATCH /repos/{owner}/{repo}/branches/{branch}/protection/required_status_checks\"\n ],\n updateWebhook: [\"PATCH /repos/{owner}/{repo}/hooks/{hook_id}\"],\n updateWebhookConfigForRepo: [\n \"PATCH /repos/{owner}/{repo}/hooks/{hook_id}/config\"\n ],\n uploadReleaseAsset: [\n \"POST /repos/{owner}/{repo}/releases/{release_id}/assets{?name,label}\",\n { baseUrl: \"https://uploads.github.com\" }\n ]\n },\n search: {\n code: [\"GET /search/code\"],\n commits: [\"GET /search/commits\"],\n issuesAndPullRequests: [\"GET /search/issues\"],\n labels: [\"GET /search/labels\"],\n repos: [\"GET /search/repositories\"],\n topics: [\"GET /search/topics\"],\n users: [\"GET /search/users\"]\n },\n secretScanning: {\n getAlert: [\n \"GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}\"\n ],\n listAlertsForEnterprise: [\n \"GET /enterprises/{enterprise}/secret-scanning/alerts\"\n ],\n listAlertsForOrg: [\"GET /orgs/{org}/secret-scanning/alerts\"],\n listAlertsForRepo: [\"GET /repos/{owner}/{repo}/secret-scanning/alerts\"],\n listLocationsForAlert: [\n \"GET /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}/locations\"\n ],\n updateAlert: [\n \"PATCH /repos/{owner}/{repo}/secret-scanning/alerts/{alert_number}\"\n ]\n },\n securityAdvisories: {\n createFork: [\n \"POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/forks\"\n ],\n createPrivateVulnerabilityReport: [\n \"POST /repos/{owner}/{repo}/security-advisories/reports\"\n ],\n createRepositoryAdvisory: [\n \"POST /repos/{owner}/{repo}/security-advisories\"\n ],\n createRepositoryAdvisoryCveRequest: [\n \"POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/cve\"\n ],\n getGlobalAdvisory: [\"GET /advisories/{ghsa_id}\"],\n getRepositoryAdvisory: [\n \"GET /repos/{owner}/{repo}/security-advisories/{ghsa_id}\"\n ],\n listGlobalAdvisories: [\"GET /advisories\"],\n listOrgRepositoryAdvisories: [\"GET /orgs/{org}/security-advisories\"],\n listRepositoryAdvisories: [\"GET /repos/{owner}/{repo}/security-advisories\"],\n updateRepositoryAdvisory: [\n \"PATCH /repos/{owner}/{repo}/security-advisories/{ghsa_id}\"\n ]\n },\n teams: {\n addOrUpdateMembershipForUserInOrg: [\n \"PUT /orgs/{org}/teams/{team_slug}/memberships/{username}\"\n ],\n addOrUpdateProjectPermissionsInOrg: [\n \"PUT /orgs/{org}/teams/{team_slug}/projects/{project_id}\"\n ],\n addOrUpdateRepoPermissionsInOrg: [\n \"PUT /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}\"\n ],\n checkPermissionsForProjectInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/projects/{project_id}\"\n ],\n checkPermissionsForRepoInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}\"\n ],\n create: [\"POST /orgs/{org}/teams\"],\n createDiscussionCommentInOrg: [\n \"POST /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments\"\n ],\n createDiscussionInOrg: [\"POST /orgs/{org}/teams/{team_slug}/discussions\"],\n deleteDiscussionCommentInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}\"\n ],\n deleteDiscussionInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}\"\n ],\n deleteInOrg: [\"DELETE /orgs/{org}/teams/{team_slug}\"],\n getByName: [\"GET /orgs/{org}/teams/{team_slug}\"],\n getDiscussionCommentInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}\"\n ],\n getDiscussionInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}\"\n ],\n getMembershipForUserInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/memberships/{username}\"\n ],\n list: [\"GET /orgs/{org}/teams\"],\n listChildInOrg: [\"GET /orgs/{org}/teams/{team_slug}/teams\"],\n listDiscussionCommentsInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments\"\n ],\n listDiscussionsInOrg: [\"GET /orgs/{org}/teams/{team_slug}/discussions\"],\n listForAuthenticatedUser: [\"GET /user/teams\"],\n listMembersInOrg: [\"GET /orgs/{org}/teams/{team_slug}/members\"],\n listPendingInvitationsInOrg: [\n \"GET /orgs/{org}/teams/{team_slug}/invitations\"\n ],\n listProjectsInOrg: [\"GET /orgs/{org}/teams/{team_slug}/projects\"],\n listReposInOrg: [\"GET /orgs/{org}/teams/{team_slug}/repos\"],\n removeMembershipForUserInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/memberships/{username}\"\n ],\n removeProjectInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/projects/{project_id}\"\n ],\n removeRepoInOrg: [\n \"DELETE /orgs/{org}/teams/{team_slug}/repos/{owner}/{repo}\"\n ],\n updateDiscussionCommentInOrg: [\n \"PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}/comments/{comment_number}\"\n ],\n updateDiscussionInOrg: [\n \"PATCH /orgs/{org}/teams/{team_slug}/discussions/{discussion_number}\"\n ],\n updateInOrg: [\"PATCH /orgs/{org}/teams/{team_slug}\"]\n },\n users: {\n addEmailForAuthenticated: [\n \"POST /user/emails\",\n {},\n { renamed: [\"users\", \"addEmailForAuthenticatedUser\"] }\n ],\n addEmailForAuthenticatedUser: [\"POST /user/emails\"],\n addSocialAccountForAuthenticatedUser: [\"POST /user/social_accounts\"],\n block: [\"PUT /user/blocks/{username}\"],\n checkBlocked: [\"GET /user/blocks/{username}\"],\n checkFollowingForUser: [\"GET /users/{username}/following/{target_user}\"],\n checkPersonIsFollowedByAuthenticated: [\"GET /user/following/{username}\"],\n createGpgKeyForAuthenticated: [\n \"POST /user/gpg_keys\",\n {},\n { renamed: [\"users\", \"createGpgKeyForAuthenticatedUser\"] }\n ],\n createGpgKeyForAuthenticatedUser: [\"POST /user/gpg_keys\"],\n createPublicSshKeyForAuthenticated: [\n \"POST /user/keys\",\n {},\n { renamed: [\"users\", \"createPublicSshKeyForAuthenticatedUser\"] }\n ],\n createPublicSshKeyForAuthenticatedUser: [\"POST /user/keys\"],\n createSshSigningKeyForAuthenticatedUser: [\"POST /user/ssh_signing_keys\"],\n deleteEmailForAuthenticated: [\n \"DELETE /user/emails\",\n {},\n { renamed: [\"users\", \"deleteEmailForAuthenticatedUser\"] }\n ],\n deleteEmailForAuthenticatedUser: [\"DELETE /user/emails\"],\n deleteGpgKeyForAuthenticated: [\n \"DELETE /user/gpg_keys/{gpg_key_id}\",\n {},\n { renamed: [\"users\", \"deleteGpgKeyForAuthenticatedUser\"] }\n ],\n deleteGpgKeyForAuthenticatedUser: [\"DELETE /user/gpg_keys/{gpg_key_id}\"],\n deletePublicSshKeyForAuthenticated: [\n \"DELETE /user/keys/{key_id}\",\n {},\n { renamed: [\"users\", \"deletePublicSshKeyForAuthenticatedUser\"] }\n ],\n deletePublicSshKeyForAuthenticatedUser: [\"DELETE /user/keys/{key_id}\"],\n deleteSocialAccountForAuthenticatedUser: [\"DELETE /user/social_accounts\"],\n deleteSshSigningKeyForAuthenticatedUser: [\n \"DELETE /user/ssh_signing_keys/{ssh_signing_key_id}\"\n ],\n follow: [\"PUT /user/following/{username}\"],\n getAuthenticated: [\"GET /user\"],\n getByUsername: [\"GET /users/{username}\"],\n getContextForUser: [\"GET /users/{username}/hovercard\"],\n getGpgKeyForAuthenticated: [\n \"GET /user/gpg_keys/{gpg_key_id}\",\n {},\n { renamed: [\"users\", \"getGpgKeyForAuthenticatedUser\"] }\n ],\n getGpgKeyForAuthenticatedUser: [\"GET /user/gpg_keys/{gpg_key_id}\"],\n getPublicSshKeyForAuthenticated: [\n \"GET /user/keys/{key_id}\",\n {},\n { renamed: [\"users\", \"getPublicSshKeyForAuthenticatedUser\"] }\n ],\n getPublicSshKeyForAuthenticatedUser: [\"GET /user/keys/{key_id}\"],\n getSshSigningKeyForAuthenticatedUser: [\n \"GET /user/ssh_signing_keys/{ssh_signing_key_id}\"\n ],\n list: [\"GET /users\"],\n listBlockedByAuthenticated: [\n \"GET /user/blocks\",\n {},\n { renamed: [\"users\", \"listBlockedByAuthenticatedUser\"] }\n ],\n listBlockedByAuthenticatedUser: [\"GET /user/blocks\"],\n listEmailsForAuthenticated: [\n \"GET /user/emails\",\n {},\n { renamed: [\"users\", \"listEmailsForAuthenticatedUser\"] }\n ],\n listEmailsForAuthenticatedUser: [\"GET /user/emails\"],\n listFollowedByAuthenticated: [\n \"GET /user/following\",\n {},\n { renamed: [\"users\", \"listFollowedByAuthenticatedUser\"] }\n ],\n listFollowedByAuthenticatedUser: [\"GET /user/following\"],\n listFollowersForAuthenticatedUser: [\"GET /user/followers\"],\n listFollowersForUser: [\"GET /users/{username}/followers\"],\n listFollowingForUser: [\"GET /users/{username}/following\"],\n listGpgKeysForAuthenticated: [\n \"GET /user/gpg_keys\",\n {},\n { renamed: [\"users\", \"listGpgKeysForAuthenticatedUser\"] }\n ],\n listGpgKeysForAuthenticatedUser: [\"GET /user/gpg_keys\"],\n listGpgKeysForUser: [\"GET /users/{username}/gpg_keys\"],\n listPublicEmailsForAuthenticated: [\n \"GET /user/public_emails\",\n {},\n { renamed: [\"users\", \"listPublicEmailsForAuthenticatedUser\"] }\n ],\n listPublicEmailsForAuthenticatedUser: [\"GET /user/public_emails\"],\n listPublicKeysForUser: [\"GET /users/{username}/keys\"],\n listPublicSshKeysForAuthenticated: [\n \"GET /user/keys\",\n {},\n { renamed: [\"users\", \"listPublicSshKeysForAuthenticatedUser\"] }\n ],\n listPublicSshKeysForAuthenticatedUser: [\"GET /user/keys\"],\n listSocialAccountsForAuthenticatedUser: [\"GET /user/social_accounts\"],\n listSocialAccountsForUser: [\"GET /users/{username}/social_accounts\"],\n listSshSigningKeysForAuthenticatedUser: [\"GET /user/ssh_signing_keys\"],\n listSshSigningKeysForUser: [\"GET /users/{username}/ssh_signing_keys\"],\n setPrimaryEmailVisibilityForAuthenticated: [\n \"PATCH /user/email/visibility\",\n {},\n { renamed: [\"users\", \"setPrimaryEmailVisibilityForAuthenticatedUser\"] }\n ],\n setPrimaryEmailVisibilityForAuthenticatedUser: [\n \"PATCH /user/email/visibility\"\n ],\n unblock: [\"DELETE /user/blocks/{username}\"],\n unfollow: [\"DELETE /user/following/{username}\"],\n updateAuthenticated: [\"PATCH /user\"]\n }\n};\nvar endpoints_default = Endpoints;\n\n// pkg/dist-src/endpoints-to-methods.js\nvar endpointMethodsMap = /* @__PURE__ */ new Map();\nfor (const [scope, endpoints] of Object.entries(endpoints_default)) {\n for (const [methodName, endpoint] of Object.entries(endpoints)) {\n const [route, defaults, decorations] = endpoint;\n const [method, url] = route.split(/ /);\n const endpointDefaults = Object.assign(\n {\n method,\n url\n },\n defaults\n );\n if (!endpointMethodsMap.has(scope)) {\n endpointMethodsMap.set(scope, /* @__PURE__ */ new Map());\n }\n endpointMethodsMap.get(scope).set(methodName, {\n scope,\n methodName,\n endpointDefaults,\n decorations\n });\n }\n}\nvar handler = {\n has({ scope }, methodName) {\n return endpointMethodsMap.get(scope).has(methodName);\n },\n getOwnPropertyDescriptor(target, methodName) {\n return {\n value: this.get(target, methodName),\n // ensures method is in the cache\n configurable: true,\n writable: true,\n enumerable: true\n };\n },\n defineProperty(target, methodName, descriptor) {\n Object.defineProperty(target.cache, methodName, descriptor);\n return true;\n },\n deleteProperty(target, methodName) {\n delete target.cache[methodName];\n return true;\n },\n ownKeys({ scope }) {\n return [...endpointMethodsMap.get(scope).keys()];\n },\n set(target, methodName, value) {\n return target.cache[methodName] = value;\n },\n get({ octokit, scope, cache }, methodName) {\n if (cache[methodName]) {\n return cache[methodName];\n }\n const method = endpointMethodsMap.get(scope).get(methodName);\n if (!method) {\n return void 0;\n }\n const { endpointDefaults, decorations } = method;\n if (decorations) {\n cache[methodName] = decorate(\n octokit,\n scope,\n methodName,\n endpointDefaults,\n decorations\n );\n } else {\n cache[methodName] = octokit.request.defaults(endpointDefaults);\n }\n return cache[methodName];\n }\n};\nfunction endpointsToMethods(octokit) {\n const newMethods = {};\n for (const scope of endpointMethodsMap.keys()) {\n newMethods[scope] = new Proxy({ octokit, scope, cache: {} }, handler);\n }\n return newMethods;\n}\nfunction decorate(octokit, scope, methodName, defaults, decorations) {\n const requestWithDefaults = octokit.request.defaults(defaults);\n function withDecorations(...args) {\n let options = requestWithDefaults.endpoint.merge(...args);\n if (decorations.mapToData) {\n options = Object.assign({}, options, {\n data: options[decorations.mapToData],\n [decorations.mapToData]: void 0\n });\n return requestWithDefaults(options);\n }\n if (decorations.renamed) {\n const [newScope, newMethodName] = decorations.renamed;\n octokit.log.warn(\n `octokit.${scope}.${methodName}() has been renamed to octokit.${newScope}.${newMethodName}()`\n );\n }\n if (decorations.deprecated) {\n octokit.log.warn(decorations.deprecated);\n }\n if (decorations.renamedParameters) {\n const options2 = requestWithDefaults.endpoint.merge(...args);\n for (const [name, alias] of Object.entries(\n decorations.renamedParameters\n )) {\n if (name in options2) {\n octokit.log.warn(\n `\"${name}\" parameter is deprecated for \"octokit.${scope}.${methodName}()\". Use \"${alias}\" instead`\n );\n if (!(alias in options2)) {\n options2[alias] = options2[name];\n }\n delete options2[name];\n }\n }\n return requestWithDefaults(options2);\n }\n return requestWithDefaults(...args);\n }\n return Object.assign(withDecorations, requestWithDefaults);\n}\n\n// pkg/dist-src/index.js\nfunction restEndpointMethods(octokit) {\n const api = endpointsToMethods(octokit);\n return {\n rest: api\n };\n}\nrestEndpointMethods.VERSION = VERSION;\nfunction legacyRestEndpointMethods(octokit) {\n const api = endpointsToMethods(octokit);\n return {\n ...api,\n rest: api\n };\n}\nlegacyRestEndpointMethods.VERSION = VERSION;\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n legacyRestEndpointMethods,\n restEndpointMethods\n});\n","\"use strict\";\nvar __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// pkg/dist-src/index.js\nvar dist_src_exports = {};\n__export(dist_src_exports, {\n RequestError: () => RequestError\n});\nmodule.exports = __toCommonJS(dist_src_exports);\nvar import_deprecation = require(\"deprecation\");\nvar import_once = __toESM(require(\"once\"));\nvar logOnceCode = (0, import_once.default)((deprecation) => console.warn(deprecation));\nvar logOnceHeaders = (0, import_once.default)((deprecation) => console.warn(deprecation));\nvar RequestError = class extends Error {\n constructor(message, statusCode, options) {\n super(message);\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n this.name = \"HttpError\";\n this.status = statusCode;\n let headers;\n if (\"headers\" in options && typeof options.headers !== \"undefined\") {\n headers = options.headers;\n }\n if (\"response\" in options) {\n this.response = options.response;\n headers = options.response.headers;\n }\n const requestCopy = Object.assign({}, options.request);\n if (options.request.headers.authorization) {\n requestCopy.headers = Object.assign({}, options.request.headers, {\n authorization: options.request.headers.authorization.replace(\n /(? {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// pkg/dist-src/index.js\nvar dist_src_exports = {};\n__export(dist_src_exports, {\n request: () => request\n});\nmodule.exports = __toCommonJS(dist_src_exports);\nvar import_endpoint = require(\"@octokit/endpoint\");\nvar import_universal_user_agent = require(\"universal-user-agent\");\n\n// pkg/dist-src/version.js\nvar VERSION = \"8.4.1\";\n\n// pkg/dist-src/is-plain-object.js\nfunction isPlainObject(value) {\n if (typeof value !== \"object\" || value === null)\n return false;\n if (Object.prototype.toString.call(value) !== \"[object Object]\")\n return false;\n const proto = Object.getPrototypeOf(value);\n if (proto === null)\n return true;\n const Ctor = Object.prototype.hasOwnProperty.call(proto, \"constructor\") && proto.constructor;\n return typeof Ctor === \"function\" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value);\n}\n\n// pkg/dist-src/fetch-wrapper.js\nvar import_request_error = require(\"@octokit/request-error\");\n\n// pkg/dist-src/get-buffer-response.js\nfunction getBufferResponse(response) {\n return response.arrayBuffer();\n}\n\n// pkg/dist-src/fetch-wrapper.js\nfunction fetchWrapper(requestOptions) {\n var _a, _b, _c, _d;\n const log = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console;\n const parseSuccessResponseBody = ((_a = requestOptions.request) == null ? void 0 : _a.parseSuccessResponseBody) !== false;\n if (isPlainObject(requestOptions.body) || Array.isArray(requestOptions.body)) {\n requestOptions.body = JSON.stringify(requestOptions.body);\n }\n let headers = {};\n let status;\n let url;\n let { fetch } = globalThis;\n if ((_b = requestOptions.request) == null ? void 0 : _b.fetch) {\n fetch = requestOptions.request.fetch;\n }\n if (!fetch) {\n throw new Error(\n \"fetch is not set. Please pass a fetch implementation as new Octokit({ request: { fetch }}). Learn more at https://github.com/octokit/octokit.js/#fetch-missing\"\n );\n }\n return fetch(requestOptions.url, {\n method: requestOptions.method,\n body: requestOptions.body,\n redirect: (_c = requestOptions.request) == null ? void 0 : _c.redirect,\n headers: requestOptions.headers,\n signal: (_d = requestOptions.request) == null ? void 0 : _d.signal,\n // duplex must be set if request.body is ReadableStream or Async Iterables.\n // See https://fetch.spec.whatwg.org/#dom-requestinit-duplex.\n ...requestOptions.body && { duplex: \"half\" }\n }).then(async (response) => {\n url = response.url;\n status = response.status;\n for (const keyAndValue of response.headers) {\n headers[keyAndValue[0]] = keyAndValue[1];\n }\n if (\"deprecation\" in headers) {\n const matches = headers.link && headers.link.match(/<([^<>]+)>; rel=\"deprecation\"/);\n const deprecationLink = matches && matches.pop();\n log.warn(\n `[@octokit/request] \"${requestOptions.method} ${requestOptions.url}\" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : \"\"}`\n );\n }\n if (status === 204 || status === 205) {\n return;\n }\n if (requestOptions.method === \"HEAD\") {\n if (status < 400) {\n return;\n }\n throw new import_request_error.RequestError(response.statusText, status, {\n response: {\n url,\n status,\n headers,\n data: void 0\n },\n request: requestOptions\n });\n }\n if (status === 304) {\n throw new import_request_error.RequestError(\"Not modified\", status, {\n response: {\n url,\n status,\n headers,\n data: await getResponseData(response)\n },\n request: requestOptions\n });\n }\n if (status >= 400) {\n const data = await getResponseData(response);\n const error = new import_request_error.RequestError(toErrorMessage(data), status, {\n response: {\n url,\n status,\n headers,\n data\n },\n request: requestOptions\n });\n throw error;\n }\n return parseSuccessResponseBody ? await getResponseData(response) : response.body;\n }).then((data) => {\n return {\n status,\n url,\n headers,\n data\n };\n }).catch((error) => {\n if (error instanceof import_request_error.RequestError)\n throw error;\n else if (error.name === \"AbortError\")\n throw error;\n let message = error.message;\n if (error.name === \"TypeError\" && \"cause\" in error) {\n if (error.cause instanceof Error) {\n message = error.cause.message;\n } else if (typeof error.cause === \"string\") {\n message = error.cause;\n }\n }\n throw new import_request_error.RequestError(message, 500, {\n request: requestOptions\n });\n });\n}\nasync function getResponseData(response) {\n const contentType = response.headers.get(\"content-type\");\n if (/application\\/json/.test(contentType)) {\n return response.json().catch(() => response.text()).catch(() => \"\");\n }\n if (!contentType || /^text\\/|charset=utf-8$/.test(contentType)) {\n return response.text();\n }\n return getBufferResponse(response);\n}\nfunction toErrorMessage(data) {\n if (typeof data === \"string\")\n return data;\n let suffix;\n if (\"documentation_url\" in data) {\n suffix = ` - ${data.documentation_url}`;\n } else {\n suffix = \"\";\n }\n if (\"message\" in data) {\n if (Array.isArray(data.errors)) {\n return `${data.message}: ${data.errors.map(JSON.stringify).join(\", \")}${suffix}`;\n }\n return `${data.message}${suffix}`;\n }\n return `Unknown error: ${JSON.stringify(data)}`;\n}\n\n// pkg/dist-src/with-defaults.js\nfunction withDefaults(oldEndpoint, newDefaults) {\n const endpoint2 = oldEndpoint.defaults(newDefaults);\n const newApi = function(route, parameters) {\n const endpointOptions = endpoint2.merge(route, parameters);\n if (!endpointOptions.request || !endpointOptions.request.hook) {\n return fetchWrapper(endpoint2.parse(endpointOptions));\n }\n const request2 = (route2, parameters2) => {\n return fetchWrapper(\n endpoint2.parse(endpoint2.merge(route2, parameters2))\n );\n };\n Object.assign(request2, {\n endpoint: endpoint2,\n defaults: withDefaults.bind(null, endpoint2)\n });\n return endpointOptions.request.hook(request2, endpointOptions);\n };\n return Object.assign(newApi, {\n endpoint: endpoint2,\n defaults: withDefaults.bind(null, endpoint2)\n });\n}\n\n// pkg/dist-src/index.js\nvar request = withDefaults(import_endpoint.endpoint, {\n headers: {\n \"user-agent\": `octokit-request.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`\n }\n});\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n request\n});\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n CONFIG_USE_DUALSTACK_ENDPOINT: () => CONFIG_USE_DUALSTACK_ENDPOINT,\n CONFIG_USE_FIPS_ENDPOINT: () => CONFIG_USE_FIPS_ENDPOINT,\n DEFAULT_USE_DUALSTACK_ENDPOINT: () => DEFAULT_USE_DUALSTACK_ENDPOINT,\n DEFAULT_USE_FIPS_ENDPOINT: () => DEFAULT_USE_FIPS_ENDPOINT,\n ENV_USE_DUALSTACK_ENDPOINT: () => ENV_USE_DUALSTACK_ENDPOINT,\n ENV_USE_FIPS_ENDPOINT: () => ENV_USE_FIPS_ENDPOINT,\n NODE_REGION_CONFIG_FILE_OPTIONS: () => NODE_REGION_CONFIG_FILE_OPTIONS,\n NODE_REGION_CONFIG_OPTIONS: () => NODE_REGION_CONFIG_OPTIONS,\n NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS: () => NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,\n NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS: () => NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,\n REGION_ENV_NAME: () => REGION_ENV_NAME,\n REGION_INI_NAME: () => REGION_INI_NAME,\n getRegionInfo: () => getRegionInfo,\n resolveCustomEndpointsConfig: () => resolveCustomEndpointsConfig,\n resolveEndpointsConfig: () => resolveEndpointsConfig,\n resolveRegionConfig: () => resolveRegionConfig\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/endpointsConfig/NodeUseDualstackEndpointConfigOptions.ts\nvar import_util_config_provider = require(\"@smithy/util-config-provider\");\nvar ENV_USE_DUALSTACK_ENDPOINT = \"AWS_USE_DUALSTACK_ENDPOINT\";\nvar CONFIG_USE_DUALSTACK_ENDPOINT = \"use_dualstack_endpoint\";\nvar DEFAULT_USE_DUALSTACK_ENDPOINT = false;\nvar NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => (0, import_util_config_provider.booleanSelector)(env, ENV_USE_DUALSTACK_ENDPOINT, import_util_config_provider.SelectorType.ENV),\n configFileSelector: (profile) => (0, import_util_config_provider.booleanSelector)(profile, CONFIG_USE_DUALSTACK_ENDPOINT, import_util_config_provider.SelectorType.CONFIG),\n default: false\n};\n\n// src/endpointsConfig/NodeUseFipsEndpointConfigOptions.ts\n\nvar ENV_USE_FIPS_ENDPOINT = \"AWS_USE_FIPS_ENDPOINT\";\nvar CONFIG_USE_FIPS_ENDPOINT = \"use_fips_endpoint\";\nvar DEFAULT_USE_FIPS_ENDPOINT = false;\nvar NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => (0, import_util_config_provider.booleanSelector)(env, ENV_USE_FIPS_ENDPOINT, import_util_config_provider.SelectorType.ENV),\n configFileSelector: (profile) => (0, import_util_config_provider.booleanSelector)(profile, CONFIG_USE_FIPS_ENDPOINT, import_util_config_provider.SelectorType.CONFIG),\n default: false\n};\n\n// src/endpointsConfig/resolveCustomEndpointsConfig.ts\nvar import_util_middleware = require(\"@smithy/util-middleware\");\nvar resolveCustomEndpointsConfig = /* @__PURE__ */ __name((input) => {\n const { tls, endpoint, urlParser, useDualstackEndpoint } = input;\n return Object.assign(input, {\n tls: tls ?? true,\n endpoint: (0, import_util_middleware.normalizeProvider)(typeof endpoint === \"string\" ? urlParser(endpoint) : endpoint),\n isCustomEndpoint: true,\n useDualstackEndpoint: (0, import_util_middleware.normalizeProvider)(useDualstackEndpoint ?? false)\n });\n}, \"resolveCustomEndpointsConfig\");\n\n// src/endpointsConfig/resolveEndpointsConfig.ts\n\n\n// src/endpointsConfig/utils/getEndpointFromRegion.ts\nvar getEndpointFromRegion = /* @__PURE__ */ __name(async (input) => {\n const { tls = true } = input;\n const region = await input.region();\n const dnsHostRegex = new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/);\n if (!dnsHostRegex.test(region)) {\n throw new Error(\"Invalid region in client config\");\n }\n const useDualstackEndpoint = await input.useDualstackEndpoint();\n const useFipsEndpoint = await input.useFipsEndpoint();\n const { hostname } = await input.regionInfoProvider(region, { useDualstackEndpoint, useFipsEndpoint }) ?? {};\n if (!hostname) {\n throw new Error(\"Cannot resolve hostname from client config\");\n }\n return input.urlParser(`${tls ? \"https:\" : \"http:\"}//${hostname}`);\n}, \"getEndpointFromRegion\");\n\n// src/endpointsConfig/resolveEndpointsConfig.ts\nvar resolveEndpointsConfig = /* @__PURE__ */ __name((input) => {\n const useDualstackEndpoint = (0, import_util_middleware.normalizeProvider)(input.useDualstackEndpoint ?? false);\n const { endpoint, useFipsEndpoint, urlParser, tls } = input;\n return Object.assign(input, {\n tls: tls ?? true,\n endpoint: endpoint ? (0, import_util_middleware.normalizeProvider)(typeof endpoint === \"string\" ? urlParser(endpoint) : endpoint) : () => getEndpointFromRegion({ ...input, useDualstackEndpoint, useFipsEndpoint }),\n isCustomEndpoint: !!endpoint,\n useDualstackEndpoint\n });\n}, \"resolveEndpointsConfig\");\n\n// src/regionConfig/config.ts\nvar REGION_ENV_NAME = \"AWS_REGION\";\nvar REGION_INI_NAME = \"region\";\nvar NODE_REGION_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => env[REGION_ENV_NAME],\n configFileSelector: (profile) => profile[REGION_INI_NAME],\n default: () => {\n throw new Error(\"Region is missing\");\n }\n};\nvar NODE_REGION_CONFIG_FILE_OPTIONS = {\n preferredFile: \"credentials\"\n};\n\n// src/regionConfig/isFipsRegion.ts\nvar isFipsRegion = /* @__PURE__ */ __name((region) => typeof region === \"string\" && (region.startsWith(\"fips-\") || region.endsWith(\"-fips\")), \"isFipsRegion\");\n\n// src/regionConfig/getRealRegion.ts\nvar getRealRegion = /* @__PURE__ */ __name((region) => isFipsRegion(region) ? [\"fips-aws-global\", \"aws-fips\"].includes(region) ? \"us-east-1\" : region.replace(/fips-(dkr-|prod-)?|-fips/, \"\") : region, \"getRealRegion\");\n\n// src/regionConfig/resolveRegionConfig.ts\nvar resolveRegionConfig = /* @__PURE__ */ __name((input) => {\n const { region, useFipsEndpoint } = input;\n if (!region) {\n throw new Error(\"Region is missing\");\n }\n return Object.assign(input, {\n region: async () => {\n if (typeof region === \"string\") {\n return getRealRegion(region);\n }\n const providedRegion = await region();\n return getRealRegion(providedRegion);\n },\n useFipsEndpoint: async () => {\n const providedRegion = typeof region === \"string\" ? region : await region();\n if (isFipsRegion(providedRegion)) {\n return true;\n }\n return typeof useFipsEndpoint !== \"function\" ? Promise.resolve(!!useFipsEndpoint) : useFipsEndpoint();\n }\n });\n}, \"resolveRegionConfig\");\n\n// src/regionInfo/getHostnameFromVariants.ts\nvar getHostnameFromVariants = /* @__PURE__ */ __name((variants = [], { useFipsEndpoint, useDualstackEndpoint }) => variants.find(\n ({ tags }) => useFipsEndpoint === tags.includes(\"fips\") && useDualstackEndpoint === tags.includes(\"dualstack\")\n)?.hostname, \"getHostnameFromVariants\");\n\n// src/regionInfo/getResolvedHostname.ts\nvar getResolvedHostname = /* @__PURE__ */ __name((resolvedRegion, { regionHostname, partitionHostname }) => regionHostname ? regionHostname : partitionHostname ? partitionHostname.replace(\"{region}\", resolvedRegion) : void 0, \"getResolvedHostname\");\n\n// src/regionInfo/getResolvedPartition.ts\nvar getResolvedPartition = /* @__PURE__ */ __name((region, { partitionHash }) => Object.keys(partitionHash || {}).find((key) => partitionHash[key].regions.includes(region)) ?? \"aws\", \"getResolvedPartition\");\n\n// src/regionInfo/getResolvedSigningRegion.ts\nvar getResolvedSigningRegion = /* @__PURE__ */ __name((hostname, { signingRegion, regionRegex, useFipsEndpoint }) => {\n if (signingRegion) {\n return signingRegion;\n } else if (useFipsEndpoint) {\n const regionRegexJs = regionRegex.replace(\"\\\\\\\\\", \"\\\\\").replace(/^\\^/g, \"\\\\.\").replace(/\\$$/g, \"\\\\.\");\n const regionRegexmatchArray = hostname.match(regionRegexJs);\n if (regionRegexmatchArray) {\n return regionRegexmatchArray[0].slice(1, -1);\n }\n }\n}, \"getResolvedSigningRegion\");\n\n// src/regionInfo/getRegionInfo.ts\nvar getRegionInfo = /* @__PURE__ */ __name((region, {\n useFipsEndpoint = false,\n useDualstackEndpoint = false,\n signingService,\n regionHash,\n partitionHash\n}) => {\n const partition = getResolvedPartition(region, { partitionHash });\n const resolvedRegion = region in regionHash ? region : partitionHash[partition]?.endpoint ?? region;\n const hostnameOptions = { useFipsEndpoint, useDualstackEndpoint };\n const regionHostname = getHostnameFromVariants(regionHash[resolvedRegion]?.variants, hostnameOptions);\n const partitionHostname = getHostnameFromVariants(partitionHash[partition]?.variants, hostnameOptions);\n const hostname = getResolvedHostname(resolvedRegion, { regionHostname, partitionHostname });\n if (hostname === void 0) {\n throw new Error(`Endpoint resolution failed for: ${{ resolvedRegion, useFipsEndpoint, useDualstackEndpoint }}`);\n }\n const signingRegion = getResolvedSigningRegion(hostname, {\n signingRegion: regionHash[resolvedRegion]?.signingRegion,\n regionRegex: partitionHash[partition].regionRegex,\n useFipsEndpoint\n });\n return {\n partition,\n signingService,\n hostname,\n ...signingRegion && { signingRegion },\n ...regionHash[resolvedRegion]?.signingService && {\n signingService: regionHash[resolvedRegion].signingService\n }\n };\n}, \"getRegionInfo\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n ENV_USE_DUALSTACK_ENDPOINT,\n CONFIG_USE_DUALSTACK_ENDPOINT,\n DEFAULT_USE_DUALSTACK_ENDPOINT,\n NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS,\n ENV_USE_FIPS_ENDPOINT,\n CONFIG_USE_FIPS_ENDPOINT,\n DEFAULT_USE_FIPS_ENDPOINT,\n NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS,\n resolveCustomEndpointsConfig,\n resolveEndpointsConfig,\n REGION_ENV_NAME,\n REGION_INI_NAME,\n NODE_REGION_CONFIG_OPTIONS,\n NODE_REGION_CONFIG_FILE_OPTIONS,\n resolveRegionConfig,\n getRegionInfo\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n DefaultIdentityProviderConfig: () => DefaultIdentityProviderConfig,\n EXPIRATION_MS: () => EXPIRATION_MS,\n HttpApiKeyAuthSigner: () => HttpApiKeyAuthSigner,\n HttpBearerAuthSigner: () => HttpBearerAuthSigner,\n NoAuthSigner: () => NoAuthSigner,\n createIsIdentityExpiredFunction: () => createIsIdentityExpiredFunction,\n createPaginator: () => createPaginator,\n doesIdentityRequireRefresh: () => doesIdentityRequireRefresh,\n getHttpAuthSchemeEndpointRuleSetPlugin: () => getHttpAuthSchemeEndpointRuleSetPlugin,\n getHttpAuthSchemePlugin: () => getHttpAuthSchemePlugin,\n getHttpSigningPlugin: () => getHttpSigningPlugin,\n getSmithyContext: () => getSmithyContext,\n httpAuthSchemeEndpointRuleSetMiddlewareOptions: () => httpAuthSchemeEndpointRuleSetMiddlewareOptions,\n httpAuthSchemeMiddleware: () => httpAuthSchemeMiddleware,\n httpAuthSchemeMiddlewareOptions: () => httpAuthSchemeMiddlewareOptions,\n httpSigningMiddleware: () => httpSigningMiddleware,\n httpSigningMiddlewareOptions: () => httpSigningMiddlewareOptions,\n isIdentityExpired: () => isIdentityExpired,\n memoizeIdentityProvider: () => memoizeIdentityProvider,\n normalizeProvider: () => normalizeProvider,\n requestBuilder: () => import_protocols.requestBuilder,\n setFeature: () => setFeature\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/getSmithyContext.ts\nvar import_types = require(\"@smithy/types\");\nvar getSmithyContext = /* @__PURE__ */ __name((context) => context[import_types.SMITHY_CONTEXT_KEY] || (context[import_types.SMITHY_CONTEXT_KEY] = {}), \"getSmithyContext\");\n\n// src/middleware-http-auth-scheme/httpAuthSchemeMiddleware.ts\nvar import_util_middleware = require(\"@smithy/util-middleware\");\n\n// src/middleware-http-auth-scheme/resolveAuthOptions.ts\nvar resolveAuthOptions = /* @__PURE__ */ __name((candidateAuthOptions, authSchemePreference) => {\n if (!authSchemePreference || authSchemePreference.length === 0) {\n return candidateAuthOptions;\n }\n const preferredAuthOptions = [];\n for (const preferredSchemeName of authSchemePreference) {\n for (const candidateAuthOption of candidateAuthOptions) {\n const candidateAuthSchemeName = candidateAuthOption.schemeId.split(\"#\")[1];\n if (candidateAuthSchemeName === preferredSchemeName) {\n preferredAuthOptions.push(candidateAuthOption);\n }\n }\n }\n for (const candidateAuthOption of candidateAuthOptions) {\n if (!preferredAuthOptions.find(({ schemeId }) => schemeId === candidateAuthOption.schemeId)) {\n preferredAuthOptions.push(candidateAuthOption);\n }\n }\n return preferredAuthOptions;\n}, \"resolveAuthOptions\");\n\n// src/middleware-http-auth-scheme/httpAuthSchemeMiddleware.ts\nfunction convertHttpAuthSchemesToMap(httpAuthSchemes) {\n const map = /* @__PURE__ */ new Map();\n for (const scheme of httpAuthSchemes) {\n map.set(scheme.schemeId, scheme);\n }\n return map;\n}\n__name(convertHttpAuthSchemesToMap, \"convertHttpAuthSchemesToMap\");\nvar httpAuthSchemeMiddleware = /* @__PURE__ */ __name((config, mwOptions) => (next, context) => async (args) => {\n const options = config.httpAuthSchemeProvider(\n await mwOptions.httpAuthSchemeParametersProvider(config, context, args.input)\n );\n const authSchemePreference = config.authSchemePreference ? await config.authSchemePreference() : [];\n const resolvedOptions = resolveAuthOptions(options, authSchemePreference);\n const authSchemes = convertHttpAuthSchemesToMap(config.httpAuthSchemes);\n const smithyContext = (0, import_util_middleware.getSmithyContext)(context);\n const failureReasons = [];\n for (const option of resolvedOptions) {\n const scheme = authSchemes.get(option.schemeId);\n if (!scheme) {\n failureReasons.push(`HttpAuthScheme \\`${option.schemeId}\\` was not enabled for this service.`);\n continue;\n }\n const identityProvider = scheme.identityProvider(await mwOptions.identityProviderConfigProvider(config));\n if (!identityProvider) {\n failureReasons.push(`HttpAuthScheme \\`${option.schemeId}\\` did not have an IdentityProvider configured.`);\n continue;\n }\n const { identityProperties = {}, signingProperties = {} } = option.propertiesExtractor?.(config, context) || {};\n option.identityProperties = Object.assign(option.identityProperties || {}, identityProperties);\n option.signingProperties = Object.assign(option.signingProperties || {}, signingProperties);\n smithyContext.selectedHttpAuthScheme = {\n httpAuthOption: option,\n identity: await identityProvider(option.identityProperties),\n signer: scheme.signer\n };\n break;\n }\n if (!smithyContext.selectedHttpAuthScheme) {\n throw new Error(failureReasons.join(\"\\n\"));\n }\n return next(args);\n}, \"httpAuthSchemeMiddleware\");\n\n// src/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.ts\nvar httpAuthSchemeEndpointRuleSetMiddlewareOptions = {\n step: \"serialize\",\n tags: [\"HTTP_AUTH_SCHEME\"],\n name: \"httpAuthSchemeMiddleware\",\n override: true,\n relation: \"before\",\n toMiddleware: \"endpointV2Middleware\"\n};\nvar getHttpAuthSchemeEndpointRuleSetPlugin = /* @__PURE__ */ __name((config, {\n httpAuthSchemeParametersProvider,\n identityProviderConfigProvider\n}) => ({\n applyToStack: (clientStack) => {\n clientStack.addRelativeTo(\n httpAuthSchemeMiddleware(config, {\n httpAuthSchemeParametersProvider,\n identityProviderConfigProvider\n }),\n httpAuthSchemeEndpointRuleSetMiddlewareOptions\n );\n }\n}), \"getHttpAuthSchemeEndpointRuleSetPlugin\");\n\n// src/middleware-http-auth-scheme/getHttpAuthSchemePlugin.ts\nvar import_middleware_serde = require(\"@smithy/middleware-serde\");\nvar httpAuthSchemeMiddlewareOptions = {\n step: \"serialize\",\n tags: [\"HTTP_AUTH_SCHEME\"],\n name: \"httpAuthSchemeMiddleware\",\n override: true,\n relation: \"before\",\n toMiddleware: import_middleware_serde.serializerMiddlewareOption.name\n};\nvar getHttpAuthSchemePlugin = /* @__PURE__ */ __name((config, {\n httpAuthSchemeParametersProvider,\n identityProviderConfigProvider\n}) => ({\n applyToStack: (clientStack) => {\n clientStack.addRelativeTo(\n httpAuthSchemeMiddleware(config, {\n httpAuthSchemeParametersProvider,\n identityProviderConfigProvider\n }),\n httpAuthSchemeMiddlewareOptions\n );\n }\n}), \"getHttpAuthSchemePlugin\");\n\n// src/middleware-http-signing/httpSigningMiddleware.ts\nvar import_protocol_http = require(\"@smithy/protocol-http\");\n\nvar defaultErrorHandler = /* @__PURE__ */ __name((signingProperties) => (error) => {\n throw error;\n}, \"defaultErrorHandler\");\nvar defaultSuccessHandler = /* @__PURE__ */ __name((httpResponse, signingProperties) => {\n}, \"defaultSuccessHandler\");\nvar httpSigningMiddleware = /* @__PURE__ */ __name((config) => (next, context) => async (args) => {\n if (!import_protocol_http.HttpRequest.isInstance(args.request)) {\n return next(args);\n }\n const smithyContext = (0, import_util_middleware.getSmithyContext)(context);\n const scheme = smithyContext.selectedHttpAuthScheme;\n if (!scheme) {\n throw new Error(`No HttpAuthScheme was selected: unable to sign request`);\n }\n const {\n httpAuthOption: { signingProperties = {} },\n identity,\n signer\n } = scheme;\n const output = await next({\n ...args,\n request: await signer.sign(args.request, identity, signingProperties)\n }).catch((signer.errorHandler || defaultErrorHandler)(signingProperties));\n (signer.successHandler || defaultSuccessHandler)(output.response, signingProperties);\n return output;\n}, \"httpSigningMiddleware\");\n\n// src/middleware-http-signing/getHttpSigningMiddleware.ts\nvar httpSigningMiddlewareOptions = {\n step: \"finalizeRequest\",\n tags: [\"HTTP_SIGNING\"],\n name: \"httpSigningMiddleware\",\n aliases: [\"apiKeyMiddleware\", \"tokenMiddleware\", \"awsAuthMiddleware\"],\n override: true,\n relation: \"after\",\n toMiddleware: \"retryMiddleware\"\n};\nvar getHttpSigningPlugin = /* @__PURE__ */ __name((config) => ({\n applyToStack: (clientStack) => {\n clientStack.addRelativeTo(httpSigningMiddleware(config), httpSigningMiddlewareOptions);\n }\n}), \"getHttpSigningPlugin\");\n\n// src/normalizeProvider.ts\nvar normalizeProvider = /* @__PURE__ */ __name((input) => {\n if (typeof input === \"function\")\n return input;\n const promisified = Promise.resolve(input);\n return () => promisified;\n}, \"normalizeProvider\");\n\n// src/pagination/createPaginator.ts\nvar makePagedClientRequest = /* @__PURE__ */ __name(async (CommandCtor, client, input, withCommand = (_) => _, ...args) => {\n let command = new CommandCtor(input);\n command = withCommand(command) ?? command;\n return await client.send(command, ...args);\n}, \"makePagedClientRequest\");\nfunction createPaginator(ClientCtor, CommandCtor, inputTokenName, outputTokenName, pageSizeTokenName) {\n return /* @__PURE__ */ __name(async function* paginateOperation(config, input, ...additionalArguments) {\n const _input = input;\n let token = config.startingToken ?? _input[inputTokenName];\n let hasNext = true;\n let page;\n while (hasNext) {\n _input[inputTokenName] = token;\n if (pageSizeTokenName) {\n _input[pageSizeTokenName] = _input[pageSizeTokenName] ?? config.pageSize;\n }\n if (config.client instanceof ClientCtor) {\n page = await makePagedClientRequest(\n CommandCtor,\n config.client,\n input,\n config.withCommand,\n ...additionalArguments\n );\n } else {\n throw new Error(`Invalid client, expected instance of ${ClientCtor.name}`);\n }\n yield page;\n const prevToken = token;\n token = get(page, outputTokenName);\n hasNext = !!(token && (!config.stopOnSameToken || token !== prevToken));\n }\n return void 0;\n }, \"paginateOperation\");\n}\n__name(createPaginator, \"createPaginator\");\nvar get = /* @__PURE__ */ __name((fromObject, path) => {\n let cursor = fromObject;\n const pathComponents = path.split(\".\");\n for (const step of pathComponents) {\n if (!cursor || typeof cursor !== \"object\") {\n return void 0;\n }\n cursor = cursor[step];\n }\n return cursor;\n}, \"get\");\n\n// src/protocols/requestBuilder.ts\nvar import_protocols = require(\"@smithy/core/protocols\");\n\n// src/setFeature.ts\nfunction setFeature(context, feature, value) {\n if (!context.__smithy_context) {\n context.__smithy_context = {\n features: {}\n };\n } else if (!context.__smithy_context.features) {\n context.__smithy_context.features = {};\n }\n context.__smithy_context.features[feature] = value;\n}\n__name(setFeature, \"setFeature\");\n\n// src/util-identity-and-auth/DefaultIdentityProviderConfig.ts\nvar DefaultIdentityProviderConfig = class {\n /**\n * Creates an IdentityProviderConfig with a record of scheme IDs to identity providers.\n *\n * @param config scheme IDs and identity providers to configure\n */\n constructor(config) {\n this.authSchemes = /* @__PURE__ */ new Map();\n for (const [key, value] of Object.entries(config)) {\n if (value !== void 0) {\n this.authSchemes.set(key, value);\n }\n }\n }\n static {\n __name(this, \"DefaultIdentityProviderConfig\");\n }\n getIdentityProvider(schemeId) {\n return this.authSchemes.get(schemeId);\n }\n};\n\n// src/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.ts\n\n\nvar HttpApiKeyAuthSigner = class {\n static {\n __name(this, \"HttpApiKeyAuthSigner\");\n }\n async sign(httpRequest, identity, signingProperties) {\n if (!signingProperties) {\n throw new Error(\n \"request could not be signed with `apiKey` since the `name` and `in` signer properties are missing\"\n );\n }\n if (!signingProperties.name) {\n throw new Error(\"request could not be signed with `apiKey` since the `name` signer property is missing\");\n }\n if (!signingProperties.in) {\n throw new Error(\"request could not be signed with `apiKey` since the `in` signer property is missing\");\n }\n if (!identity.apiKey) {\n throw new Error(\"request could not be signed with `apiKey` since the `apiKey` is not defined\");\n }\n const clonedRequest = import_protocol_http.HttpRequest.clone(httpRequest);\n if (signingProperties.in === import_types.HttpApiKeyAuthLocation.QUERY) {\n clonedRequest.query[signingProperties.name] = identity.apiKey;\n } else if (signingProperties.in === import_types.HttpApiKeyAuthLocation.HEADER) {\n clonedRequest.headers[signingProperties.name] = signingProperties.scheme ? `${signingProperties.scheme} ${identity.apiKey}` : identity.apiKey;\n } else {\n throw new Error(\n \"request can only be signed with `apiKey` locations `query` or `header`, but found: `\" + signingProperties.in + \"`\"\n );\n }\n return clonedRequest;\n }\n};\n\n// src/util-identity-and-auth/httpAuthSchemes/httpBearerAuth.ts\n\nvar HttpBearerAuthSigner = class {\n static {\n __name(this, \"HttpBearerAuthSigner\");\n }\n async sign(httpRequest, identity, signingProperties) {\n const clonedRequest = import_protocol_http.HttpRequest.clone(httpRequest);\n if (!identity.token) {\n throw new Error(\"request could not be signed with `token` since the `token` is not defined\");\n }\n clonedRequest.headers[\"Authorization\"] = `Bearer ${identity.token}`;\n return clonedRequest;\n }\n};\n\n// src/util-identity-and-auth/httpAuthSchemes/noAuth.ts\nvar NoAuthSigner = class {\n static {\n __name(this, \"NoAuthSigner\");\n }\n async sign(httpRequest, identity, signingProperties) {\n return httpRequest;\n }\n};\n\n// src/util-identity-and-auth/memoizeIdentityProvider.ts\nvar createIsIdentityExpiredFunction = /* @__PURE__ */ __name((expirationMs) => (identity) => doesIdentityRequireRefresh(identity) && identity.expiration.getTime() - Date.now() < expirationMs, \"createIsIdentityExpiredFunction\");\nvar EXPIRATION_MS = 3e5;\nvar isIdentityExpired = createIsIdentityExpiredFunction(EXPIRATION_MS);\nvar doesIdentityRequireRefresh = /* @__PURE__ */ __name((identity) => identity.expiration !== void 0, \"doesIdentityRequireRefresh\");\nvar memoizeIdentityProvider = /* @__PURE__ */ __name((provider, isExpired, requiresRefresh) => {\n if (provider === void 0) {\n return void 0;\n }\n const normalizedProvider = typeof provider !== \"function\" ? async () => Promise.resolve(provider) : provider;\n let resolved;\n let pending;\n let hasResult;\n let isConstant = false;\n const coalesceProvider = /* @__PURE__ */ __name(async (options) => {\n if (!pending) {\n pending = normalizedProvider(options);\n }\n try {\n resolved = await pending;\n hasResult = true;\n isConstant = false;\n } finally {\n pending = void 0;\n }\n return resolved;\n }, \"coalesceProvider\");\n if (isExpired === void 0) {\n return async (options) => {\n if (!hasResult || options?.forceRefresh) {\n resolved = await coalesceProvider(options);\n }\n return resolved;\n };\n }\n return async (options) => {\n if (!hasResult || options?.forceRefresh) {\n resolved = await coalesceProvider(options);\n }\n if (isConstant) {\n return resolved;\n }\n if (!requiresRefresh(resolved)) {\n isConstant = true;\n return resolved;\n }\n if (isExpired(resolved)) {\n await coalesceProvider(options);\n return resolved;\n }\n return resolved;\n };\n}, \"memoizeIdentityProvider\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n createPaginator,\n getSmithyContext,\n httpAuthSchemeMiddleware,\n httpAuthSchemeEndpointRuleSetMiddlewareOptions,\n getHttpAuthSchemeEndpointRuleSetPlugin,\n httpAuthSchemeMiddlewareOptions,\n getHttpAuthSchemePlugin,\n httpSigningMiddleware,\n httpSigningMiddlewareOptions,\n getHttpSigningPlugin,\n normalizeProvider,\n requestBuilder,\n setFeature,\n DefaultIdentityProviderConfig,\n HttpApiKeyAuthSigner,\n HttpBearerAuthSigner,\n NoAuthSigner,\n createIsIdentityExpiredFunction,\n EXPIRATION_MS,\n isIdentityExpired,\n doesIdentityRequireRefresh,\n memoizeIdentityProvider\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/submodules/protocols/index.ts\nvar protocols_exports = {};\n__export(protocols_exports, {\n FromStringShapeDeserializer: () => FromStringShapeDeserializer,\n HttpBindingProtocol: () => HttpBindingProtocol,\n HttpInterceptingShapeDeserializer: () => HttpInterceptingShapeDeserializer,\n HttpInterceptingShapeSerializer: () => HttpInterceptingShapeSerializer,\n RequestBuilder: () => RequestBuilder,\n RpcProtocol: () => RpcProtocol,\n ToStringShapeSerializer: () => ToStringShapeSerializer,\n collectBody: () => collectBody,\n determineTimestampFormat: () => determineTimestampFormat,\n extendedEncodeURIComponent: () => extendedEncodeURIComponent,\n requestBuilder: () => requestBuilder,\n resolvedPath: () => resolvedPath\n});\nmodule.exports = __toCommonJS(protocols_exports);\n\n// src/submodules/protocols/collect-stream-body.ts\nvar import_util_stream = require(\"@smithy/util-stream\");\nvar collectBody = async (streamBody = new Uint8Array(), context) => {\n if (streamBody instanceof Uint8Array) {\n return import_util_stream.Uint8ArrayBlobAdapter.mutate(streamBody);\n }\n if (!streamBody) {\n return import_util_stream.Uint8ArrayBlobAdapter.mutate(new Uint8Array());\n }\n const fromContext = context.streamCollector(streamBody);\n return import_util_stream.Uint8ArrayBlobAdapter.mutate(await fromContext);\n};\n\n// src/submodules/protocols/extended-encode-uri-component.ts\nfunction extendedEncodeURIComponent(str) {\n return encodeURIComponent(str).replace(/[!'()*]/g, function(c) {\n return \"%\" + c.charCodeAt(0).toString(16).toUpperCase();\n });\n}\n\n// src/submodules/protocols/HttpBindingProtocol.ts\nvar import_schema2 = require(\"@smithy/core/schema\");\nvar import_protocol_http2 = require(\"@smithy/protocol-http\");\n\n// src/submodules/protocols/HttpProtocol.ts\nvar import_schema = require(\"@smithy/core/schema\");\nvar import_serde = require(\"@smithy/core/serde\");\nvar import_protocol_http = require(\"@smithy/protocol-http\");\nvar import_util_stream2 = require(\"@smithy/util-stream\");\nvar HttpProtocol = class {\n constructor(options) {\n this.options = options;\n }\n getRequestType() {\n return import_protocol_http.HttpRequest;\n }\n getResponseType() {\n return import_protocol_http.HttpResponse;\n }\n setSerdeContext(serdeContext) {\n this.serdeContext = serdeContext;\n this.serializer.setSerdeContext(serdeContext);\n this.deserializer.setSerdeContext(serdeContext);\n if (this.getPayloadCodec()) {\n this.getPayloadCodec().setSerdeContext(serdeContext);\n }\n }\n updateServiceEndpoint(request, endpoint) {\n if (\"url\" in endpoint) {\n request.protocol = endpoint.url.protocol;\n request.hostname = endpoint.url.hostname;\n request.port = endpoint.url.port ? Number(endpoint.url.port) : void 0;\n request.path = endpoint.url.pathname;\n request.fragment = endpoint.url.hash || void 0;\n request.username = endpoint.url.username || void 0;\n request.password = endpoint.url.password || void 0;\n for (const [k, v] of endpoint.url.searchParams.entries()) {\n if (!request.query) {\n request.query = {};\n }\n request.query[k] = v;\n }\n return request;\n } else {\n request.protocol = endpoint.protocol;\n request.hostname = endpoint.hostname;\n request.port = endpoint.port ? Number(endpoint.port) : void 0;\n request.path = endpoint.path;\n request.query = {\n ...endpoint.query\n };\n return request;\n }\n }\n setHostPrefix(request, operationSchema, input) {\n const operationNs = import_schema.NormalizedSchema.of(operationSchema);\n const inputNs = import_schema.NormalizedSchema.of(operationSchema.input);\n if (operationNs.getMergedTraits().endpoint) {\n let hostPrefix = operationNs.getMergedTraits().endpoint?.[0];\n if (typeof hostPrefix === \"string\") {\n const hostLabelInputs = [...inputNs.structIterator()].filter(\n ([, member]) => member.getMergedTraits().hostLabel\n );\n for (const [name] of hostLabelInputs) {\n const replacement = input[name];\n if (typeof replacement !== \"string\") {\n throw new Error(`@smithy/core/schema - ${name} in input must be a string as hostLabel.`);\n }\n hostPrefix = hostPrefix.replace(`{${name}}`, replacement);\n }\n request.hostname = hostPrefix + request.hostname;\n }\n }\n }\n deserializeMetadata(output) {\n return {\n httpStatusCode: output.statusCode,\n requestId: output.headers[\"x-amzn-requestid\"] ?? output.headers[\"x-amzn-request-id\"] ?? output.headers[\"x-amz-request-id\"],\n extendedRequestId: output.headers[\"x-amz-id-2\"],\n cfId: output.headers[\"x-amz-cf-id\"]\n };\n }\n async deserializeHttpMessage(schema, context, response, arg4, arg5) {\n let dataObject;\n if (arg4 instanceof Set) {\n dataObject = arg5;\n } else {\n dataObject = arg4;\n }\n const deserializer = this.deserializer;\n const ns = import_schema.NormalizedSchema.of(schema);\n const nonHttpBindingMembers = [];\n for (const [memberName, memberSchema] of ns.structIterator()) {\n const memberTraits = memberSchema.getMemberTraits();\n if (memberTraits.httpPayload) {\n const isStreaming = memberSchema.isStreaming();\n if (isStreaming) {\n const isEventStream = memberSchema.isStructSchema();\n if (isEventStream) {\n const context2 = this.serdeContext;\n if (!context2.eventStreamMarshaller) {\n throw new Error(\"@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext.\");\n }\n const memberSchemas = memberSchema.getMemberSchemas();\n dataObject[memberName] = context2.eventStreamMarshaller.deserialize(response.body, async (event) => {\n const unionMember = Object.keys(event).find((key) => {\n return key !== \"__type\";\n }) ?? \"\";\n if (unionMember in memberSchemas) {\n const eventStreamSchema = memberSchemas[unionMember];\n return {\n [unionMember]: await deserializer.read(eventStreamSchema, event[unionMember].body)\n };\n } else {\n return {\n $unknown: event\n };\n }\n });\n } else {\n dataObject[memberName] = (0, import_util_stream2.sdkStreamMixin)(response.body);\n }\n } else if (response.body) {\n const bytes = await collectBody(response.body, context);\n if (bytes.byteLength > 0) {\n dataObject[memberName] = await deserializer.read(memberSchema, bytes);\n }\n }\n } else if (memberTraits.httpHeader) {\n const key = String(memberTraits.httpHeader).toLowerCase();\n const value = response.headers[key];\n if (null != value) {\n if (memberSchema.isListSchema()) {\n const headerListValueSchema = memberSchema.getValueSchema();\n let sections;\n if (headerListValueSchema.isTimestampSchema() && headerListValueSchema.getSchema() === import_schema.SCHEMA.TIMESTAMP_DEFAULT) {\n sections = (0, import_serde.splitEvery)(value, \",\", 2);\n } else {\n sections = (0, import_serde.splitHeader)(value);\n }\n const list = [];\n for (const section of sections) {\n list.push(await deserializer.read([headerListValueSchema, { httpHeader: key }], section.trim()));\n }\n dataObject[memberName] = list;\n } else {\n dataObject[memberName] = await deserializer.read(memberSchema, value);\n }\n }\n } else if (memberTraits.httpPrefixHeaders !== void 0) {\n dataObject[memberName] = {};\n for (const [header, value] of Object.entries(response.headers)) {\n if (header.startsWith(memberTraits.httpPrefixHeaders)) {\n dataObject[memberName][header.slice(memberTraits.httpPrefixHeaders.length)] = await deserializer.read(\n [memberSchema.getValueSchema(), { httpHeader: header }],\n value\n );\n }\n }\n } else if (memberTraits.httpResponseCode) {\n dataObject[memberName] = response.statusCode;\n } else {\n nonHttpBindingMembers.push(memberName);\n }\n }\n return nonHttpBindingMembers;\n }\n};\n\n// src/submodules/protocols/HttpBindingProtocol.ts\nvar HttpBindingProtocol = class extends HttpProtocol {\n async serializeRequest(operationSchema, input, context) {\n const serializer = this.serializer;\n const query = {};\n const headers = {};\n const endpoint = await context.endpoint();\n const ns = import_schema2.NormalizedSchema.of(operationSchema?.input);\n const schema = ns.getSchema();\n let hasNonHttpBindingMember = false;\n let payload;\n const request = new import_protocol_http2.HttpRequest({\n protocol: \"\",\n hostname: \"\",\n port: void 0,\n path: \"\",\n fragment: void 0,\n query,\n headers,\n body: void 0\n });\n if (endpoint) {\n this.updateServiceEndpoint(request, endpoint);\n this.setHostPrefix(request, operationSchema, input);\n const opTraits = import_schema2.NormalizedSchema.translateTraits(operationSchema.traits);\n if (opTraits.http) {\n request.method = opTraits.http[0];\n const [path, search] = opTraits.http[1].split(\"?\");\n if (request.path == \"/\") {\n request.path = path;\n } else {\n request.path += path;\n }\n const traitSearchParams = new URLSearchParams(search ?? \"\");\n Object.assign(query, Object.fromEntries(traitSearchParams));\n }\n }\n const _input = {\n ...input\n };\n for (const memberName of Object.keys(_input)) {\n const memberNs = ns.getMemberSchema(memberName);\n if (memberNs === void 0) {\n continue;\n }\n const memberTraits = memberNs.getMergedTraits();\n const inputMember = _input[memberName];\n if (memberTraits.httpPayload) {\n const isStreaming = memberNs.isStreaming();\n if (isStreaming) {\n const isEventStream = memberNs.isStructSchema();\n if (isEventStream) {\n throw new Error(\"serialization of event streams is not yet implemented\");\n } else {\n payload = inputMember;\n }\n } else {\n serializer.write(memberNs, inputMember);\n payload = serializer.flush();\n }\n } else if (memberTraits.httpLabel) {\n serializer.write(memberNs, inputMember);\n const replacement = serializer.flush();\n if (request.path.includes(`{${memberName}+}`)) {\n request.path = request.path.replace(\n `{${memberName}+}`,\n replacement.split(\"/\").map(extendedEncodeURIComponent).join(\"/\")\n );\n } else if (request.path.includes(`{${memberName}}`)) {\n request.path = request.path.replace(`{${memberName}}`, extendedEncodeURIComponent(replacement));\n }\n delete _input[memberName];\n } else if (memberTraits.httpHeader) {\n serializer.write(memberNs, inputMember);\n headers[memberTraits.httpHeader.toLowerCase()] = String(serializer.flush());\n delete _input[memberName];\n } else if (typeof memberTraits.httpPrefixHeaders === \"string\") {\n for (const [key, val] of Object.entries(inputMember)) {\n const amalgam = memberTraits.httpPrefixHeaders + key;\n serializer.write([memberNs.getValueSchema(), { httpHeader: amalgam }], val);\n headers[amalgam.toLowerCase()] = serializer.flush();\n }\n delete _input[memberName];\n } else if (memberTraits.httpQuery || memberTraits.httpQueryParams) {\n this.serializeQuery(memberNs, inputMember, query);\n delete _input[memberName];\n } else {\n hasNonHttpBindingMember = true;\n }\n }\n if (hasNonHttpBindingMember && input) {\n serializer.write(schema, _input);\n payload = serializer.flush();\n }\n request.headers = headers;\n request.query = query;\n request.body = payload;\n return request;\n }\n serializeQuery(ns, data, query) {\n const serializer = this.serializer;\n const traits = ns.getMergedTraits();\n if (traits.httpQueryParams) {\n for (const [key, val] of Object.entries(data)) {\n if (!(key in query)) {\n this.serializeQuery(\n import_schema2.NormalizedSchema.of([\n ns.getValueSchema(),\n {\n // We pass on the traits to the sub-schema\n // because we are still in the process of serializing the map itself.\n ...traits,\n httpQuery: key,\n httpQueryParams: void 0\n }\n ]),\n val,\n query\n );\n }\n }\n return;\n }\n if (ns.isListSchema()) {\n const sparse = !!ns.getMergedTraits().sparse;\n const buffer = [];\n for (const item of data) {\n serializer.write([ns.getValueSchema(), traits], item);\n const serializable = serializer.flush();\n if (sparse || serializable !== void 0) {\n buffer.push(serializable);\n }\n }\n query[traits.httpQuery] = buffer;\n } else {\n serializer.write([ns, traits], data);\n query[traits.httpQuery] = serializer.flush();\n }\n }\n async deserializeResponse(operationSchema, context, response) {\n const deserializer = this.deserializer;\n const ns = import_schema2.NormalizedSchema.of(operationSchema.output);\n const dataObject = {};\n if (response.statusCode >= 300) {\n const bytes = await collectBody(response.body, context);\n if (bytes.byteLength > 0) {\n Object.assign(dataObject, await deserializer.read(import_schema2.SCHEMA.DOCUMENT, bytes));\n }\n await this.handleError(operationSchema, context, response, dataObject, this.deserializeMetadata(response));\n throw new Error(\"@smithy/core/protocols - HTTP Protocol error handler failed to throw.\");\n }\n for (const header in response.headers) {\n const value = response.headers[header];\n delete response.headers[header];\n response.headers[header.toLowerCase()] = value;\n }\n const nonHttpBindingMembers = await this.deserializeHttpMessage(ns, context, response, dataObject);\n if (nonHttpBindingMembers.length) {\n const bytes = await collectBody(response.body, context);\n if (bytes.byteLength > 0) {\n const dataFromBody = await deserializer.read(ns, bytes);\n for (const member of nonHttpBindingMembers) {\n dataObject[member] = dataFromBody[member];\n }\n }\n }\n const output = {\n $metadata: this.deserializeMetadata(response),\n ...dataObject\n };\n return output;\n }\n};\n\n// src/submodules/protocols/RpcProtocol.ts\nvar import_schema3 = require(\"@smithy/core/schema\");\nvar import_protocol_http3 = require(\"@smithy/protocol-http\");\nvar RpcProtocol = class extends HttpProtocol {\n async serializeRequest(operationSchema, input, context) {\n const serializer = this.serializer;\n const query = {};\n const headers = {};\n const endpoint = await context.endpoint();\n const ns = import_schema3.NormalizedSchema.of(operationSchema?.input);\n const schema = ns.getSchema();\n let payload;\n const request = new import_protocol_http3.HttpRequest({\n protocol: \"\",\n hostname: \"\",\n port: void 0,\n path: \"/\",\n fragment: void 0,\n query,\n headers,\n body: void 0\n });\n if (endpoint) {\n this.updateServiceEndpoint(request, endpoint);\n this.setHostPrefix(request, operationSchema, input);\n }\n const _input = {\n ...input\n };\n if (input) {\n serializer.write(schema, _input);\n payload = serializer.flush();\n }\n request.headers = headers;\n request.query = query;\n request.body = payload;\n request.method = \"POST\";\n return request;\n }\n async deserializeResponse(operationSchema, context, response) {\n const deserializer = this.deserializer;\n const ns = import_schema3.NormalizedSchema.of(operationSchema.output);\n const dataObject = {};\n if (response.statusCode >= 300) {\n const bytes2 = await collectBody(response.body, context);\n if (bytes2.byteLength > 0) {\n Object.assign(dataObject, await deserializer.read(import_schema3.SCHEMA.DOCUMENT, bytes2));\n }\n await this.handleError(operationSchema, context, response, dataObject, this.deserializeMetadata(response));\n throw new Error(\"@smithy/core/protocols - RPC Protocol error handler failed to throw.\");\n }\n for (const header in response.headers) {\n const value = response.headers[header];\n delete response.headers[header];\n response.headers[header.toLowerCase()] = value;\n }\n const bytes = await collectBody(response.body, context);\n if (bytes.byteLength > 0) {\n Object.assign(dataObject, await deserializer.read(ns, bytes));\n }\n const output = {\n $metadata: this.deserializeMetadata(response),\n ...dataObject\n };\n return output;\n }\n};\n\n// src/submodules/protocols/requestBuilder.ts\nvar import_protocol_http4 = require(\"@smithy/protocol-http\");\n\n// src/submodules/protocols/resolve-path.ts\nvar resolvedPath = (resolvedPath2, input, memberName, labelValueProvider, uriLabel, isGreedyLabel) => {\n if (input != null && input[memberName] !== void 0) {\n const labelValue = labelValueProvider();\n if (labelValue.length <= 0) {\n throw new Error(\"Empty value provided for input HTTP label: \" + memberName + \".\");\n }\n resolvedPath2 = resolvedPath2.replace(\n uriLabel,\n isGreedyLabel ? labelValue.split(\"/\").map((segment) => extendedEncodeURIComponent(segment)).join(\"/\") : extendedEncodeURIComponent(labelValue)\n );\n } else {\n throw new Error(\"No value provided for input HTTP label: \" + memberName + \".\");\n }\n return resolvedPath2;\n};\n\n// src/submodules/protocols/requestBuilder.ts\nfunction requestBuilder(input, context) {\n return new RequestBuilder(input, context);\n}\nvar RequestBuilder = class {\n constructor(input, context) {\n this.input = input;\n this.context = context;\n this.query = {};\n this.method = \"\";\n this.headers = {};\n this.path = \"\";\n this.body = null;\n this.hostname = \"\";\n this.resolvePathStack = [];\n }\n async build() {\n const { hostname, protocol = \"https\", port, path: basePath } = await this.context.endpoint();\n this.path = basePath;\n for (const resolvePath of this.resolvePathStack) {\n resolvePath(this.path);\n }\n return new import_protocol_http4.HttpRequest({\n protocol,\n hostname: this.hostname || hostname,\n port,\n method: this.method,\n path: this.path,\n query: this.query,\n body: this.body,\n headers: this.headers\n });\n }\n /**\n * Brevity setter for \"hostname\".\n */\n hn(hostname) {\n this.hostname = hostname;\n return this;\n }\n /**\n * Brevity initial builder for \"basepath\".\n */\n bp(uriLabel) {\n this.resolvePathStack.push((basePath) => {\n this.path = `${basePath?.endsWith(\"/\") ? basePath.slice(0, -1) : basePath || \"\"}` + uriLabel;\n });\n return this;\n }\n /**\n * Brevity incremental builder for \"path\".\n */\n p(memberName, labelValueProvider, uriLabel, isGreedyLabel) {\n this.resolvePathStack.push((path) => {\n this.path = resolvedPath(path, this.input, memberName, labelValueProvider, uriLabel, isGreedyLabel);\n });\n return this;\n }\n /**\n * Brevity setter for \"headers\".\n */\n h(headers) {\n this.headers = headers;\n return this;\n }\n /**\n * Brevity setter for \"query\".\n */\n q(query) {\n this.query = query;\n return this;\n }\n /**\n * Brevity setter for \"body\".\n */\n b(body) {\n this.body = body;\n return this;\n }\n /**\n * Brevity setter for \"method\".\n */\n m(method) {\n this.method = method;\n return this;\n }\n};\n\n// src/submodules/protocols/serde/FromStringShapeDeserializer.ts\nvar import_schema5 = require(\"@smithy/core/schema\");\nvar import_serde2 = require(\"@smithy/core/serde\");\nvar import_util_base64 = require(\"@smithy/util-base64\");\nvar import_util_utf8 = require(\"@smithy/util-utf8\");\n\n// src/submodules/protocols/serde/determineTimestampFormat.ts\nvar import_schema4 = require(\"@smithy/core/schema\");\nfunction determineTimestampFormat(ns, settings) {\n if (settings.timestampFormat.useTrait) {\n if (ns.isTimestampSchema() && (ns.getSchema() === import_schema4.SCHEMA.TIMESTAMP_DATE_TIME || ns.getSchema() === import_schema4.SCHEMA.TIMESTAMP_HTTP_DATE || ns.getSchema() === import_schema4.SCHEMA.TIMESTAMP_EPOCH_SECONDS)) {\n return ns.getSchema();\n }\n }\n const { httpLabel, httpPrefixHeaders, httpHeader, httpQuery } = ns.getMergedTraits();\n const bindingFormat = settings.httpBindings ? typeof httpPrefixHeaders === \"string\" || Boolean(httpHeader) ? import_schema4.SCHEMA.TIMESTAMP_HTTP_DATE : Boolean(httpQuery) || Boolean(httpLabel) ? import_schema4.SCHEMA.TIMESTAMP_DATE_TIME : void 0 : void 0;\n return bindingFormat ?? settings.timestampFormat.default;\n}\n\n// src/submodules/protocols/serde/FromStringShapeDeserializer.ts\nvar FromStringShapeDeserializer = class {\n constructor(settings) {\n this.settings = settings;\n }\n setSerdeContext(serdeContext) {\n this.serdeContext = serdeContext;\n }\n read(_schema, data) {\n const ns = import_schema5.NormalizedSchema.of(_schema);\n if (ns.isListSchema()) {\n return (0, import_serde2.splitHeader)(data).map((item) => this.read(ns.getValueSchema(), item));\n }\n if (ns.isBlobSchema()) {\n return (this.serdeContext?.base64Decoder ?? import_util_base64.fromBase64)(data);\n }\n if (ns.isTimestampSchema()) {\n const format = determineTimestampFormat(ns, this.settings);\n switch (format) {\n case import_schema5.SCHEMA.TIMESTAMP_DATE_TIME:\n return (0, import_serde2.parseRfc3339DateTimeWithOffset)(data);\n case import_schema5.SCHEMA.TIMESTAMP_HTTP_DATE:\n return (0, import_serde2.parseRfc7231DateTime)(data);\n case import_schema5.SCHEMA.TIMESTAMP_EPOCH_SECONDS:\n return (0, import_serde2.parseEpochTimestamp)(data);\n default:\n console.warn(\"Missing timestamp format, parsing value with Date constructor:\", data);\n return new Date(data);\n }\n }\n if (ns.isStringSchema()) {\n const mediaType = ns.getMergedTraits().mediaType;\n let intermediateValue = data;\n if (mediaType) {\n if (ns.getMergedTraits().httpHeader) {\n intermediateValue = this.base64ToUtf8(intermediateValue);\n }\n const isJson = mediaType === \"application/json\" || mediaType.endsWith(\"+json\");\n if (isJson) {\n intermediateValue = import_serde2.LazyJsonString.from(intermediateValue);\n }\n return intermediateValue;\n }\n }\n switch (true) {\n case ns.isNumericSchema():\n return Number(data);\n case ns.isBigIntegerSchema():\n return BigInt(data);\n case ns.isBigDecimalSchema():\n return new import_serde2.NumericValue(data, \"bigDecimal\");\n case ns.isBooleanSchema():\n return String(data).toLowerCase() === \"true\";\n }\n return data;\n }\n base64ToUtf8(base64String) {\n return (this.serdeContext?.utf8Encoder ?? import_util_utf8.toUtf8)((this.serdeContext?.base64Decoder ?? import_util_base64.fromBase64)(base64String));\n }\n};\n\n// src/submodules/protocols/serde/HttpInterceptingShapeDeserializer.ts\nvar import_schema6 = require(\"@smithy/core/schema\");\nvar import_util_utf82 = require(\"@smithy/util-utf8\");\nvar HttpInterceptingShapeDeserializer = class {\n constructor(codecDeserializer, codecSettings) {\n this.codecDeserializer = codecDeserializer;\n this.stringDeserializer = new FromStringShapeDeserializer(codecSettings);\n }\n setSerdeContext(serdeContext) {\n this.stringDeserializer.setSerdeContext(serdeContext);\n this.codecDeserializer.setSerdeContext(serdeContext);\n this.serdeContext = serdeContext;\n }\n read(schema, data) {\n const ns = import_schema6.NormalizedSchema.of(schema);\n const traits = ns.getMergedTraits();\n const toString = this.serdeContext?.utf8Encoder ?? import_util_utf82.toUtf8;\n if (traits.httpHeader || traits.httpResponseCode) {\n return this.stringDeserializer.read(ns, toString(data));\n }\n if (traits.httpPayload) {\n if (ns.isBlobSchema()) {\n const toBytes = this.serdeContext?.utf8Decoder ?? import_util_utf82.fromUtf8;\n if (typeof data === \"string\") {\n return toBytes(data);\n }\n return data;\n } else if (ns.isStringSchema()) {\n if (\"byteLength\" in data) {\n return toString(data);\n }\n return data;\n }\n }\n return this.codecDeserializer.read(ns, data);\n }\n};\n\n// src/submodules/protocols/serde/HttpInterceptingShapeSerializer.ts\nvar import_schema8 = require(\"@smithy/core/schema\");\n\n// src/submodules/protocols/serde/ToStringShapeSerializer.ts\nvar import_schema7 = require(\"@smithy/core/schema\");\nvar import_serde3 = require(\"@smithy/core/serde\");\nvar import_util_base642 = require(\"@smithy/util-base64\");\nvar ToStringShapeSerializer = class {\n constructor(settings) {\n this.settings = settings;\n this.stringBuffer = \"\";\n this.serdeContext = void 0;\n }\n setSerdeContext(serdeContext) {\n this.serdeContext = serdeContext;\n }\n write(schema, value) {\n const ns = import_schema7.NormalizedSchema.of(schema);\n switch (typeof value) {\n case \"object\":\n if (value === null) {\n this.stringBuffer = \"null\";\n return;\n }\n if (ns.isTimestampSchema()) {\n if (!(value instanceof Date)) {\n throw new Error(\n `@smithy/core/protocols - received non-Date value ${value} when schema expected Date in ${ns.getName(true)}`\n );\n }\n const format = determineTimestampFormat(ns, this.settings);\n switch (format) {\n case import_schema7.SCHEMA.TIMESTAMP_DATE_TIME:\n this.stringBuffer = value.toISOString().replace(\".000Z\", \"Z\");\n break;\n case import_schema7.SCHEMA.TIMESTAMP_HTTP_DATE:\n this.stringBuffer = (0, import_serde3.dateToUtcString)(value);\n break;\n case import_schema7.SCHEMA.TIMESTAMP_EPOCH_SECONDS:\n this.stringBuffer = String(value.getTime() / 1e3);\n break;\n default:\n console.warn(\"Missing timestamp format, using epoch seconds\", value);\n this.stringBuffer = String(value.getTime() / 1e3);\n }\n return;\n }\n if (ns.isBlobSchema() && \"byteLength\" in value) {\n this.stringBuffer = (this.serdeContext?.base64Encoder ?? import_util_base642.toBase64)(value);\n return;\n }\n if (ns.isListSchema() && Array.isArray(value)) {\n let buffer = \"\";\n for (const item of value) {\n this.write([ns.getValueSchema(), ns.getMergedTraits()], item);\n const headerItem = this.flush();\n const serialized = ns.getValueSchema().isTimestampSchema() ? headerItem : (0, import_serde3.quoteHeader)(headerItem);\n if (buffer !== \"\") {\n buffer += \", \";\n }\n buffer += serialized;\n }\n this.stringBuffer = buffer;\n return;\n }\n this.stringBuffer = JSON.stringify(value, null, 2);\n break;\n case \"string\":\n const mediaType = ns.getMergedTraits().mediaType;\n let intermediateValue = value;\n if (mediaType) {\n const isJson = mediaType === \"application/json\" || mediaType.endsWith(\"+json\");\n if (isJson) {\n intermediateValue = import_serde3.LazyJsonString.from(intermediateValue);\n }\n if (ns.getMergedTraits().httpHeader) {\n this.stringBuffer = (this.serdeContext?.base64Encoder ?? import_util_base642.toBase64)(intermediateValue.toString());\n return;\n }\n }\n this.stringBuffer = value;\n break;\n default:\n this.stringBuffer = String(value);\n }\n }\n flush() {\n const buffer = this.stringBuffer;\n this.stringBuffer = \"\";\n return buffer;\n }\n};\n\n// src/submodules/protocols/serde/HttpInterceptingShapeSerializer.ts\nvar HttpInterceptingShapeSerializer = class {\n constructor(codecSerializer, codecSettings, stringSerializer = new ToStringShapeSerializer(codecSettings)) {\n this.codecSerializer = codecSerializer;\n this.stringSerializer = stringSerializer;\n }\n setSerdeContext(serdeContext) {\n this.codecSerializer.setSerdeContext(serdeContext);\n this.stringSerializer.setSerdeContext(serdeContext);\n }\n write(schema, value) {\n const ns = import_schema8.NormalizedSchema.of(schema);\n const traits = ns.getMergedTraits();\n if (traits.httpHeader || traits.httpLabel || traits.httpQuery) {\n this.stringSerializer.write(ns, value);\n this.buffer = this.stringSerializer.flush();\n return;\n }\n return this.codecSerializer.write(ns, value);\n }\n flush() {\n if (this.buffer !== void 0) {\n const buffer = this.buffer;\n this.buffer = void 0;\n return buffer;\n }\n return this.codecSerializer.flush();\n }\n};\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n FromStringShapeDeserializer,\n HttpBindingProtocol,\n HttpInterceptingShapeDeserializer,\n HttpInterceptingShapeSerializer,\n RequestBuilder,\n RpcProtocol,\n ToStringShapeSerializer,\n collectBody,\n determineTimestampFormat,\n extendedEncodeURIComponent,\n requestBuilder,\n resolvedPath\n});\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/submodules/schema/index.ts\nvar schema_exports = {};\n__export(schema_exports, {\n ErrorSchema: () => ErrorSchema,\n ListSchema: () => ListSchema,\n MapSchema: () => MapSchema,\n NormalizedSchema: () => NormalizedSchema,\n OperationSchema: () => OperationSchema,\n SCHEMA: () => SCHEMA,\n Schema: () => Schema,\n SimpleSchema: () => SimpleSchema,\n StructureSchema: () => StructureSchema,\n TypeRegistry: () => TypeRegistry,\n deref: () => deref,\n deserializerMiddlewareOption: () => deserializerMiddlewareOption,\n error: () => error,\n getSchemaSerdePlugin: () => getSchemaSerdePlugin,\n list: () => list,\n map: () => map,\n op: () => op,\n serializerMiddlewareOption: () => serializerMiddlewareOption,\n sim: () => sim,\n struct: () => struct\n});\nmodule.exports = __toCommonJS(schema_exports);\n\n// src/submodules/schema/deref.ts\nvar deref = (schemaRef) => {\n if (typeof schemaRef === \"function\") {\n return schemaRef();\n }\n return schemaRef;\n};\n\n// src/submodules/schema/middleware/schemaDeserializationMiddleware.ts\nvar import_protocol_http = require(\"@smithy/protocol-http\");\nvar import_util_middleware = require(\"@smithy/util-middleware\");\nvar schemaDeserializationMiddleware = (config) => (next, context) => async (args) => {\n const { response } = await next(args);\n const { operationSchema } = (0, import_util_middleware.getSmithyContext)(context);\n try {\n const parsed = await config.protocol.deserializeResponse(\n operationSchema,\n {\n ...config,\n ...context\n },\n response\n );\n return {\n response,\n output: parsed\n };\n } catch (error2) {\n Object.defineProperty(error2, \"$response\", {\n value: response\n });\n if (!(\"$metadata\" in error2)) {\n const hint = `Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`;\n try {\n error2.message += \"\\n \" + hint;\n } catch (e) {\n if (!context.logger || context.logger?.constructor?.name === \"NoOpLogger\") {\n console.warn(hint);\n } else {\n context.logger?.warn?.(hint);\n }\n }\n if (typeof error2.$responseBodyText !== \"undefined\") {\n if (error2.$response) {\n error2.$response.body = error2.$responseBodyText;\n }\n }\n try {\n if (import_protocol_http.HttpResponse.isInstance(response)) {\n const { headers = {} } = response;\n const headerEntries = Object.entries(headers);\n error2.$metadata = {\n httpStatusCode: response.statusCode,\n requestId: findHeader(/^x-[\\w-]+-request-?id$/, headerEntries),\n extendedRequestId: findHeader(/^x-[\\w-]+-id-2$/, headerEntries),\n cfId: findHeader(/^x-[\\w-]+-cf-id$/, headerEntries)\n };\n }\n } catch (e) {\n }\n }\n throw error2;\n }\n};\nvar findHeader = (pattern, headers) => {\n return (headers.find(([k]) => {\n return k.match(pattern);\n }) || [void 0, void 0])[1];\n};\n\n// src/submodules/schema/middleware/schemaSerializationMiddleware.ts\nvar import_util_middleware2 = require(\"@smithy/util-middleware\");\nvar schemaSerializationMiddleware = (config) => (next, context) => async (args) => {\n const { operationSchema } = (0, import_util_middleware2.getSmithyContext)(context);\n const endpoint = context.endpointV2?.url && config.urlParser ? async () => config.urlParser(context.endpointV2.url) : config.endpoint;\n const request = await config.protocol.serializeRequest(operationSchema, args.input, {\n ...config,\n ...context,\n endpoint\n });\n return next({\n ...args,\n request\n });\n};\n\n// src/submodules/schema/middleware/getSchemaSerdePlugin.ts\nvar deserializerMiddlewareOption = {\n name: \"deserializerMiddleware\",\n step: \"deserialize\",\n tags: [\"DESERIALIZER\"],\n override: true\n};\nvar serializerMiddlewareOption = {\n name: \"serializerMiddleware\",\n step: \"serialize\",\n tags: [\"SERIALIZER\"],\n override: true\n};\nfunction getSchemaSerdePlugin(config) {\n return {\n applyToStack: (commandStack) => {\n commandStack.add(schemaSerializationMiddleware(config), serializerMiddlewareOption);\n commandStack.add(schemaDeserializationMiddleware(config), deserializerMiddlewareOption);\n config.protocol.setSerdeContext(config);\n }\n };\n}\n\n// src/submodules/schema/TypeRegistry.ts\nvar TypeRegistry = class _TypeRegistry {\n constructor(namespace, schemas = /* @__PURE__ */ new Map()) {\n this.namespace = namespace;\n this.schemas = schemas;\n }\n static {\n this.registries = /* @__PURE__ */ new Map();\n }\n /**\n * @param namespace - specifier.\n * @returns the schema for that namespace, creating it if necessary.\n */\n static for(namespace) {\n if (!_TypeRegistry.registries.has(namespace)) {\n _TypeRegistry.registries.set(namespace, new _TypeRegistry(namespace));\n }\n return _TypeRegistry.registries.get(namespace);\n }\n /**\n * Adds the given schema to a type registry with the same namespace.\n *\n * @param shapeId - to be registered.\n * @param schema - to be registered.\n */\n register(shapeId, schema) {\n const qualifiedName = this.normalizeShapeId(shapeId);\n const registry = _TypeRegistry.for(this.getNamespace(shapeId));\n registry.schemas.set(qualifiedName, schema);\n }\n /**\n * @param shapeId - query.\n * @returns the schema.\n */\n getSchema(shapeId) {\n const id = this.normalizeShapeId(shapeId);\n if (!this.schemas.has(id)) {\n throw new Error(`@smithy/core/schema - schema not found for ${id}`);\n }\n return this.schemas.get(id);\n }\n /**\n * The smithy-typescript code generator generates a synthetic (i.e. unmodeled) base exception,\n * because generated SDKs before the introduction of schemas have the notion of a ServiceBaseException, which\n * is unique per service/model.\n *\n * This is generated under a unique prefix that is combined with the service namespace, and this\n * method is used to retrieve it.\n *\n * The base exception synthetic schema is used when an error is returned by a service, but we cannot\n * determine what existing schema to use to deserialize it.\n *\n * @returns the synthetic base exception of the service namespace associated with this registry instance.\n */\n getBaseException() {\n for (const [id, schema] of this.schemas.entries()) {\n if (id.startsWith(\"smithy.ts.sdk.synthetic.\") && id.endsWith(\"ServiceException\")) {\n return schema;\n }\n }\n return void 0;\n }\n /**\n * @param predicate - criterion.\n * @returns a schema in this registry matching the predicate.\n */\n find(predicate) {\n return [...this.schemas.values()].find(predicate);\n }\n /**\n * Unloads the current TypeRegistry.\n */\n destroy() {\n _TypeRegistry.registries.delete(this.namespace);\n this.schemas.clear();\n }\n normalizeShapeId(shapeId) {\n if (shapeId.includes(\"#\")) {\n return shapeId;\n }\n return this.namespace + \"#\" + shapeId;\n }\n getNamespace(shapeId) {\n return this.normalizeShapeId(shapeId).split(\"#\")[0];\n }\n};\n\n// src/submodules/schema/schemas/Schema.ts\nvar Schema = class {\n constructor(name, traits) {\n this.name = name;\n this.traits = traits;\n }\n};\n\n// src/submodules/schema/schemas/ListSchema.ts\nvar ListSchema = class extends Schema {\n constructor(name, traits, valueSchema) {\n super(name, traits);\n this.name = name;\n this.traits = traits;\n this.valueSchema = valueSchema;\n }\n};\nfunction list(namespace, name, traits = {}, valueSchema) {\n const schema = new ListSchema(\n namespace + \"#\" + name,\n traits,\n typeof valueSchema === \"function\" ? valueSchema() : valueSchema\n );\n TypeRegistry.for(namespace).register(name, schema);\n return schema;\n}\n\n// src/submodules/schema/schemas/MapSchema.ts\nvar MapSchema = class extends Schema {\n constructor(name, traits, keySchema, valueSchema) {\n super(name, traits);\n this.name = name;\n this.traits = traits;\n this.keySchema = keySchema;\n this.valueSchema = valueSchema;\n }\n};\nfunction map(namespace, name, traits = {}, keySchema, valueSchema) {\n const schema = new MapSchema(\n namespace + \"#\" + name,\n traits,\n keySchema,\n typeof valueSchema === \"function\" ? valueSchema() : valueSchema\n );\n TypeRegistry.for(namespace).register(name, schema);\n return schema;\n}\n\n// src/submodules/schema/schemas/OperationSchema.ts\nvar OperationSchema = class extends Schema {\n constructor(name, traits, input, output) {\n super(name, traits);\n this.name = name;\n this.traits = traits;\n this.input = input;\n this.output = output;\n }\n};\nfunction op(namespace, name, traits = {}, input, output) {\n const schema = new OperationSchema(namespace + \"#\" + name, traits, input, output);\n TypeRegistry.for(namespace).register(name, schema);\n return schema;\n}\n\n// src/submodules/schema/schemas/StructureSchema.ts\nvar StructureSchema = class extends Schema {\n constructor(name, traits, memberNames, memberList) {\n super(name, traits);\n this.name = name;\n this.traits = traits;\n this.memberNames = memberNames;\n this.memberList = memberList;\n this.members = {};\n for (let i = 0; i < memberNames.length; ++i) {\n this.members[memberNames[i]] = Array.isArray(memberList[i]) ? memberList[i] : [memberList[i], 0];\n }\n }\n};\nfunction struct(namespace, name, traits, memberNames, memberList) {\n const schema = new StructureSchema(namespace + \"#\" + name, traits, memberNames, memberList);\n TypeRegistry.for(namespace).register(name, schema);\n return schema;\n}\n\n// src/submodules/schema/schemas/ErrorSchema.ts\nvar ErrorSchema = class extends StructureSchema {\n constructor(name, traits, memberNames, memberList, ctor) {\n super(name, traits, memberNames, memberList);\n this.name = name;\n this.traits = traits;\n this.memberNames = memberNames;\n this.memberList = memberList;\n this.ctor = ctor;\n }\n};\nfunction error(namespace, name, traits = {}, memberNames, memberList, ctor) {\n const schema = new ErrorSchema(namespace + \"#\" + name, traits, memberNames, memberList, ctor);\n TypeRegistry.for(namespace).register(name, schema);\n return schema;\n}\n\n// src/submodules/schema/schemas/sentinels.ts\nvar SCHEMA = {\n BLOB: 21,\n // 21\n STREAMING_BLOB: 42,\n // 42\n BOOLEAN: 2,\n // 2\n STRING: 0,\n // 0\n NUMERIC: 1,\n // 1\n BIG_INTEGER: 17,\n // 17\n BIG_DECIMAL: 19,\n // 19\n DOCUMENT: 15,\n // 15\n TIMESTAMP_DEFAULT: 4,\n // 4\n TIMESTAMP_DATE_TIME: 5,\n // 5\n TIMESTAMP_HTTP_DATE: 6,\n // 6\n TIMESTAMP_EPOCH_SECONDS: 7,\n // 7\n LIST_MODIFIER: 64,\n // 64\n MAP_MODIFIER: 128\n // 128\n};\n\n// src/submodules/schema/schemas/SimpleSchema.ts\nvar SimpleSchema = class extends Schema {\n constructor(name, schemaRef, traits) {\n super(name, traits);\n this.name = name;\n this.schemaRef = schemaRef;\n this.traits = traits;\n }\n};\nfunction sim(namespace, name, schemaRef, traits) {\n const schema = new SimpleSchema(namespace + \"#\" + name, schemaRef, traits);\n TypeRegistry.for(namespace).register(name, schema);\n return schema;\n}\n\n// src/submodules/schema/schemas/NormalizedSchema.ts\nvar NormalizedSchema = class _NormalizedSchema {\n /**\n * @param ref - a polymorphic SchemaRef to be dereferenced/normalized.\n * @param memberName - optional memberName if this NormalizedSchema should be considered a member schema.\n */\n constructor(ref, memberName) {\n this.ref = ref;\n this.memberName = memberName;\n const traitStack = [];\n let _ref = ref;\n let schema = ref;\n this._isMemberSchema = false;\n while (Array.isArray(_ref)) {\n traitStack.push(_ref[1]);\n _ref = _ref[0];\n schema = deref(_ref);\n this._isMemberSchema = true;\n }\n if (traitStack.length > 0) {\n this.memberTraits = {};\n for (let i = traitStack.length - 1; i >= 0; --i) {\n const traitSet = traitStack[i];\n Object.assign(this.memberTraits, _NormalizedSchema.translateTraits(traitSet));\n }\n } else {\n this.memberTraits = 0;\n }\n if (schema instanceof _NormalizedSchema) {\n this.name = schema.name;\n this.traits = schema.traits;\n this._isMemberSchema = schema._isMemberSchema;\n this.schema = schema.schema;\n this.memberTraits = Object.assign({}, schema.getMemberTraits(), this.getMemberTraits());\n this.normalizedTraits = void 0;\n this.ref = schema.ref;\n this.memberName = memberName ?? schema.memberName;\n return;\n }\n this.schema = deref(schema);\n if (this.schema && typeof this.schema === \"object\") {\n this.traits = this.schema?.traits ?? {};\n } else {\n this.traits = 0;\n }\n this.name = (typeof this.schema === \"object\" ? this.schema?.name : void 0) ?? this.memberName ?? this.getSchemaName();\n if (this._isMemberSchema && !memberName) {\n throw new Error(\n `@smithy/core/schema - NormalizedSchema member schema ${this.getName(true)} must initialize with memberName argument.`\n );\n }\n }\n /**\n * Static constructor that attempts to avoid wrapping a NormalizedSchema within another.\n */\n static of(ref, memberName) {\n if (ref instanceof _NormalizedSchema) {\n return ref;\n }\n return new _NormalizedSchema(ref, memberName);\n }\n /**\n * @param indicator - numeric indicator for preset trait combination.\n * @returns equivalent trait object.\n */\n static translateTraits(indicator) {\n if (typeof indicator === \"object\") {\n return indicator;\n }\n indicator = indicator | 0;\n const traits = {};\n if ((indicator & 1) === 1) {\n traits.httpLabel = 1;\n }\n if ((indicator >> 1 & 1) === 1) {\n traits.idempotent = 1;\n }\n if ((indicator >> 2 & 1) === 1) {\n traits.idempotencyToken = 1;\n }\n if ((indicator >> 3 & 1) === 1) {\n traits.sensitive = 1;\n }\n if ((indicator >> 4 & 1) === 1) {\n traits.httpPayload = 1;\n }\n if ((indicator >> 5 & 1) === 1) {\n traits.httpResponseCode = 1;\n }\n if ((indicator >> 6 & 1) === 1) {\n traits.httpQueryParams = 1;\n }\n return traits;\n }\n /**\n * Creates a normalized member schema from the given schema and member name.\n */\n static memberFrom(memberSchema, memberName) {\n if (memberSchema instanceof _NormalizedSchema) {\n memberSchema.memberName = memberName;\n memberSchema._isMemberSchema = true;\n return memberSchema;\n }\n return new _NormalizedSchema(memberSchema, memberName);\n }\n /**\n * @returns the underlying non-normalized schema.\n */\n getSchema() {\n if (this.schema instanceof _NormalizedSchema) {\n return this.schema = this.schema.getSchema();\n }\n if (this.schema instanceof SimpleSchema) {\n return deref(this.schema.schemaRef);\n }\n return deref(this.schema);\n }\n /**\n * @param withNamespace - qualifies the name.\n * @returns e.g. `MyShape` or `com.namespace#MyShape`.\n */\n getName(withNamespace = false) {\n if (!withNamespace) {\n if (this.name && this.name.includes(\"#\")) {\n return this.name.split(\"#\")[1];\n }\n }\n return this.name || void 0;\n }\n /**\n * @returns the member name if the schema is a member schema.\n * @throws Error when the schema isn't a member schema.\n */\n getMemberName() {\n if (!this.isMemberSchema()) {\n throw new Error(`@smithy/core/schema - cannot get member name on non-member schema: ${this.getName(true)}`);\n }\n return this.memberName;\n }\n isMemberSchema() {\n return this._isMemberSchema;\n }\n isUnitSchema() {\n return this.getSchema() === \"unit\";\n }\n /**\n * boolean methods on this class help control flow in shape serialization and deserialization.\n */\n isListSchema() {\n const inner = this.getSchema();\n if (typeof inner === \"number\") {\n return inner >= SCHEMA.LIST_MODIFIER && inner < SCHEMA.MAP_MODIFIER;\n }\n return inner instanceof ListSchema;\n }\n isMapSchema() {\n const inner = this.getSchema();\n if (typeof inner === \"number\") {\n return inner >= SCHEMA.MAP_MODIFIER && inner <= 255;\n }\n return inner instanceof MapSchema;\n }\n isDocumentSchema() {\n return this.getSchema() === SCHEMA.DOCUMENT;\n }\n isStructSchema() {\n const inner = this.getSchema();\n return inner !== null && typeof inner === \"object\" && \"members\" in inner || inner instanceof StructureSchema;\n }\n isBlobSchema() {\n return this.getSchema() === SCHEMA.BLOB || this.getSchema() === SCHEMA.STREAMING_BLOB;\n }\n isTimestampSchema() {\n const schema = this.getSchema();\n return typeof schema === \"number\" && schema >= SCHEMA.TIMESTAMP_DEFAULT && schema <= SCHEMA.TIMESTAMP_EPOCH_SECONDS;\n }\n isStringSchema() {\n return this.getSchema() === SCHEMA.STRING;\n }\n isBooleanSchema() {\n return this.getSchema() === SCHEMA.BOOLEAN;\n }\n isNumericSchema() {\n return this.getSchema() === SCHEMA.NUMERIC;\n }\n isBigIntegerSchema() {\n return this.getSchema() === SCHEMA.BIG_INTEGER;\n }\n isBigDecimalSchema() {\n return this.getSchema() === SCHEMA.BIG_DECIMAL;\n }\n isStreaming() {\n const streaming = !!this.getMergedTraits().streaming;\n if (streaming) {\n return true;\n }\n return this.getSchema() === SCHEMA.STREAMING_BLOB;\n }\n /**\n * @returns own traits merged with member traits, where member traits of the same trait key take priority.\n * This method is cached.\n */\n getMergedTraits() {\n if (this.normalizedTraits) {\n return this.normalizedTraits;\n }\n this.normalizedTraits = {\n ...this.getOwnTraits(),\n ...this.getMemberTraits()\n };\n return this.normalizedTraits;\n }\n /**\n * @returns only the member traits. If the schema is not a member, this returns empty.\n */\n getMemberTraits() {\n return _NormalizedSchema.translateTraits(this.memberTraits);\n }\n /**\n * @returns only the traits inherent to the shape or member target shape if this schema is a member.\n * If there are any member traits they are excluded.\n */\n getOwnTraits() {\n return _NormalizedSchema.translateTraits(this.traits);\n }\n /**\n * @returns the map's key's schema. Returns a dummy Document schema if this schema is a Document.\n *\n * @throws Error if the schema is not a Map or Document.\n */\n getKeySchema() {\n if (this.isDocumentSchema()) {\n return _NormalizedSchema.memberFrom([SCHEMA.DOCUMENT, 0], \"key\");\n }\n if (!this.isMapSchema()) {\n throw new Error(`@smithy/core/schema - cannot get key schema for non-map schema: ${this.getName(true)}`);\n }\n const schema = this.getSchema();\n if (typeof schema === \"number\") {\n return _NormalizedSchema.memberFrom([63 & schema, 0], \"key\");\n }\n return _NormalizedSchema.memberFrom([schema.keySchema, 0], \"key\");\n }\n /**\n * @returns the schema of the map's value or list's member.\n * Returns a dummy Document schema if this schema is a Document.\n *\n * @throws Error if the schema is not a Map, List, nor Document.\n */\n getValueSchema() {\n const schema = this.getSchema();\n if (typeof schema === \"number\") {\n if (this.isMapSchema()) {\n return _NormalizedSchema.memberFrom([63 & schema, 0], \"value\");\n } else if (this.isListSchema()) {\n return _NormalizedSchema.memberFrom([63 & schema, 0], \"member\");\n }\n }\n if (schema && typeof schema === \"object\") {\n if (this.isStructSchema()) {\n throw new Error(`cannot call getValueSchema() with StructureSchema ${this.getName(true)}`);\n }\n const collection = schema;\n if (\"valueSchema\" in collection) {\n if (this.isMapSchema()) {\n return _NormalizedSchema.memberFrom([collection.valueSchema, 0], \"value\");\n } else if (this.isListSchema()) {\n return _NormalizedSchema.memberFrom([collection.valueSchema, 0], \"member\");\n }\n }\n }\n if (this.isDocumentSchema()) {\n return _NormalizedSchema.memberFrom([SCHEMA.DOCUMENT, 0], \"value\");\n }\n throw new Error(`@smithy/core/schema - the schema ${this.getName(true)} does not have a value member.`);\n }\n /**\n * @returns the NormalizedSchema for the given member name. The returned instance will return true for `isMemberSchema()`\n * and will have the member name given.\n * @param member - which member to retrieve and wrap.\n *\n * @throws Error if member does not exist or the schema is neither a document nor structure.\n * Note that errors are assumed to be structures and unions are considered structures for these purposes.\n */\n getMemberSchema(member) {\n if (this.isStructSchema()) {\n const struct2 = this.getSchema();\n if (!(member in struct2.members)) {\n throw new Error(\n `@smithy/core/schema - the schema ${this.getName(true)} does not have a member with name=${member}.`\n );\n }\n return _NormalizedSchema.memberFrom(struct2.members[member], member);\n }\n if (this.isDocumentSchema()) {\n return _NormalizedSchema.memberFrom([SCHEMA.DOCUMENT, 0], member);\n }\n throw new Error(`@smithy/core/schema - the schema ${this.getName(true)} does not have members.`);\n }\n /**\n * This can be used for checking the members as a hashmap.\n * Prefer the structIterator method for iteration.\n *\n * This does NOT return list and map members, it is only for structures.\n *\n * @returns a map of member names to member schemas (normalized).\n */\n getMemberSchemas() {\n const { schema } = this;\n const struct2 = schema;\n if (!struct2 || typeof struct2 !== \"object\") {\n return {};\n }\n if (\"members\" in struct2) {\n const buffer = {};\n for (const member of struct2.memberNames) {\n buffer[member] = this.getMemberSchema(member);\n }\n return buffer;\n }\n return {};\n }\n /**\n * Allows iteration over members of a structure schema.\n * Each yield is a pair of the member name and member schema.\n *\n * This avoids the overhead of calling Object.entries(ns.getMemberSchemas()).\n */\n *structIterator() {\n if (this.isUnitSchema()) {\n return;\n }\n if (!this.isStructSchema()) {\n throw new Error(\"@smithy/core/schema - cannot acquire structIterator on non-struct schema.\");\n }\n const struct2 = this.getSchema();\n for (let i = 0; i < struct2.memberNames.length; ++i) {\n yield [struct2.memberNames[i], _NormalizedSchema.memberFrom([struct2.memberList[i], 0], struct2.memberNames[i])];\n }\n }\n /**\n * @returns a last-resort human-readable name for the schema if it has no other identifiers.\n */\n getSchemaName() {\n const schema = this.getSchema();\n if (typeof schema === \"number\") {\n const _schema = 63 & schema;\n const container = 192 & schema;\n const type = Object.entries(SCHEMA).find(([, value]) => {\n return value === _schema;\n })?.[0] ?? \"Unknown\";\n switch (container) {\n case SCHEMA.MAP_MODIFIER:\n return `${type}Map`;\n case SCHEMA.LIST_MODIFIER:\n return `${type}List`;\n case 0:\n return type;\n }\n }\n return \"Unknown\";\n }\n};\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n ErrorSchema,\n ListSchema,\n MapSchema,\n NormalizedSchema,\n OperationSchema,\n SCHEMA,\n Schema,\n SimpleSchema,\n StructureSchema,\n TypeRegistry,\n deref,\n deserializerMiddlewareOption,\n error,\n getSchemaSerdePlugin,\n list,\n map,\n op,\n serializerMiddlewareOption,\n sim,\n struct\n});\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/submodules/serde/index.ts\nvar serde_exports = {};\n__export(serde_exports, {\n LazyJsonString: () => LazyJsonString,\n NumericValue: () => NumericValue,\n copyDocumentWithTransform: () => copyDocumentWithTransform,\n dateToUtcString: () => dateToUtcString,\n expectBoolean: () => expectBoolean,\n expectByte: () => expectByte,\n expectFloat32: () => expectFloat32,\n expectInt: () => expectInt,\n expectInt32: () => expectInt32,\n expectLong: () => expectLong,\n expectNonNull: () => expectNonNull,\n expectNumber: () => expectNumber,\n expectObject: () => expectObject,\n expectShort: () => expectShort,\n expectString: () => expectString,\n expectUnion: () => expectUnion,\n handleFloat: () => handleFloat,\n limitedParseDouble: () => limitedParseDouble,\n limitedParseFloat: () => limitedParseFloat,\n limitedParseFloat32: () => limitedParseFloat32,\n logger: () => logger,\n nv: () => nv,\n parseBoolean: () => parseBoolean,\n parseEpochTimestamp: () => parseEpochTimestamp,\n parseRfc3339DateTime: () => parseRfc3339DateTime,\n parseRfc3339DateTimeWithOffset: () => parseRfc3339DateTimeWithOffset,\n parseRfc7231DateTime: () => parseRfc7231DateTime,\n quoteHeader: () => quoteHeader,\n splitEvery: () => splitEvery,\n splitHeader: () => splitHeader,\n strictParseByte: () => strictParseByte,\n strictParseDouble: () => strictParseDouble,\n strictParseFloat: () => strictParseFloat,\n strictParseFloat32: () => strictParseFloat32,\n strictParseInt: () => strictParseInt,\n strictParseInt32: () => strictParseInt32,\n strictParseLong: () => strictParseLong,\n strictParseShort: () => strictParseShort\n});\nmodule.exports = __toCommonJS(serde_exports);\n\n// src/submodules/serde/copyDocumentWithTransform.ts\nvar import_schema = require(\"@smithy/core/schema\");\nvar copyDocumentWithTransform = (source, schemaRef, transform = (_) => _) => {\n const ns = import_schema.NormalizedSchema.of(schemaRef);\n switch (typeof source) {\n case \"undefined\":\n case \"boolean\":\n case \"number\":\n case \"string\":\n case \"bigint\":\n case \"symbol\":\n return transform(source, ns);\n case \"function\":\n case \"object\":\n if (source === null) {\n return transform(null, ns);\n }\n if (Array.isArray(source)) {\n const newArray = new Array(source.length);\n let i = 0;\n for (const item of source) {\n newArray[i++] = copyDocumentWithTransform(item, ns.getValueSchema(), transform);\n }\n return transform(newArray, ns);\n }\n if (\"byteLength\" in source) {\n const newBytes = new Uint8Array(source.byteLength);\n newBytes.set(source, 0);\n return transform(newBytes, ns);\n }\n if (source instanceof Date) {\n return transform(source, ns);\n }\n const newObject = {};\n if (ns.isMapSchema()) {\n for (const key of Object.keys(source)) {\n newObject[key] = copyDocumentWithTransform(source[key], ns.getValueSchema(), transform);\n }\n } else if (ns.isStructSchema()) {\n for (const [key, memberSchema] of ns.structIterator()) {\n newObject[key] = copyDocumentWithTransform(source[key], memberSchema, transform);\n }\n } else if (ns.isDocumentSchema()) {\n for (const key of Object.keys(source)) {\n newObject[key] = copyDocumentWithTransform(source[key], ns.getValueSchema(), transform);\n }\n }\n return transform(newObject, ns);\n default:\n return transform(source, ns);\n }\n};\n\n// src/submodules/serde/parse-utils.ts\nvar parseBoolean = (value) => {\n switch (value) {\n case \"true\":\n return true;\n case \"false\":\n return false;\n default:\n throw new Error(`Unable to parse boolean value \"${value}\"`);\n }\n};\nvar expectBoolean = (value) => {\n if (value === null || value === void 0) {\n return void 0;\n }\n if (typeof value === \"number\") {\n if (value === 0 || value === 1) {\n logger.warn(stackTraceWarning(`Expected boolean, got ${typeof value}: ${value}`));\n }\n if (value === 0) {\n return false;\n }\n if (value === 1) {\n return true;\n }\n }\n if (typeof value === \"string\") {\n const lower = value.toLowerCase();\n if (lower === \"false\" || lower === \"true\") {\n logger.warn(stackTraceWarning(`Expected boolean, got ${typeof value}: ${value}`));\n }\n if (lower === \"false\") {\n return false;\n }\n if (lower === \"true\") {\n return true;\n }\n }\n if (typeof value === \"boolean\") {\n return value;\n }\n throw new TypeError(`Expected boolean, got ${typeof value}: ${value}`);\n};\nvar expectNumber = (value) => {\n if (value === null || value === void 0) {\n return void 0;\n }\n if (typeof value === \"string\") {\n const parsed = parseFloat(value);\n if (!Number.isNaN(parsed)) {\n if (String(parsed) !== String(value)) {\n logger.warn(stackTraceWarning(`Expected number but observed string: ${value}`));\n }\n return parsed;\n }\n }\n if (typeof value === \"number\") {\n return value;\n }\n throw new TypeError(`Expected number, got ${typeof value}: ${value}`);\n};\nvar MAX_FLOAT = Math.ceil(2 ** 127 * (2 - 2 ** -23));\nvar expectFloat32 = (value) => {\n const expected = expectNumber(value);\n if (expected !== void 0 && !Number.isNaN(expected) && expected !== Infinity && expected !== -Infinity) {\n if (Math.abs(expected) > MAX_FLOAT) {\n throw new TypeError(`Expected 32-bit float, got ${value}`);\n }\n }\n return expected;\n};\nvar expectLong = (value) => {\n if (value === null || value === void 0) {\n return void 0;\n }\n if (Number.isInteger(value) && !Number.isNaN(value)) {\n return value;\n }\n throw new TypeError(`Expected integer, got ${typeof value}: ${value}`);\n};\nvar expectInt = expectLong;\nvar expectInt32 = (value) => expectSizedInt(value, 32);\nvar expectShort = (value) => expectSizedInt(value, 16);\nvar expectByte = (value) => expectSizedInt(value, 8);\nvar expectSizedInt = (value, size) => {\n const expected = expectLong(value);\n if (expected !== void 0 && castInt(expected, size) !== expected) {\n throw new TypeError(`Expected ${size}-bit integer, got ${value}`);\n }\n return expected;\n};\nvar castInt = (value, size) => {\n switch (size) {\n case 32:\n return Int32Array.of(value)[0];\n case 16:\n return Int16Array.of(value)[0];\n case 8:\n return Int8Array.of(value)[0];\n }\n};\nvar expectNonNull = (value, location) => {\n if (value === null || value === void 0) {\n if (location) {\n throw new TypeError(`Expected a non-null value for ${location}`);\n }\n throw new TypeError(\"Expected a non-null value\");\n }\n return value;\n};\nvar expectObject = (value) => {\n if (value === null || value === void 0) {\n return void 0;\n }\n if (typeof value === \"object\" && !Array.isArray(value)) {\n return value;\n }\n const receivedType = Array.isArray(value) ? \"array\" : typeof value;\n throw new TypeError(`Expected object, got ${receivedType}: ${value}`);\n};\nvar expectString = (value) => {\n if (value === null || value === void 0) {\n return void 0;\n }\n if (typeof value === \"string\") {\n return value;\n }\n if ([\"boolean\", \"number\", \"bigint\"].includes(typeof value)) {\n logger.warn(stackTraceWarning(`Expected string, got ${typeof value}: ${value}`));\n return String(value);\n }\n throw new TypeError(`Expected string, got ${typeof value}: ${value}`);\n};\nvar expectUnion = (value) => {\n if (value === null || value === void 0) {\n return void 0;\n }\n const asObject = expectObject(value);\n const setKeys = Object.entries(asObject).filter(([, v]) => v != null).map(([k]) => k);\n if (setKeys.length === 0) {\n throw new TypeError(`Unions must have exactly one non-null member. None were found.`);\n }\n if (setKeys.length > 1) {\n throw new TypeError(`Unions must have exactly one non-null member. Keys ${setKeys} were not null.`);\n }\n return asObject;\n};\nvar strictParseDouble = (value) => {\n if (typeof value == \"string\") {\n return expectNumber(parseNumber(value));\n }\n return expectNumber(value);\n};\nvar strictParseFloat = strictParseDouble;\nvar strictParseFloat32 = (value) => {\n if (typeof value == \"string\") {\n return expectFloat32(parseNumber(value));\n }\n return expectFloat32(value);\n};\nvar NUMBER_REGEX = /(-?(?:0|[1-9]\\d*)(?:\\.\\d+)?(?:[eE][+-]?\\d+)?)|(-?Infinity)|(NaN)/g;\nvar parseNumber = (value) => {\n const matches = value.match(NUMBER_REGEX);\n if (matches === null || matches[0].length !== value.length) {\n throw new TypeError(`Expected real number, got implicit NaN`);\n }\n return parseFloat(value);\n};\nvar limitedParseDouble = (value) => {\n if (typeof value == \"string\") {\n return parseFloatString(value);\n }\n return expectNumber(value);\n};\nvar handleFloat = limitedParseDouble;\nvar limitedParseFloat = limitedParseDouble;\nvar limitedParseFloat32 = (value) => {\n if (typeof value == \"string\") {\n return parseFloatString(value);\n }\n return expectFloat32(value);\n};\nvar parseFloatString = (value) => {\n switch (value) {\n case \"NaN\":\n return NaN;\n case \"Infinity\":\n return Infinity;\n case \"-Infinity\":\n return -Infinity;\n default:\n throw new Error(`Unable to parse float value: ${value}`);\n }\n};\nvar strictParseLong = (value) => {\n if (typeof value === \"string\") {\n return expectLong(parseNumber(value));\n }\n return expectLong(value);\n};\nvar strictParseInt = strictParseLong;\nvar strictParseInt32 = (value) => {\n if (typeof value === \"string\") {\n return expectInt32(parseNumber(value));\n }\n return expectInt32(value);\n};\nvar strictParseShort = (value) => {\n if (typeof value === \"string\") {\n return expectShort(parseNumber(value));\n }\n return expectShort(value);\n};\nvar strictParseByte = (value) => {\n if (typeof value === \"string\") {\n return expectByte(parseNumber(value));\n }\n return expectByte(value);\n};\nvar stackTraceWarning = (message) => {\n return String(new TypeError(message).stack || message).split(\"\\n\").slice(0, 5).filter((s) => !s.includes(\"stackTraceWarning\")).join(\"\\n\");\n};\nvar logger = {\n warn: console.warn\n};\n\n// src/submodules/serde/date-utils.ts\nvar DAYS = [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"];\nvar MONTHS = [\"Jan\", \"Feb\", \"Mar\", \"Apr\", \"May\", \"Jun\", \"Jul\", \"Aug\", \"Sep\", \"Oct\", \"Nov\", \"Dec\"];\nfunction dateToUtcString(date) {\n const year = date.getUTCFullYear();\n const month = date.getUTCMonth();\n const dayOfWeek = date.getUTCDay();\n const dayOfMonthInt = date.getUTCDate();\n const hoursInt = date.getUTCHours();\n const minutesInt = date.getUTCMinutes();\n const secondsInt = date.getUTCSeconds();\n const dayOfMonthString = dayOfMonthInt < 10 ? `0${dayOfMonthInt}` : `${dayOfMonthInt}`;\n const hoursString = hoursInt < 10 ? `0${hoursInt}` : `${hoursInt}`;\n const minutesString = minutesInt < 10 ? `0${minutesInt}` : `${minutesInt}`;\n const secondsString = secondsInt < 10 ? `0${secondsInt}` : `${secondsInt}`;\n return `${DAYS[dayOfWeek]}, ${dayOfMonthString} ${MONTHS[month]} ${year} ${hoursString}:${minutesString}:${secondsString} GMT`;\n}\nvar RFC3339 = new RegExp(/^(\\d{4})-(\\d{2})-(\\d{2})[tT](\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d+))?[zZ]$/);\nvar parseRfc3339DateTime = (value) => {\n if (value === null || value === void 0) {\n return void 0;\n }\n if (typeof value !== \"string\") {\n throw new TypeError(\"RFC-3339 date-times must be expressed as strings\");\n }\n const match = RFC3339.exec(value);\n if (!match) {\n throw new TypeError(\"Invalid RFC-3339 date-time value\");\n }\n const [_, yearStr, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds] = match;\n const year = strictParseShort(stripLeadingZeroes(yearStr));\n const month = parseDateValue(monthStr, \"month\", 1, 12);\n const day = parseDateValue(dayStr, \"day\", 1, 31);\n return buildDate(year, month, day, { hours, minutes, seconds, fractionalMilliseconds });\n};\nvar RFC3339_WITH_OFFSET = new RegExp(\n /^(\\d{4})-(\\d{2})-(\\d{2})[tT](\\d{2}):(\\d{2}):(\\d{2})(?:\\.(\\d+))?(([-+]\\d{2}\\:\\d{2})|[zZ])$/\n);\nvar parseRfc3339DateTimeWithOffset = (value) => {\n if (value === null || value === void 0) {\n return void 0;\n }\n if (typeof value !== \"string\") {\n throw new TypeError(\"RFC-3339 date-times must be expressed as strings\");\n }\n const match = RFC3339_WITH_OFFSET.exec(value);\n if (!match) {\n throw new TypeError(\"Invalid RFC-3339 date-time value\");\n }\n const [_, yearStr, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds, offsetStr] = match;\n const year = strictParseShort(stripLeadingZeroes(yearStr));\n const month = parseDateValue(monthStr, \"month\", 1, 12);\n const day = parseDateValue(dayStr, \"day\", 1, 31);\n const date = buildDate(year, month, day, { hours, minutes, seconds, fractionalMilliseconds });\n if (offsetStr.toUpperCase() != \"Z\") {\n date.setTime(date.getTime() - parseOffsetToMilliseconds(offsetStr));\n }\n return date;\n};\nvar IMF_FIXDATE = new RegExp(\n /^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\\d{2}) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\\d{4}) (\\d{1,2}):(\\d{2}):(\\d{2})(?:\\.(\\d+))? GMT$/\n);\nvar RFC_850_DATE = new RegExp(\n /^(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\\d{2})-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\\d{2}) (\\d{1,2}):(\\d{2}):(\\d{2})(?:\\.(\\d+))? GMT$/\n);\nvar ASC_TIME = new RegExp(\n /^(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( [1-9]|\\d{2}) (\\d{1,2}):(\\d{2}):(\\d{2})(?:\\.(\\d+))? (\\d{4})$/\n);\nvar parseRfc7231DateTime = (value) => {\n if (value === null || value === void 0) {\n return void 0;\n }\n if (typeof value !== \"string\") {\n throw new TypeError(\"RFC-7231 date-times must be expressed as strings\");\n }\n let match = IMF_FIXDATE.exec(value);\n if (match) {\n const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match;\n return buildDate(\n strictParseShort(stripLeadingZeroes(yearStr)),\n parseMonthByShortName(monthStr),\n parseDateValue(dayStr, \"day\", 1, 31),\n { hours, minutes, seconds, fractionalMilliseconds }\n );\n }\n match = RFC_850_DATE.exec(value);\n if (match) {\n const [_, dayStr, monthStr, yearStr, hours, minutes, seconds, fractionalMilliseconds] = match;\n return adjustRfc850Year(\n buildDate(parseTwoDigitYear(yearStr), parseMonthByShortName(monthStr), parseDateValue(dayStr, \"day\", 1, 31), {\n hours,\n minutes,\n seconds,\n fractionalMilliseconds\n })\n );\n }\n match = ASC_TIME.exec(value);\n if (match) {\n const [_, monthStr, dayStr, hours, minutes, seconds, fractionalMilliseconds, yearStr] = match;\n return buildDate(\n strictParseShort(stripLeadingZeroes(yearStr)),\n parseMonthByShortName(monthStr),\n parseDateValue(dayStr.trimLeft(), \"day\", 1, 31),\n { hours, minutes, seconds, fractionalMilliseconds }\n );\n }\n throw new TypeError(\"Invalid RFC-7231 date-time value\");\n};\nvar parseEpochTimestamp = (value) => {\n if (value === null || value === void 0) {\n return void 0;\n }\n let valueAsDouble;\n if (typeof value === \"number\") {\n valueAsDouble = value;\n } else if (typeof value === \"string\") {\n valueAsDouble = strictParseDouble(value);\n } else if (typeof value === \"object\" && value.tag === 1) {\n valueAsDouble = value.value;\n } else {\n throw new TypeError(\"Epoch timestamps must be expressed as floating point numbers or their string representation\");\n }\n if (Number.isNaN(valueAsDouble) || valueAsDouble === Infinity || valueAsDouble === -Infinity) {\n throw new TypeError(\"Epoch timestamps must be valid, non-Infinite, non-NaN numerics\");\n }\n return new Date(Math.round(valueAsDouble * 1e3));\n};\nvar buildDate = (year, month, day, time) => {\n const adjustedMonth = month - 1;\n validateDayOfMonth(year, adjustedMonth, day);\n return new Date(\n Date.UTC(\n year,\n adjustedMonth,\n day,\n parseDateValue(time.hours, \"hour\", 0, 23),\n parseDateValue(time.minutes, \"minute\", 0, 59),\n // seconds can go up to 60 for leap seconds\n parseDateValue(time.seconds, \"seconds\", 0, 60),\n parseMilliseconds(time.fractionalMilliseconds)\n )\n );\n};\nvar parseTwoDigitYear = (value) => {\n const thisYear = (/* @__PURE__ */ new Date()).getUTCFullYear();\n const valueInThisCentury = Math.floor(thisYear / 100) * 100 + strictParseShort(stripLeadingZeroes(value));\n if (valueInThisCentury < thisYear) {\n return valueInThisCentury + 100;\n }\n return valueInThisCentury;\n};\nvar FIFTY_YEARS_IN_MILLIS = 50 * 365 * 24 * 60 * 60 * 1e3;\nvar adjustRfc850Year = (input) => {\n if (input.getTime() - (/* @__PURE__ */ new Date()).getTime() > FIFTY_YEARS_IN_MILLIS) {\n return new Date(\n Date.UTC(\n input.getUTCFullYear() - 100,\n input.getUTCMonth(),\n input.getUTCDate(),\n input.getUTCHours(),\n input.getUTCMinutes(),\n input.getUTCSeconds(),\n input.getUTCMilliseconds()\n )\n );\n }\n return input;\n};\nvar parseMonthByShortName = (value) => {\n const monthIdx = MONTHS.indexOf(value);\n if (monthIdx < 0) {\n throw new TypeError(`Invalid month: ${value}`);\n }\n return monthIdx + 1;\n};\nvar DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];\nvar validateDayOfMonth = (year, month, day) => {\n let maxDays = DAYS_IN_MONTH[month];\n if (month === 1 && isLeapYear(year)) {\n maxDays = 29;\n }\n if (day > maxDays) {\n throw new TypeError(`Invalid day for ${MONTHS[month]} in ${year}: ${day}`);\n }\n};\nvar isLeapYear = (year) => {\n return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);\n};\nvar parseDateValue = (value, type, lower, upper) => {\n const dateVal = strictParseByte(stripLeadingZeroes(value));\n if (dateVal < lower || dateVal > upper) {\n throw new TypeError(`${type} must be between ${lower} and ${upper}, inclusive`);\n }\n return dateVal;\n};\nvar parseMilliseconds = (value) => {\n if (value === null || value === void 0) {\n return 0;\n }\n return strictParseFloat32(\"0.\" + value) * 1e3;\n};\nvar parseOffsetToMilliseconds = (value) => {\n const directionStr = value[0];\n let direction = 1;\n if (directionStr == \"+\") {\n direction = 1;\n } else if (directionStr == \"-\") {\n direction = -1;\n } else {\n throw new TypeError(`Offset direction, ${directionStr}, must be \"+\" or \"-\"`);\n }\n const hour = Number(value.substring(1, 3));\n const minute = Number(value.substring(4, 6));\n return direction * (hour * 60 + minute) * 60 * 1e3;\n};\nvar stripLeadingZeroes = (value) => {\n let idx = 0;\n while (idx < value.length - 1 && value.charAt(idx) === \"0\") {\n idx++;\n }\n if (idx === 0) {\n return value;\n }\n return value.slice(idx);\n};\n\n// src/submodules/serde/lazy-json.ts\nvar LazyJsonString = function LazyJsonString2(val) {\n const str = Object.assign(new String(val), {\n deserializeJSON() {\n return JSON.parse(String(val));\n },\n toString() {\n return String(val);\n },\n toJSON() {\n return String(val);\n }\n });\n return str;\n};\nLazyJsonString.from = (object) => {\n if (object && typeof object === \"object\" && (object instanceof LazyJsonString || \"deserializeJSON\" in object)) {\n return object;\n } else if (typeof object === \"string\" || Object.getPrototypeOf(object) === String.prototype) {\n return LazyJsonString(String(object));\n }\n return LazyJsonString(JSON.stringify(object));\n};\nLazyJsonString.fromObject = LazyJsonString.from;\n\n// src/submodules/serde/quote-header.ts\nfunction quoteHeader(part) {\n if (part.includes(\",\") || part.includes('\"')) {\n part = `\"${part.replace(/\"/g, '\\\\\"')}\"`;\n }\n return part;\n}\n\n// src/submodules/serde/split-every.ts\nfunction splitEvery(value, delimiter, numDelimiters) {\n if (numDelimiters <= 0 || !Number.isInteger(numDelimiters)) {\n throw new Error(\"Invalid number of delimiters (\" + numDelimiters + \") for splitEvery.\");\n }\n const segments = value.split(delimiter);\n if (numDelimiters === 1) {\n return segments;\n }\n const compoundSegments = [];\n let currentSegment = \"\";\n for (let i = 0; i < segments.length; i++) {\n if (currentSegment === \"\") {\n currentSegment = segments[i];\n } else {\n currentSegment += delimiter + segments[i];\n }\n if ((i + 1) % numDelimiters === 0) {\n compoundSegments.push(currentSegment);\n currentSegment = \"\";\n }\n }\n if (currentSegment !== \"\") {\n compoundSegments.push(currentSegment);\n }\n return compoundSegments;\n}\n\n// src/submodules/serde/split-header.ts\nvar splitHeader = (value) => {\n const z = value.length;\n const values = [];\n let withinQuotes = false;\n let prevChar = void 0;\n let anchor = 0;\n for (let i = 0; i < z; ++i) {\n const char = value[i];\n switch (char) {\n case `\"`:\n if (prevChar !== \"\\\\\") {\n withinQuotes = !withinQuotes;\n }\n break;\n case \",\":\n if (!withinQuotes) {\n values.push(value.slice(anchor, i));\n anchor = i + 1;\n }\n break;\n default:\n }\n prevChar = char;\n }\n values.push(value.slice(anchor));\n return values.map((v) => {\n v = v.trim();\n const z2 = v.length;\n if (z2 < 2) {\n return v;\n }\n if (v[0] === `\"` && v[z2 - 1] === `\"`) {\n v = v.slice(1, z2 - 1);\n }\n return v.replace(/\\\\\"/g, '\"');\n });\n};\n\n// src/submodules/serde/value/NumericValue.ts\nvar NumericValue = class {\n constructor(string, type) {\n this.string = string;\n this.type = type;\n }\n};\nfunction nv(string) {\n return new NumericValue(string, \"bigDecimal\");\n}\n// Annotate the CommonJS export names for ESM import in node:\n0 && (module.exports = {\n LazyJsonString,\n NumericValue,\n copyDocumentWithTransform,\n dateToUtcString,\n expectBoolean,\n expectByte,\n expectFloat32,\n expectInt,\n expectInt32,\n expectLong,\n expectNonNull,\n expectNumber,\n expectObject,\n expectShort,\n expectString,\n expectUnion,\n handleFloat,\n limitedParseDouble,\n limitedParseFloat,\n limitedParseFloat32,\n logger,\n nv,\n parseBoolean,\n parseEpochTimestamp,\n parseRfc3339DateTime,\n parseRfc3339DateTimeWithOffset,\n parseRfc7231DateTime,\n quoteHeader,\n splitEvery,\n splitHeader,\n strictParseByte,\n strictParseDouble,\n strictParseFloat,\n strictParseFloat32,\n strictParseInt,\n strictParseInt32,\n strictParseLong,\n strictParseShort\n});\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n AlgorithmId: () => AlgorithmId,\n EndpointURLScheme: () => EndpointURLScheme,\n FieldPosition: () => FieldPosition,\n HttpApiKeyAuthLocation: () => HttpApiKeyAuthLocation,\n HttpAuthLocation: () => HttpAuthLocation,\n IniSectionType: () => IniSectionType,\n RequestHandlerProtocol: () => RequestHandlerProtocol,\n SMITHY_CONTEXT_KEY: () => SMITHY_CONTEXT_KEY,\n getDefaultClientConfiguration: () => getDefaultClientConfiguration,\n resolveDefaultRuntimeConfig: () => resolveDefaultRuntimeConfig\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/auth/auth.ts\nvar HttpAuthLocation = /* @__PURE__ */ ((HttpAuthLocation2) => {\n HttpAuthLocation2[\"HEADER\"] = \"header\";\n HttpAuthLocation2[\"QUERY\"] = \"query\";\n return HttpAuthLocation2;\n})(HttpAuthLocation || {});\n\n// src/auth/HttpApiKeyAuth.ts\nvar HttpApiKeyAuthLocation = /* @__PURE__ */ ((HttpApiKeyAuthLocation2) => {\n HttpApiKeyAuthLocation2[\"HEADER\"] = \"header\";\n HttpApiKeyAuthLocation2[\"QUERY\"] = \"query\";\n return HttpApiKeyAuthLocation2;\n})(HttpApiKeyAuthLocation || {});\n\n// src/endpoint.ts\nvar EndpointURLScheme = /* @__PURE__ */ ((EndpointURLScheme2) => {\n EndpointURLScheme2[\"HTTP\"] = \"http\";\n EndpointURLScheme2[\"HTTPS\"] = \"https\";\n return EndpointURLScheme2;\n})(EndpointURLScheme || {});\n\n// src/extensions/checksum.ts\nvar AlgorithmId = /* @__PURE__ */ ((AlgorithmId2) => {\n AlgorithmId2[\"MD5\"] = \"md5\";\n AlgorithmId2[\"CRC32\"] = \"crc32\";\n AlgorithmId2[\"CRC32C\"] = \"crc32c\";\n AlgorithmId2[\"SHA1\"] = \"sha1\";\n AlgorithmId2[\"SHA256\"] = \"sha256\";\n return AlgorithmId2;\n})(AlgorithmId || {});\nvar getChecksumConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {\n const checksumAlgorithms = [];\n if (runtimeConfig.sha256 !== void 0) {\n checksumAlgorithms.push({\n algorithmId: () => \"sha256\" /* SHA256 */,\n checksumConstructor: () => runtimeConfig.sha256\n });\n }\n if (runtimeConfig.md5 != void 0) {\n checksumAlgorithms.push({\n algorithmId: () => \"md5\" /* MD5 */,\n checksumConstructor: () => runtimeConfig.md5\n });\n }\n return {\n addChecksumAlgorithm(algo) {\n checksumAlgorithms.push(algo);\n },\n checksumAlgorithms() {\n return checksumAlgorithms;\n }\n };\n}, \"getChecksumConfiguration\");\nvar resolveChecksumRuntimeConfig = /* @__PURE__ */ __name((clientConfig) => {\n const runtimeConfig = {};\n clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => {\n runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor();\n });\n return runtimeConfig;\n}, \"resolveChecksumRuntimeConfig\");\n\n// src/extensions/defaultClientConfiguration.ts\nvar getDefaultClientConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {\n return getChecksumConfiguration(runtimeConfig);\n}, \"getDefaultClientConfiguration\");\nvar resolveDefaultRuntimeConfig = /* @__PURE__ */ __name((config) => {\n return resolveChecksumRuntimeConfig(config);\n}, \"resolveDefaultRuntimeConfig\");\n\n// src/http.ts\nvar FieldPosition = /* @__PURE__ */ ((FieldPosition2) => {\n FieldPosition2[FieldPosition2[\"HEADER\"] = 0] = \"HEADER\";\n FieldPosition2[FieldPosition2[\"TRAILER\"] = 1] = \"TRAILER\";\n return FieldPosition2;\n})(FieldPosition || {});\n\n// src/middleware.ts\nvar SMITHY_CONTEXT_KEY = \"__smithy_context\";\n\n// src/profile.ts\nvar IniSectionType = /* @__PURE__ */ ((IniSectionType2) => {\n IniSectionType2[\"PROFILE\"] = \"profile\";\n IniSectionType2[\"SSO_SESSION\"] = \"sso-session\";\n IniSectionType2[\"SERVICES\"] = \"services\";\n return IniSectionType2;\n})(IniSectionType || {});\n\n// src/transfer.ts\nvar RequestHandlerProtocol = /* @__PURE__ */ ((RequestHandlerProtocol2) => {\n RequestHandlerProtocol2[\"HTTP_0_9\"] = \"http/0.9\";\n RequestHandlerProtocol2[\"HTTP_1_0\"] = \"http/1.0\";\n RequestHandlerProtocol2[\"TDS_8_0\"] = \"tds/8.0\";\n return RequestHandlerProtocol2;\n})(RequestHandlerProtocol || {});\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n HttpAuthLocation,\n HttpApiKeyAuthLocation,\n EndpointURLScheme,\n AlgorithmId,\n getDefaultClientConfiguration,\n resolveDefaultRuntimeConfig,\n FieldPosition,\n SMITHY_CONTEXT_KEY,\n IniSectionType,\n RequestHandlerProtocol\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n DEFAULT_MAX_RETRIES: () => DEFAULT_MAX_RETRIES,\n DEFAULT_TIMEOUT: () => DEFAULT_TIMEOUT,\n ENV_CMDS_AUTH_TOKEN: () => ENV_CMDS_AUTH_TOKEN,\n ENV_CMDS_FULL_URI: () => ENV_CMDS_FULL_URI,\n ENV_CMDS_RELATIVE_URI: () => ENV_CMDS_RELATIVE_URI,\n Endpoint: () => Endpoint,\n fromContainerMetadata: () => fromContainerMetadata,\n fromInstanceMetadata: () => fromInstanceMetadata,\n getInstanceMetadataEndpoint: () => getInstanceMetadataEndpoint,\n httpRequest: () => httpRequest,\n providerConfigFromInit: () => providerConfigFromInit\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/fromContainerMetadata.ts\n\nvar import_url = require(\"url\");\n\n// src/remoteProvider/httpRequest.ts\nvar import_property_provider = require(\"@smithy/property-provider\");\nvar import_buffer = require(\"buffer\");\nvar import_http = require(\"http\");\nfunction httpRequest(options) {\n return new Promise((resolve, reject) => {\n const req = (0, import_http.request)({\n method: \"GET\",\n ...options,\n // Node.js http module doesn't accept hostname with square brackets\n // Refs: https://github.com/nodejs/node/issues/39738\n hostname: options.hostname?.replace(/^\\[(.+)\\]$/, \"$1\")\n });\n req.on(\"error\", (err) => {\n reject(Object.assign(new import_property_provider.ProviderError(\"Unable to connect to instance metadata service\"), err));\n req.destroy();\n });\n req.on(\"timeout\", () => {\n reject(new import_property_provider.ProviderError(\"TimeoutError from instance metadata service\"));\n req.destroy();\n });\n req.on(\"response\", (res) => {\n const { statusCode = 400 } = res;\n if (statusCode < 200 || 300 <= statusCode) {\n reject(\n Object.assign(new import_property_provider.ProviderError(\"Error response received from instance metadata service\"), { statusCode })\n );\n req.destroy();\n }\n const chunks = [];\n res.on(\"data\", (chunk) => {\n chunks.push(chunk);\n });\n res.on(\"end\", () => {\n resolve(import_buffer.Buffer.concat(chunks));\n req.destroy();\n });\n });\n req.end();\n });\n}\n__name(httpRequest, \"httpRequest\");\n\n// src/remoteProvider/ImdsCredentials.ts\nvar isImdsCredentials = /* @__PURE__ */ __name((arg) => Boolean(arg) && typeof arg === \"object\" && typeof arg.AccessKeyId === \"string\" && typeof arg.SecretAccessKey === \"string\" && typeof arg.Token === \"string\" && typeof arg.Expiration === \"string\", \"isImdsCredentials\");\nvar fromImdsCredentials = /* @__PURE__ */ __name((creds) => ({\n accessKeyId: creds.AccessKeyId,\n secretAccessKey: creds.SecretAccessKey,\n sessionToken: creds.Token,\n expiration: new Date(creds.Expiration),\n ...creds.AccountId && { accountId: creds.AccountId }\n}), \"fromImdsCredentials\");\n\n// src/remoteProvider/RemoteProviderInit.ts\nvar DEFAULT_TIMEOUT = 1e3;\nvar DEFAULT_MAX_RETRIES = 0;\nvar providerConfigFromInit = /* @__PURE__ */ __name(({\n maxRetries = DEFAULT_MAX_RETRIES,\n timeout = DEFAULT_TIMEOUT\n}) => ({ maxRetries, timeout }), \"providerConfigFromInit\");\n\n// src/remoteProvider/retry.ts\nvar retry = /* @__PURE__ */ __name((toRetry, maxRetries) => {\n let promise = toRetry();\n for (let i = 0; i < maxRetries; i++) {\n promise = promise.catch(toRetry);\n }\n return promise;\n}, \"retry\");\n\n// src/fromContainerMetadata.ts\nvar ENV_CMDS_FULL_URI = \"AWS_CONTAINER_CREDENTIALS_FULL_URI\";\nvar ENV_CMDS_RELATIVE_URI = \"AWS_CONTAINER_CREDENTIALS_RELATIVE_URI\";\nvar ENV_CMDS_AUTH_TOKEN = \"AWS_CONTAINER_AUTHORIZATION_TOKEN\";\nvar fromContainerMetadata = /* @__PURE__ */ __name((init = {}) => {\n const { timeout, maxRetries } = providerConfigFromInit(init);\n return () => retry(async () => {\n const requestOptions = await getCmdsUri({ logger: init.logger });\n const credsResponse = JSON.parse(await requestFromEcsImds(timeout, requestOptions));\n if (!isImdsCredentials(credsResponse)) {\n throw new import_property_provider.CredentialsProviderError(\"Invalid response received from instance metadata service.\", {\n logger: init.logger\n });\n }\n return fromImdsCredentials(credsResponse);\n }, maxRetries);\n}, \"fromContainerMetadata\");\nvar requestFromEcsImds = /* @__PURE__ */ __name(async (timeout, options) => {\n if (process.env[ENV_CMDS_AUTH_TOKEN]) {\n options.headers = {\n ...options.headers,\n Authorization: process.env[ENV_CMDS_AUTH_TOKEN]\n };\n }\n const buffer = await httpRequest({\n ...options,\n timeout\n });\n return buffer.toString();\n}, \"requestFromEcsImds\");\nvar CMDS_IP = \"169.254.170.2\";\nvar GREENGRASS_HOSTS = {\n localhost: true,\n \"127.0.0.1\": true\n};\nvar GREENGRASS_PROTOCOLS = {\n \"http:\": true,\n \"https:\": true\n};\nvar getCmdsUri = /* @__PURE__ */ __name(async ({ logger }) => {\n if (process.env[ENV_CMDS_RELATIVE_URI]) {\n return {\n hostname: CMDS_IP,\n path: process.env[ENV_CMDS_RELATIVE_URI]\n };\n }\n if (process.env[ENV_CMDS_FULL_URI]) {\n const parsed = (0, import_url.parse)(process.env[ENV_CMDS_FULL_URI]);\n if (!parsed.hostname || !(parsed.hostname in GREENGRASS_HOSTS)) {\n throw new import_property_provider.CredentialsProviderError(`${parsed.hostname} is not a valid container metadata service hostname`, {\n tryNextLink: false,\n logger\n });\n }\n if (!parsed.protocol || !(parsed.protocol in GREENGRASS_PROTOCOLS)) {\n throw new import_property_provider.CredentialsProviderError(`${parsed.protocol} is not a valid container metadata service protocol`, {\n tryNextLink: false,\n logger\n });\n }\n return {\n ...parsed,\n port: parsed.port ? parseInt(parsed.port, 10) : void 0\n };\n }\n throw new import_property_provider.CredentialsProviderError(\n `The container metadata credential provider cannot be used unless the ${ENV_CMDS_RELATIVE_URI} or ${ENV_CMDS_FULL_URI} environment variable is set`,\n {\n tryNextLink: false,\n logger\n }\n );\n}, \"getCmdsUri\");\n\n// src/fromInstanceMetadata.ts\n\n\n\n// src/error/InstanceMetadataV1FallbackError.ts\n\nvar InstanceMetadataV1FallbackError = class _InstanceMetadataV1FallbackError extends import_property_provider.CredentialsProviderError {\n constructor(message, tryNextLink = true) {\n super(message, tryNextLink);\n this.tryNextLink = tryNextLink;\n this.name = \"InstanceMetadataV1FallbackError\";\n Object.setPrototypeOf(this, _InstanceMetadataV1FallbackError.prototype);\n }\n static {\n __name(this, \"InstanceMetadataV1FallbackError\");\n }\n};\n\n// src/utils/getInstanceMetadataEndpoint.ts\nvar import_node_config_provider = require(\"@smithy/node-config-provider\");\nvar import_url_parser = require(\"@smithy/url-parser\");\n\n// src/config/Endpoint.ts\nvar Endpoint = /* @__PURE__ */ ((Endpoint2) => {\n Endpoint2[\"IPv4\"] = \"http://169.254.169.254\";\n Endpoint2[\"IPv6\"] = \"http://[fd00:ec2::254]\";\n return Endpoint2;\n})(Endpoint || {});\n\n// src/config/EndpointConfigOptions.ts\nvar ENV_ENDPOINT_NAME = \"AWS_EC2_METADATA_SERVICE_ENDPOINT\";\nvar CONFIG_ENDPOINT_NAME = \"ec2_metadata_service_endpoint\";\nvar ENDPOINT_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => env[ENV_ENDPOINT_NAME],\n configFileSelector: (profile) => profile[CONFIG_ENDPOINT_NAME],\n default: void 0\n};\n\n// src/config/EndpointMode.ts\nvar EndpointMode = /* @__PURE__ */ ((EndpointMode2) => {\n EndpointMode2[\"IPv4\"] = \"IPv4\";\n EndpointMode2[\"IPv6\"] = \"IPv6\";\n return EndpointMode2;\n})(EndpointMode || {});\n\n// src/config/EndpointModeConfigOptions.ts\nvar ENV_ENDPOINT_MODE_NAME = \"AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE\";\nvar CONFIG_ENDPOINT_MODE_NAME = \"ec2_metadata_service_endpoint_mode\";\nvar ENDPOINT_MODE_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => env[ENV_ENDPOINT_MODE_NAME],\n configFileSelector: (profile) => profile[CONFIG_ENDPOINT_MODE_NAME],\n default: \"IPv4\" /* IPv4 */\n};\n\n// src/utils/getInstanceMetadataEndpoint.ts\nvar getInstanceMetadataEndpoint = /* @__PURE__ */ __name(async () => (0, import_url_parser.parseUrl)(await getFromEndpointConfig() || await getFromEndpointModeConfig()), \"getInstanceMetadataEndpoint\");\nvar getFromEndpointConfig = /* @__PURE__ */ __name(async () => (0, import_node_config_provider.loadConfig)(ENDPOINT_CONFIG_OPTIONS)(), \"getFromEndpointConfig\");\nvar getFromEndpointModeConfig = /* @__PURE__ */ __name(async () => {\n const endpointMode = await (0, import_node_config_provider.loadConfig)(ENDPOINT_MODE_CONFIG_OPTIONS)();\n switch (endpointMode) {\n case \"IPv4\" /* IPv4 */:\n return \"http://169.254.169.254\" /* IPv4 */;\n case \"IPv6\" /* IPv6 */:\n return \"http://[fd00:ec2::254]\" /* IPv6 */;\n default:\n throw new Error(`Unsupported endpoint mode: ${endpointMode}. Select from ${Object.values(EndpointMode)}`);\n }\n}, \"getFromEndpointModeConfig\");\n\n// src/utils/getExtendedInstanceMetadataCredentials.ts\nvar STATIC_STABILITY_REFRESH_INTERVAL_SECONDS = 5 * 60;\nvar STATIC_STABILITY_REFRESH_INTERVAL_JITTER_WINDOW_SECONDS = 5 * 60;\nvar STATIC_STABILITY_DOC_URL = \"https://docs.aws.amazon.com/sdkref/latest/guide/feature-static-credentials.html\";\nvar getExtendedInstanceMetadataCredentials = /* @__PURE__ */ __name((credentials, logger) => {\n const refreshInterval = STATIC_STABILITY_REFRESH_INTERVAL_SECONDS + Math.floor(Math.random() * STATIC_STABILITY_REFRESH_INTERVAL_JITTER_WINDOW_SECONDS);\n const newExpiration = new Date(Date.now() + refreshInterval * 1e3);\n logger.warn(\n `Attempting credential expiration extension due to a credential service availability issue. A refresh of these credentials will be attempted after ${new Date(newExpiration)}.\nFor more information, please visit: ` + STATIC_STABILITY_DOC_URL\n );\n const originalExpiration = credentials.originalExpiration ?? credentials.expiration;\n return {\n ...credentials,\n ...originalExpiration ? { originalExpiration } : {},\n expiration: newExpiration\n };\n}, \"getExtendedInstanceMetadataCredentials\");\n\n// src/utils/staticStabilityProvider.ts\nvar staticStabilityProvider = /* @__PURE__ */ __name((provider, options = {}) => {\n const logger = options?.logger || console;\n let pastCredentials;\n return async () => {\n let credentials;\n try {\n credentials = await provider();\n if (credentials.expiration && credentials.expiration.getTime() < Date.now()) {\n credentials = getExtendedInstanceMetadataCredentials(credentials, logger);\n }\n } catch (e) {\n if (pastCredentials) {\n logger.warn(\"Credential renew failed: \", e);\n credentials = getExtendedInstanceMetadataCredentials(pastCredentials, logger);\n } else {\n throw e;\n }\n }\n pastCredentials = credentials;\n return credentials;\n };\n}, \"staticStabilityProvider\");\n\n// src/fromInstanceMetadata.ts\nvar IMDS_PATH = \"/latest/meta-data/iam/security-credentials/\";\nvar IMDS_TOKEN_PATH = \"/latest/api/token\";\nvar AWS_EC2_METADATA_V1_DISABLED = \"AWS_EC2_METADATA_V1_DISABLED\";\nvar PROFILE_AWS_EC2_METADATA_V1_DISABLED = \"ec2_metadata_v1_disabled\";\nvar X_AWS_EC2_METADATA_TOKEN = \"x-aws-ec2-metadata-token\";\nvar fromInstanceMetadata = /* @__PURE__ */ __name((init = {}) => staticStabilityProvider(getInstanceMetadataProvider(init), { logger: init.logger }), \"fromInstanceMetadata\");\nvar getInstanceMetadataProvider = /* @__PURE__ */ __name((init = {}) => {\n let disableFetchToken = false;\n const { logger, profile } = init;\n const { timeout, maxRetries } = providerConfigFromInit(init);\n const getCredentials = /* @__PURE__ */ __name(async (maxRetries2, options) => {\n const isImdsV1Fallback = disableFetchToken || options.headers?.[X_AWS_EC2_METADATA_TOKEN] == null;\n if (isImdsV1Fallback) {\n let fallbackBlockedFromProfile = false;\n let fallbackBlockedFromProcessEnv = false;\n const configValue = await (0, import_node_config_provider.loadConfig)(\n {\n environmentVariableSelector: (env) => {\n const envValue = env[AWS_EC2_METADATA_V1_DISABLED];\n fallbackBlockedFromProcessEnv = !!envValue && envValue !== \"false\";\n if (envValue === void 0) {\n throw new import_property_provider.CredentialsProviderError(\n `${AWS_EC2_METADATA_V1_DISABLED} not set in env, checking config file next.`,\n { logger: init.logger }\n );\n }\n return fallbackBlockedFromProcessEnv;\n },\n configFileSelector: (profile2) => {\n const profileValue = profile2[PROFILE_AWS_EC2_METADATA_V1_DISABLED];\n fallbackBlockedFromProfile = !!profileValue && profileValue !== \"false\";\n return fallbackBlockedFromProfile;\n },\n default: false\n },\n {\n profile\n }\n )();\n if (init.ec2MetadataV1Disabled || configValue) {\n const causes = [];\n if (init.ec2MetadataV1Disabled)\n causes.push(\"credential provider initialization (runtime option ec2MetadataV1Disabled)\");\n if (fallbackBlockedFromProfile)\n causes.push(`config file profile (${PROFILE_AWS_EC2_METADATA_V1_DISABLED})`);\n if (fallbackBlockedFromProcessEnv)\n causes.push(`process environment variable (${AWS_EC2_METADATA_V1_DISABLED})`);\n throw new InstanceMetadataV1FallbackError(\n `AWS EC2 Metadata v1 fallback has been blocked by AWS SDK configuration in the following: [${causes.join(\n \", \"\n )}].`\n );\n }\n }\n const imdsProfile = (await retry(async () => {\n let profile2;\n try {\n profile2 = await getProfile(options);\n } catch (err) {\n if (err.statusCode === 401) {\n disableFetchToken = false;\n }\n throw err;\n }\n return profile2;\n }, maxRetries2)).trim();\n return retry(async () => {\n let creds;\n try {\n creds = await getCredentialsFromProfile(imdsProfile, options, init);\n } catch (err) {\n if (err.statusCode === 401) {\n disableFetchToken = false;\n }\n throw err;\n }\n return creds;\n }, maxRetries2);\n }, \"getCredentials\");\n return async () => {\n const endpoint = await getInstanceMetadataEndpoint();\n if (disableFetchToken) {\n logger?.debug(\"AWS SDK Instance Metadata\", \"using v1 fallback (no token fetch)\");\n return getCredentials(maxRetries, { ...endpoint, timeout });\n } else {\n let token;\n try {\n token = (await getMetadataToken({ ...endpoint, timeout })).toString();\n } catch (error) {\n if (error?.statusCode === 400) {\n throw Object.assign(error, {\n message: \"EC2 Metadata token request returned error\"\n });\n } else if (error.message === \"TimeoutError\" || [403, 404, 405].includes(error.statusCode)) {\n disableFetchToken = true;\n }\n logger?.debug(\"AWS SDK Instance Metadata\", \"using v1 fallback (initial)\");\n return getCredentials(maxRetries, { ...endpoint, timeout });\n }\n return getCredentials(maxRetries, {\n ...endpoint,\n headers: {\n [X_AWS_EC2_METADATA_TOKEN]: token\n },\n timeout\n });\n }\n };\n}, \"getInstanceMetadataProvider\");\nvar getMetadataToken = /* @__PURE__ */ __name(async (options) => httpRequest({\n ...options,\n path: IMDS_TOKEN_PATH,\n method: \"PUT\",\n headers: {\n \"x-aws-ec2-metadata-token-ttl-seconds\": \"21600\"\n }\n}), \"getMetadataToken\");\nvar getProfile = /* @__PURE__ */ __name(async (options) => (await httpRequest({ ...options, path: IMDS_PATH })).toString(), \"getProfile\");\nvar getCredentialsFromProfile = /* @__PURE__ */ __name(async (profile, options, init) => {\n const credentialsResponse = JSON.parse(\n (await httpRequest({\n ...options,\n path: IMDS_PATH + profile\n })).toString()\n );\n if (!isImdsCredentials(credentialsResponse)) {\n throw new import_property_provider.CredentialsProviderError(\"Invalid response received from instance metadata service.\", {\n logger: init.logger\n });\n }\n return fromImdsCredentials(credentialsResponse);\n}, \"getCredentialsFromProfile\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n httpRequest,\n getInstanceMetadataEndpoint,\n Endpoint,\n ENV_CMDS_FULL_URI,\n ENV_CMDS_RELATIVE_URI,\n ENV_CMDS_AUTH_TOKEN,\n fromContainerMetadata,\n fromInstanceMetadata,\n DEFAULT_TIMEOUT,\n DEFAULT_MAX_RETRIES,\n providerConfigFromInit\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n FetchHttpHandler: () => FetchHttpHandler,\n keepAliveSupport: () => keepAliveSupport,\n streamCollector: () => streamCollector\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/fetch-http-handler.ts\nvar import_protocol_http = require(\"@smithy/protocol-http\");\nvar import_querystring_builder = require(\"@smithy/querystring-builder\");\n\n// src/create-request.ts\nfunction createRequest(url, requestOptions) {\n return new Request(url, requestOptions);\n}\n__name(createRequest, \"createRequest\");\n\n// src/request-timeout.ts\nfunction requestTimeout(timeoutInMs = 0) {\n return new Promise((resolve, reject) => {\n if (timeoutInMs) {\n setTimeout(() => {\n const timeoutError = new Error(`Request did not complete within ${timeoutInMs} ms`);\n timeoutError.name = \"TimeoutError\";\n reject(timeoutError);\n }, timeoutInMs);\n }\n });\n}\n__name(requestTimeout, \"requestTimeout\");\n\n// src/fetch-http-handler.ts\nvar keepAliveSupport = {\n supported: void 0\n};\nvar FetchHttpHandler = class _FetchHttpHandler {\n static {\n __name(this, \"FetchHttpHandler\");\n }\n /**\n * @returns the input if it is an HttpHandler of any class,\n * or instantiates a new instance of this handler.\n */\n static create(instanceOrOptions) {\n if (typeof instanceOrOptions?.handle === \"function\") {\n return instanceOrOptions;\n }\n return new _FetchHttpHandler(instanceOrOptions);\n }\n constructor(options) {\n if (typeof options === \"function\") {\n this.configProvider = options().then((opts) => opts || {});\n } else {\n this.config = options ?? {};\n this.configProvider = Promise.resolve(this.config);\n }\n if (keepAliveSupport.supported === void 0) {\n keepAliveSupport.supported = Boolean(\n typeof Request !== \"undefined\" && \"keepalive\" in createRequest(\"https://[::1]\")\n );\n }\n }\n destroy() {\n }\n async handle(request, { abortSignal } = {}) {\n if (!this.config) {\n this.config = await this.configProvider;\n }\n const requestTimeoutInMs = this.config.requestTimeout;\n const keepAlive = this.config.keepAlive === true;\n const credentials = this.config.credentials;\n if (abortSignal?.aborted) {\n const abortError = new Error(\"Request aborted\");\n abortError.name = \"AbortError\";\n return Promise.reject(abortError);\n }\n let path = request.path;\n const queryString = (0, import_querystring_builder.buildQueryString)(request.query || {});\n if (queryString) {\n path += `?${queryString}`;\n }\n if (request.fragment) {\n path += `#${request.fragment}`;\n }\n let auth = \"\";\n if (request.username != null || request.password != null) {\n const username = request.username ?? \"\";\n const password = request.password ?? \"\";\n auth = `${username}:${password}@`;\n }\n const { port, method } = request;\n const url = `${request.protocol}//${auth}${request.hostname}${port ? `:${port}` : \"\"}${path}`;\n const body = method === \"GET\" || method === \"HEAD\" ? void 0 : request.body;\n const requestOptions = {\n body,\n headers: new Headers(request.headers),\n method,\n credentials\n };\n if (this.config?.cache) {\n requestOptions.cache = this.config.cache;\n }\n if (body) {\n requestOptions.duplex = \"half\";\n }\n if (typeof AbortController !== \"undefined\") {\n requestOptions.signal = abortSignal;\n }\n if (keepAliveSupport.supported) {\n requestOptions.keepalive = keepAlive;\n }\n if (typeof this.config.requestInit === \"function\") {\n Object.assign(requestOptions, this.config.requestInit(request));\n }\n let removeSignalEventListener = /* @__PURE__ */ __name(() => {\n }, \"removeSignalEventListener\");\n const fetchRequest = createRequest(url, requestOptions);\n const raceOfPromises = [\n fetch(fetchRequest).then((response) => {\n const fetchHeaders = response.headers;\n const transformedHeaders = {};\n for (const pair of fetchHeaders.entries()) {\n transformedHeaders[pair[0]] = pair[1];\n }\n const hasReadableStream = response.body != void 0;\n if (!hasReadableStream) {\n return response.blob().then((body2) => ({\n response: new import_protocol_http.HttpResponse({\n headers: transformedHeaders,\n reason: response.statusText,\n statusCode: response.status,\n body: body2\n })\n }));\n }\n return {\n response: new import_protocol_http.HttpResponse({\n headers: transformedHeaders,\n reason: response.statusText,\n statusCode: response.status,\n body: response.body\n })\n };\n }),\n requestTimeout(requestTimeoutInMs)\n ];\n if (abortSignal) {\n raceOfPromises.push(\n new Promise((resolve, reject) => {\n const onAbort = /* @__PURE__ */ __name(() => {\n const abortError = new Error(\"Request aborted\");\n abortError.name = \"AbortError\";\n reject(abortError);\n }, \"onAbort\");\n if (typeof abortSignal.addEventListener === \"function\") {\n const signal = abortSignal;\n signal.addEventListener(\"abort\", onAbort, { once: true });\n removeSignalEventListener = /* @__PURE__ */ __name(() => signal.removeEventListener(\"abort\", onAbort), \"removeSignalEventListener\");\n } else {\n abortSignal.onabort = onAbort;\n }\n })\n );\n }\n return Promise.race(raceOfPromises).finally(removeSignalEventListener);\n }\n updateHttpClientConfig(key, value) {\n this.config = void 0;\n this.configProvider = this.configProvider.then((config) => {\n config[key] = value;\n return config;\n });\n }\n httpHandlerConfigs() {\n return this.config ?? {};\n }\n};\n\n// src/stream-collector.ts\nvar import_util_base64 = require(\"@smithy/util-base64\");\nvar streamCollector = /* @__PURE__ */ __name(async (stream) => {\n if (typeof Blob === \"function\" && stream instanceof Blob || stream.constructor?.name === \"Blob\") {\n if (Blob.prototype.arrayBuffer !== void 0) {\n return new Uint8Array(await stream.arrayBuffer());\n }\n return collectBlob(stream);\n }\n return collectStream(stream);\n}, \"streamCollector\");\nasync function collectBlob(blob) {\n const base64 = await readToBase64(blob);\n const arrayBuffer = (0, import_util_base64.fromBase64)(base64);\n return new Uint8Array(arrayBuffer);\n}\n__name(collectBlob, \"collectBlob\");\nasync function collectStream(stream) {\n const chunks = [];\n const reader = stream.getReader();\n let isDone = false;\n let length = 0;\n while (!isDone) {\n const { done, value } = await reader.read();\n if (value) {\n chunks.push(value);\n length += value.length;\n }\n isDone = done;\n }\n const collected = new Uint8Array(length);\n let offset = 0;\n for (const chunk of chunks) {\n collected.set(chunk, offset);\n offset += chunk.length;\n }\n return collected;\n}\n__name(collectStream, \"collectStream\");\nfunction readToBase64(blob) {\n return new Promise((resolve, reject) => {\n const reader = new FileReader();\n reader.onloadend = () => {\n if (reader.readyState !== 2) {\n return reject(new Error(\"Reader aborted too early\"));\n }\n const result = reader.result ?? \"\";\n const commaIndex = result.indexOf(\",\");\n const dataOffset = commaIndex > -1 ? commaIndex + 1 : result.length;\n resolve(result.substring(dataOffset));\n };\n reader.onabort = () => reject(new Error(\"Read aborted\"));\n reader.onerror = () => reject(reader.error);\n reader.readAsDataURL(blob);\n });\n}\n__name(readToBase64, \"readToBase64\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n keepAliveSupport,\n FetchHttpHandler,\n streamCollector\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n Hash: () => Hash\n});\nmodule.exports = __toCommonJS(src_exports);\nvar import_util_buffer_from = require(\"@smithy/util-buffer-from\");\nvar import_util_utf8 = require(\"@smithy/util-utf8\");\nvar import_buffer = require(\"buffer\");\nvar import_crypto = require(\"crypto\");\nvar Hash = class {\n static {\n __name(this, \"Hash\");\n }\n constructor(algorithmIdentifier, secret) {\n this.algorithmIdentifier = algorithmIdentifier;\n this.secret = secret;\n this.reset();\n }\n update(toHash, encoding) {\n this.hash.update((0, import_util_utf8.toUint8Array)(castSourceData(toHash, encoding)));\n }\n digest() {\n return Promise.resolve(this.hash.digest());\n }\n reset() {\n this.hash = this.secret ? (0, import_crypto.createHmac)(this.algorithmIdentifier, castSourceData(this.secret)) : (0, import_crypto.createHash)(this.algorithmIdentifier);\n }\n};\nfunction castSourceData(toCast, encoding) {\n if (import_buffer.Buffer.isBuffer(toCast)) {\n return toCast;\n }\n if (typeof toCast === \"string\") {\n return (0, import_util_buffer_from.fromString)(toCast, encoding);\n }\n if (ArrayBuffer.isView(toCast)) {\n return (0, import_util_buffer_from.fromArrayBuffer)(toCast.buffer, toCast.byteOffset, toCast.byteLength);\n }\n return (0, import_util_buffer_from.fromArrayBuffer)(toCast);\n}\n__name(castSourceData, \"castSourceData\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n Hash\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n isArrayBuffer: () => isArrayBuffer\n});\nmodule.exports = __toCommonJS(src_exports);\nvar isArrayBuffer = /* @__PURE__ */ __name((arg) => typeof ArrayBuffer === \"function\" && arg instanceof ArrayBuffer || Object.prototype.toString.call(arg) === \"[object ArrayBuffer]\", \"isArrayBuffer\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n isArrayBuffer\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n contentLengthMiddleware: () => contentLengthMiddleware,\n contentLengthMiddlewareOptions: () => contentLengthMiddlewareOptions,\n getContentLengthPlugin: () => getContentLengthPlugin\n});\nmodule.exports = __toCommonJS(src_exports);\nvar import_protocol_http = require(\"@smithy/protocol-http\");\nvar CONTENT_LENGTH_HEADER = \"content-length\";\nfunction contentLengthMiddleware(bodyLengthChecker) {\n return (next) => async (args) => {\n const request = args.request;\n if (import_protocol_http.HttpRequest.isInstance(request)) {\n const { body, headers } = request;\n if (body && Object.keys(headers).map((str) => str.toLowerCase()).indexOf(CONTENT_LENGTH_HEADER) === -1) {\n try {\n const length = bodyLengthChecker(body);\n request.headers = {\n ...request.headers,\n [CONTENT_LENGTH_HEADER]: String(length)\n };\n } catch (error) {\n }\n }\n }\n return next({\n ...args,\n request\n });\n };\n}\n__name(contentLengthMiddleware, \"contentLengthMiddleware\");\nvar contentLengthMiddlewareOptions = {\n step: \"build\",\n tags: [\"SET_CONTENT_LENGTH\", \"CONTENT_LENGTH\"],\n name: \"contentLengthMiddleware\",\n override: true\n};\nvar getContentLengthPlugin = /* @__PURE__ */ __name((options) => ({\n applyToStack: (clientStack) => {\n clientStack.add(contentLengthMiddleware(options.bodyLengthChecker), contentLengthMiddlewareOptions);\n }\n}), \"getContentLengthPlugin\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n contentLengthMiddlewareOptions,\n getContentLengthPlugin,\n contentLengthMiddleware\n});\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getEndpointFromConfig = void 0;\nconst node_config_provider_1 = require(\"@smithy/node-config-provider\");\nconst getEndpointUrlConfig_1 = require(\"./getEndpointUrlConfig\");\nconst getEndpointFromConfig = async (serviceId) => (0, node_config_provider_1.loadConfig)((0, getEndpointUrlConfig_1.getEndpointUrlConfig)(serviceId !== null && serviceId !== void 0 ? serviceId : \"\"))();\nexports.getEndpointFromConfig = getEndpointFromConfig;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getEndpointUrlConfig = void 0;\nconst shared_ini_file_loader_1 = require(\"@smithy/shared-ini-file-loader\");\nconst ENV_ENDPOINT_URL = \"AWS_ENDPOINT_URL\";\nconst CONFIG_ENDPOINT_URL = \"endpoint_url\";\nconst getEndpointUrlConfig = (serviceId) => ({\n environmentVariableSelector: (env) => {\n const serviceSuffixParts = serviceId.split(\" \").map((w) => w.toUpperCase());\n const serviceEndpointUrl = env[[ENV_ENDPOINT_URL, ...serviceSuffixParts].join(\"_\")];\n if (serviceEndpointUrl)\n return serviceEndpointUrl;\n const endpointUrl = env[ENV_ENDPOINT_URL];\n if (endpointUrl)\n return endpointUrl;\n return undefined;\n },\n configFileSelector: (profile, config) => {\n if (config && profile.services) {\n const servicesSection = config[[\"services\", profile.services].join(shared_ini_file_loader_1.CONFIG_PREFIX_SEPARATOR)];\n if (servicesSection) {\n const servicePrefixParts = serviceId.split(\" \").map((w) => w.toLowerCase());\n const endpointUrl = servicesSection[[servicePrefixParts.join(\"_\"), CONFIG_ENDPOINT_URL].join(shared_ini_file_loader_1.CONFIG_PREFIX_SEPARATOR)];\n if (endpointUrl)\n return endpointUrl;\n }\n }\n const endpointUrl = profile[CONFIG_ENDPOINT_URL];\n if (endpointUrl)\n return endpointUrl;\n return undefined;\n },\n default: undefined,\n});\nexports.getEndpointUrlConfig = getEndpointUrlConfig;\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n endpointMiddleware: () => endpointMiddleware,\n endpointMiddlewareOptions: () => endpointMiddlewareOptions,\n getEndpointFromInstructions: () => getEndpointFromInstructions,\n getEndpointPlugin: () => getEndpointPlugin,\n resolveEndpointConfig: () => resolveEndpointConfig,\n resolveParams: () => resolveParams,\n toEndpointV1: () => toEndpointV1\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/service-customizations/s3.ts\nvar resolveParamsForS3 = /* @__PURE__ */ __name(async (endpointParams) => {\n const bucket = endpointParams?.Bucket || \"\";\n if (typeof endpointParams.Bucket === \"string\") {\n endpointParams.Bucket = bucket.replace(/#/g, encodeURIComponent(\"#\")).replace(/\\?/g, encodeURIComponent(\"?\"));\n }\n if (isArnBucketName(bucket)) {\n if (endpointParams.ForcePathStyle === true) {\n throw new Error(\"Path-style addressing cannot be used with ARN buckets\");\n }\n } else if (!isDnsCompatibleBucketName(bucket) || bucket.indexOf(\".\") !== -1 && !String(endpointParams.Endpoint).startsWith(\"http:\") || bucket.toLowerCase() !== bucket || bucket.length < 3) {\n endpointParams.ForcePathStyle = true;\n }\n if (endpointParams.DisableMultiRegionAccessPoints) {\n endpointParams.disableMultiRegionAccessPoints = true;\n endpointParams.DisableMRAP = true;\n }\n return endpointParams;\n}, \"resolveParamsForS3\");\nvar DOMAIN_PATTERN = /^[a-z0-9][a-z0-9\\.\\-]{1,61}[a-z0-9]$/;\nvar IP_ADDRESS_PATTERN = /(\\d+\\.){3}\\d+/;\nvar DOTS_PATTERN = /\\.\\./;\nvar isDnsCompatibleBucketName = /* @__PURE__ */ __name((bucketName) => DOMAIN_PATTERN.test(bucketName) && !IP_ADDRESS_PATTERN.test(bucketName) && !DOTS_PATTERN.test(bucketName), \"isDnsCompatibleBucketName\");\nvar isArnBucketName = /* @__PURE__ */ __name((bucketName) => {\n const [arn, partition, service, , , bucket] = bucketName.split(\":\");\n const isArn = arn === \"arn\" && bucketName.split(\":\").length >= 6;\n const isValidArn = Boolean(isArn && partition && service && bucket);\n if (isArn && !isValidArn) {\n throw new Error(`Invalid ARN: ${bucketName} was an invalid ARN.`);\n }\n return isValidArn;\n}, \"isArnBucketName\");\n\n// src/adaptors/createConfigValueProvider.ts\nvar createConfigValueProvider = /* @__PURE__ */ __name((configKey, canonicalEndpointParamKey, config) => {\n const configProvider = /* @__PURE__ */ __name(async () => {\n const configValue = config[configKey] ?? config[canonicalEndpointParamKey];\n if (typeof configValue === \"function\") {\n return configValue();\n }\n return configValue;\n }, \"configProvider\");\n if (configKey === \"credentialScope\" || canonicalEndpointParamKey === \"CredentialScope\") {\n return async () => {\n const credentials = typeof config.credentials === \"function\" ? await config.credentials() : config.credentials;\n const configValue = credentials?.credentialScope ?? credentials?.CredentialScope;\n return configValue;\n };\n }\n if (configKey === \"accountId\" || canonicalEndpointParamKey === \"AccountId\") {\n return async () => {\n const credentials = typeof config.credentials === \"function\" ? await config.credentials() : config.credentials;\n const configValue = credentials?.accountId ?? credentials?.AccountId;\n return configValue;\n };\n }\n if (configKey === \"endpoint\" || canonicalEndpointParamKey === \"endpoint\") {\n return async () => {\n const endpoint = await configProvider();\n if (endpoint && typeof endpoint === \"object\") {\n if (\"url\" in endpoint) {\n return endpoint.url.href;\n }\n if (\"hostname\" in endpoint) {\n const { protocol, hostname, port, path } = endpoint;\n return `${protocol}//${hostname}${port ? \":\" + port : \"\"}${path}`;\n }\n }\n return endpoint;\n };\n }\n return configProvider;\n}, \"createConfigValueProvider\");\n\n// src/adaptors/getEndpointFromInstructions.ts\nvar import_getEndpointFromConfig = require(\"./adaptors/getEndpointFromConfig\");\n\n// src/adaptors/toEndpointV1.ts\nvar import_url_parser = require(\"@smithy/url-parser\");\nvar toEndpointV1 = /* @__PURE__ */ __name((endpoint) => {\n if (typeof endpoint === \"object\") {\n if (\"url\" in endpoint) {\n return (0, import_url_parser.parseUrl)(endpoint.url);\n }\n return endpoint;\n }\n return (0, import_url_parser.parseUrl)(endpoint);\n}, \"toEndpointV1\");\n\n// src/adaptors/getEndpointFromInstructions.ts\nvar getEndpointFromInstructions = /* @__PURE__ */ __name(async (commandInput, instructionsSupplier, clientConfig, context) => {\n if (!clientConfig.endpoint) {\n let endpointFromConfig;\n if (clientConfig.serviceConfiguredEndpoint) {\n endpointFromConfig = await clientConfig.serviceConfiguredEndpoint();\n } else {\n endpointFromConfig = await (0, import_getEndpointFromConfig.getEndpointFromConfig)(clientConfig.serviceId);\n }\n if (endpointFromConfig) {\n clientConfig.endpoint = () => Promise.resolve(toEndpointV1(endpointFromConfig));\n }\n }\n const endpointParams = await resolveParams(commandInput, instructionsSupplier, clientConfig);\n if (typeof clientConfig.endpointProvider !== \"function\") {\n throw new Error(\"config.endpointProvider is not set.\");\n }\n const endpoint = clientConfig.endpointProvider(endpointParams, context);\n return endpoint;\n}, \"getEndpointFromInstructions\");\nvar resolveParams = /* @__PURE__ */ __name(async (commandInput, instructionsSupplier, clientConfig) => {\n const endpointParams = {};\n const instructions = instructionsSupplier?.getEndpointParameterInstructions?.() || {};\n for (const [name, instruction] of Object.entries(instructions)) {\n switch (instruction.type) {\n case \"staticContextParams\":\n endpointParams[name] = instruction.value;\n break;\n case \"contextParams\":\n endpointParams[name] = commandInput[instruction.name];\n break;\n case \"clientContextParams\":\n case \"builtInParams\":\n endpointParams[name] = await createConfigValueProvider(instruction.name, name, clientConfig)();\n break;\n case \"operationContextParams\":\n endpointParams[name] = instruction.get(commandInput);\n break;\n default:\n throw new Error(\"Unrecognized endpoint parameter instruction: \" + JSON.stringify(instruction));\n }\n }\n if (Object.keys(instructions).length === 0) {\n Object.assign(endpointParams, clientConfig);\n }\n if (String(clientConfig.serviceId).toLowerCase() === \"s3\") {\n await resolveParamsForS3(endpointParams);\n }\n return endpointParams;\n}, \"resolveParams\");\n\n// src/endpointMiddleware.ts\nvar import_core = require(\"@smithy/core\");\nvar import_util_middleware = require(\"@smithy/util-middleware\");\nvar endpointMiddleware = /* @__PURE__ */ __name(({\n config,\n instructions\n}) => {\n return (next, context) => async (args) => {\n if (config.endpoint) {\n (0, import_core.setFeature)(context, \"ENDPOINT_OVERRIDE\", \"N\");\n }\n const endpoint = await getEndpointFromInstructions(\n args.input,\n {\n getEndpointParameterInstructions() {\n return instructions;\n }\n },\n { ...config },\n context\n );\n context.endpointV2 = endpoint;\n context.authSchemes = endpoint.properties?.authSchemes;\n const authScheme = context.authSchemes?.[0];\n if (authScheme) {\n context[\"signing_region\"] = authScheme.signingRegion;\n context[\"signing_service\"] = authScheme.signingName;\n const smithyContext = (0, import_util_middleware.getSmithyContext)(context);\n const httpAuthOption = smithyContext?.selectedHttpAuthScheme?.httpAuthOption;\n if (httpAuthOption) {\n httpAuthOption.signingProperties = Object.assign(\n httpAuthOption.signingProperties || {},\n {\n signing_region: authScheme.signingRegion,\n signingRegion: authScheme.signingRegion,\n signing_service: authScheme.signingName,\n signingName: authScheme.signingName,\n signingRegionSet: authScheme.signingRegionSet\n },\n authScheme.properties\n );\n }\n }\n return next({\n ...args\n });\n };\n}, \"endpointMiddleware\");\n\n// src/getEndpointPlugin.ts\nvar import_middleware_serde = require(\"@smithy/middleware-serde\");\nvar endpointMiddlewareOptions = {\n step: \"serialize\",\n tags: [\"ENDPOINT_PARAMETERS\", \"ENDPOINT_V2\", \"ENDPOINT\"],\n name: \"endpointV2Middleware\",\n override: true,\n relation: \"before\",\n toMiddleware: import_middleware_serde.serializerMiddlewareOption.name\n};\nvar getEndpointPlugin = /* @__PURE__ */ __name((config, instructions) => ({\n applyToStack: (clientStack) => {\n clientStack.addRelativeTo(\n endpointMiddleware({\n config,\n instructions\n }),\n endpointMiddlewareOptions\n );\n }\n}), \"getEndpointPlugin\");\n\n// src/resolveEndpointConfig.ts\n\nvar import_getEndpointFromConfig2 = require(\"./adaptors/getEndpointFromConfig\");\nvar resolveEndpointConfig = /* @__PURE__ */ __name((input) => {\n const tls = input.tls ?? true;\n const { endpoint, useDualstackEndpoint, useFipsEndpoint } = input;\n const customEndpointProvider = endpoint != null ? async () => toEndpointV1(await (0, import_util_middleware.normalizeProvider)(endpoint)()) : void 0;\n const isCustomEndpoint = !!endpoint;\n const resolvedConfig = Object.assign(input, {\n endpoint: customEndpointProvider,\n tls,\n isCustomEndpoint,\n useDualstackEndpoint: (0, import_util_middleware.normalizeProvider)(useDualstackEndpoint ?? false),\n useFipsEndpoint: (0, import_util_middleware.normalizeProvider)(useFipsEndpoint ?? false)\n });\n let configuredEndpointPromise = void 0;\n resolvedConfig.serviceConfiguredEndpoint = async () => {\n if (input.serviceId && !configuredEndpointPromise) {\n configuredEndpointPromise = (0, import_getEndpointFromConfig2.getEndpointFromConfig)(input.serviceId);\n }\n return configuredEndpointPromise;\n };\n return resolvedConfig;\n}, \"resolveEndpointConfig\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n getEndpointFromInstructions,\n resolveParams,\n toEndpointV1,\n endpointMiddleware,\n endpointMiddlewareOptions,\n getEndpointPlugin,\n resolveEndpointConfig\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n AdaptiveRetryStrategy: () => AdaptiveRetryStrategy,\n CONFIG_MAX_ATTEMPTS: () => CONFIG_MAX_ATTEMPTS,\n CONFIG_RETRY_MODE: () => CONFIG_RETRY_MODE,\n ENV_MAX_ATTEMPTS: () => ENV_MAX_ATTEMPTS,\n ENV_RETRY_MODE: () => ENV_RETRY_MODE,\n NODE_MAX_ATTEMPT_CONFIG_OPTIONS: () => NODE_MAX_ATTEMPT_CONFIG_OPTIONS,\n NODE_RETRY_MODE_CONFIG_OPTIONS: () => NODE_RETRY_MODE_CONFIG_OPTIONS,\n StandardRetryStrategy: () => StandardRetryStrategy,\n defaultDelayDecider: () => defaultDelayDecider,\n defaultRetryDecider: () => defaultRetryDecider,\n getOmitRetryHeadersPlugin: () => getOmitRetryHeadersPlugin,\n getRetryAfterHint: () => getRetryAfterHint,\n getRetryPlugin: () => getRetryPlugin,\n omitRetryHeadersMiddleware: () => omitRetryHeadersMiddleware,\n omitRetryHeadersMiddlewareOptions: () => omitRetryHeadersMiddlewareOptions,\n resolveRetryConfig: () => resolveRetryConfig,\n retryMiddleware: () => retryMiddleware,\n retryMiddlewareOptions: () => retryMiddlewareOptions\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/AdaptiveRetryStrategy.ts\n\n\n// src/StandardRetryStrategy.ts\nvar import_protocol_http = require(\"@smithy/protocol-http\");\n\n\nvar import_uuid = require(\"uuid\");\n\n// src/defaultRetryQuota.ts\nvar import_util_retry = require(\"@smithy/util-retry\");\nvar getDefaultRetryQuota = /* @__PURE__ */ __name((initialRetryTokens, options) => {\n const MAX_CAPACITY = initialRetryTokens;\n const noRetryIncrement = options?.noRetryIncrement ?? import_util_retry.NO_RETRY_INCREMENT;\n const retryCost = options?.retryCost ?? import_util_retry.RETRY_COST;\n const timeoutRetryCost = options?.timeoutRetryCost ?? import_util_retry.TIMEOUT_RETRY_COST;\n let availableCapacity = initialRetryTokens;\n const getCapacityAmount = /* @__PURE__ */ __name((error) => error.name === \"TimeoutError\" ? timeoutRetryCost : retryCost, \"getCapacityAmount\");\n const hasRetryTokens = /* @__PURE__ */ __name((error) => getCapacityAmount(error) <= availableCapacity, \"hasRetryTokens\");\n const retrieveRetryTokens = /* @__PURE__ */ __name((error) => {\n if (!hasRetryTokens(error)) {\n throw new Error(\"No retry token available\");\n }\n const capacityAmount = getCapacityAmount(error);\n availableCapacity -= capacityAmount;\n return capacityAmount;\n }, \"retrieveRetryTokens\");\n const releaseRetryTokens = /* @__PURE__ */ __name((capacityReleaseAmount) => {\n availableCapacity += capacityReleaseAmount ?? noRetryIncrement;\n availableCapacity = Math.min(availableCapacity, MAX_CAPACITY);\n }, \"releaseRetryTokens\");\n return Object.freeze({\n hasRetryTokens,\n retrieveRetryTokens,\n releaseRetryTokens\n });\n}, \"getDefaultRetryQuota\");\n\n// src/delayDecider.ts\n\nvar defaultDelayDecider = /* @__PURE__ */ __name((delayBase, attempts) => Math.floor(Math.min(import_util_retry.MAXIMUM_RETRY_DELAY, Math.random() * 2 ** attempts * delayBase)), \"defaultDelayDecider\");\n\n// src/retryDecider.ts\nvar import_service_error_classification = require(\"@smithy/service-error-classification\");\nvar defaultRetryDecider = /* @__PURE__ */ __name((error) => {\n if (!error) {\n return false;\n }\n return (0, import_service_error_classification.isRetryableByTrait)(error) || (0, import_service_error_classification.isClockSkewError)(error) || (0, import_service_error_classification.isThrottlingError)(error) || (0, import_service_error_classification.isTransientError)(error);\n}, \"defaultRetryDecider\");\n\n// src/util.ts\nvar asSdkError = /* @__PURE__ */ __name((error) => {\n if (error instanceof Error)\n return error;\n if (error instanceof Object)\n return Object.assign(new Error(), error);\n if (typeof error === \"string\")\n return new Error(error);\n return new Error(`AWS SDK error wrapper for ${error}`);\n}, \"asSdkError\");\n\n// src/StandardRetryStrategy.ts\nvar StandardRetryStrategy = class {\n constructor(maxAttemptsProvider, options) {\n this.maxAttemptsProvider = maxAttemptsProvider;\n this.mode = import_util_retry.RETRY_MODES.STANDARD;\n this.retryDecider = options?.retryDecider ?? defaultRetryDecider;\n this.delayDecider = options?.delayDecider ?? defaultDelayDecider;\n this.retryQuota = options?.retryQuota ?? getDefaultRetryQuota(import_util_retry.INITIAL_RETRY_TOKENS);\n }\n static {\n __name(this, \"StandardRetryStrategy\");\n }\n shouldRetry(error, attempts, maxAttempts) {\n return attempts < maxAttempts && this.retryDecider(error) && this.retryQuota.hasRetryTokens(error);\n }\n async getMaxAttempts() {\n let maxAttempts;\n try {\n maxAttempts = await this.maxAttemptsProvider();\n } catch (error) {\n maxAttempts = import_util_retry.DEFAULT_MAX_ATTEMPTS;\n }\n return maxAttempts;\n }\n async retry(next, args, options) {\n let retryTokenAmount;\n let attempts = 0;\n let totalDelay = 0;\n const maxAttempts = await this.getMaxAttempts();\n const { request } = args;\n if (import_protocol_http.HttpRequest.isInstance(request)) {\n request.headers[import_util_retry.INVOCATION_ID_HEADER] = (0, import_uuid.v4)();\n }\n while (true) {\n try {\n if (import_protocol_http.HttpRequest.isInstance(request)) {\n request.headers[import_util_retry.REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`;\n }\n if (options?.beforeRequest) {\n await options.beforeRequest();\n }\n const { response, output } = await next(args);\n if (options?.afterRequest) {\n options.afterRequest(response);\n }\n this.retryQuota.releaseRetryTokens(retryTokenAmount);\n output.$metadata.attempts = attempts + 1;\n output.$metadata.totalRetryDelay = totalDelay;\n return { response, output };\n } catch (e) {\n const err = asSdkError(e);\n attempts++;\n if (this.shouldRetry(err, attempts, maxAttempts)) {\n retryTokenAmount = this.retryQuota.retrieveRetryTokens(err);\n const delayFromDecider = this.delayDecider(\n (0, import_service_error_classification.isThrottlingError)(err) ? import_util_retry.THROTTLING_RETRY_DELAY_BASE : import_util_retry.DEFAULT_RETRY_DELAY_BASE,\n attempts\n );\n const delayFromResponse = getDelayFromRetryAfterHeader(err.$response);\n const delay = Math.max(delayFromResponse || 0, delayFromDecider);\n totalDelay += delay;\n await new Promise((resolve) => setTimeout(resolve, delay));\n continue;\n }\n if (!err.$metadata) {\n err.$metadata = {};\n }\n err.$metadata.attempts = attempts;\n err.$metadata.totalRetryDelay = totalDelay;\n throw err;\n }\n }\n }\n};\nvar getDelayFromRetryAfterHeader = /* @__PURE__ */ __name((response) => {\n if (!import_protocol_http.HttpResponse.isInstance(response))\n return;\n const retryAfterHeaderName = Object.keys(response.headers).find((key) => key.toLowerCase() === \"retry-after\");\n if (!retryAfterHeaderName)\n return;\n const retryAfter = response.headers[retryAfterHeaderName];\n const retryAfterSeconds = Number(retryAfter);\n if (!Number.isNaN(retryAfterSeconds))\n return retryAfterSeconds * 1e3;\n const retryAfterDate = new Date(retryAfter);\n return retryAfterDate.getTime() - Date.now();\n}, \"getDelayFromRetryAfterHeader\");\n\n// src/AdaptiveRetryStrategy.ts\nvar AdaptiveRetryStrategy = class extends StandardRetryStrategy {\n static {\n __name(this, \"AdaptiveRetryStrategy\");\n }\n constructor(maxAttemptsProvider, options) {\n const { rateLimiter, ...superOptions } = options ?? {};\n super(maxAttemptsProvider, superOptions);\n this.rateLimiter = rateLimiter ?? new import_util_retry.DefaultRateLimiter();\n this.mode = import_util_retry.RETRY_MODES.ADAPTIVE;\n }\n async retry(next, args) {\n return super.retry(next, args, {\n beforeRequest: async () => {\n return this.rateLimiter.getSendToken();\n },\n afterRequest: (response) => {\n this.rateLimiter.updateClientSendingRate(response);\n }\n });\n }\n};\n\n// src/configurations.ts\nvar import_util_middleware = require(\"@smithy/util-middleware\");\n\nvar ENV_MAX_ATTEMPTS = \"AWS_MAX_ATTEMPTS\";\nvar CONFIG_MAX_ATTEMPTS = \"max_attempts\";\nvar NODE_MAX_ATTEMPT_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => {\n const value = env[ENV_MAX_ATTEMPTS];\n if (!value)\n return void 0;\n const maxAttempt = parseInt(value);\n if (Number.isNaN(maxAttempt)) {\n throw new Error(`Environment variable ${ENV_MAX_ATTEMPTS} mast be a number, got \"${value}\"`);\n }\n return maxAttempt;\n },\n configFileSelector: (profile) => {\n const value = profile[CONFIG_MAX_ATTEMPTS];\n if (!value)\n return void 0;\n const maxAttempt = parseInt(value);\n if (Number.isNaN(maxAttempt)) {\n throw new Error(`Shared config file entry ${CONFIG_MAX_ATTEMPTS} mast be a number, got \"${value}\"`);\n }\n return maxAttempt;\n },\n default: import_util_retry.DEFAULT_MAX_ATTEMPTS\n};\nvar resolveRetryConfig = /* @__PURE__ */ __name((input) => {\n const { retryStrategy, retryMode: _retryMode, maxAttempts: _maxAttempts } = input;\n const maxAttempts = (0, import_util_middleware.normalizeProvider)(_maxAttempts ?? import_util_retry.DEFAULT_MAX_ATTEMPTS);\n return Object.assign(input, {\n maxAttempts,\n retryStrategy: async () => {\n if (retryStrategy) {\n return retryStrategy;\n }\n const retryMode = await (0, import_util_middleware.normalizeProvider)(_retryMode)();\n if (retryMode === import_util_retry.RETRY_MODES.ADAPTIVE) {\n return new import_util_retry.AdaptiveRetryStrategy(maxAttempts);\n }\n return new import_util_retry.StandardRetryStrategy(maxAttempts);\n }\n });\n}, \"resolveRetryConfig\");\nvar ENV_RETRY_MODE = \"AWS_RETRY_MODE\";\nvar CONFIG_RETRY_MODE = \"retry_mode\";\nvar NODE_RETRY_MODE_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => env[ENV_RETRY_MODE],\n configFileSelector: (profile) => profile[CONFIG_RETRY_MODE],\n default: import_util_retry.DEFAULT_RETRY_MODE\n};\n\n// src/omitRetryHeadersMiddleware.ts\n\n\nvar omitRetryHeadersMiddleware = /* @__PURE__ */ __name(() => (next) => async (args) => {\n const { request } = args;\n if (import_protocol_http.HttpRequest.isInstance(request)) {\n delete request.headers[import_util_retry.INVOCATION_ID_HEADER];\n delete request.headers[import_util_retry.REQUEST_HEADER];\n }\n return next(args);\n}, \"omitRetryHeadersMiddleware\");\nvar omitRetryHeadersMiddlewareOptions = {\n name: \"omitRetryHeadersMiddleware\",\n tags: [\"RETRY\", \"HEADERS\", \"OMIT_RETRY_HEADERS\"],\n relation: \"before\",\n toMiddleware: \"awsAuthMiddleware\",\n override: true\n};\nvar getOmitRetryHeadersPlugin = /* @__PURE__ */ __name((options) => ({\n applyToStack: (clientStack) => {\n clientStack.addRelativeTo(omitRetryHeadersMiddleware(), omitRetryHeadersMiddlewareOptions);\n }\n}), \"getOmitRetryHeadersPlugin\");\n\n// src/retryMiddleware.ts\n\n\nvar import_smithy_client = require(\"@smithy/smithy-client\");\n\n\nvar import_isStreamingPayload = require(\"./isStreamingPayload/isStreamingPayload\");\nvar retryMiddleware = /* @__PURE__ */ __name((options) => (next, context) => async (args) => {\n let retryStrategy = await options.retryStrategy();\n const maxAttempts = await options.maxAttempts();\n if (isRetryStrategyV2(retryStrategy)) {\n retryStrategy = retryStrategy;\n let retryToken = await retryStrategy.acquireInitialRetryToken(context[\"partition_id\"]);\n let lastError = new Error();\n let attempts = 0;\n let totalRetryDelay = 0;\n const { request } = args;\n const isRequest = import_protocol_http.HttpRequest.isInstance(request);\n if (isRequest) {\n request.headers[import_util_retry.INVOCATION_ID_HEADER] = (0, import_uuid.v4)();\n }\n while (true) {\n try {\n if (isRequest) {\n request.headers[import_util_retry.REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`;\n }\n const { response, output } = await next(args);\n retryStrategy.recordSuccess(retryToken);\n output.$metadata.attempts = attempts + 1;\n output.$metadata.totalRetryDelay = totalRetryDelay;\n return { response, output };\n } catch (e) {\n const retryErrorInfo = getRetryErrorInfo(e);\n lastError = asSdkError(e);\n if (isRequest && (0, import_isStreamingPayload.isStreamingPayload)(request)) {\n (context.logger instanceof import_smithy_client.NoOpLogger ? console : context.logger)?.warn(\n \"An error was encountered in a non-retryable streaming request.\"\n );\n throw lastError;\n }\n try {\n retryToken = await retryStrategy.refreshRetryTokenForRetry(retryToken, retryErrorInfo);\n } catch (refreshError) {\n if (!lastError.$metadata) {\n lastError.$metadata = {};\n }\n lastError.$metadata.attempts = attempts + 1;\n lastError.$metadata.totalRetryDelay = totalRetryDelay;\n throw lastError;\n }\n attempts = retryToken.getRetryCount();\n const delay = retryToken.getRetryDelay();\n totalRetryDelay += delay;\n await new Promise((resolve) => setTimeout(resolve, delay));\n }\n }\n } else {\n retryStrategy = retryStrategy;\n if (retryStrategy?.mode)\n context.userAgent = [...context.userAgent || [], [\"cfg/retry-mode\", retryStrategy.mode]];\n return retryStrategy.retry(next, args);\n }\n}, \"retryMiddleware\");\nvar isRetryStrategyV2 = /* @__PURE__ */ __name((retryStrategy) => typeof retryStrategy.acquireInitialRetryToken !== \"undefined\" && typeof retryStrategy.refreshRetryTokenForRetry !== \"undefined\" && typeof retryStrategy.recordSuccess !== \"undefined\", \"isRetryStrategyV2\");\nvar getRetryErrorInfo = /* @__PURE__ */ __name((error) => {\n const errorInfo = {\n error,\n errorType: getRetryErrorType(error)\n };\n const retryAfterHint = getRetryAfterHint(error.$response);\n if (retryAfterHint) {\n errorInfo.retryAfterHint = retryAfterHint;\n }\n return errorInfo;\n}, \"getRetryErrorInfo\");\nvar getRetryErrorType = /* @__PURE__ */ __name((error) => {\n if ((0, import_service_error_classification.isThrottlingError)(error))\n return \"THROTTLING\";\n if ((0, import_service_error_classification.isTransientError)(error))\n return \"TRANSIENT\";\n if ((0, import_service_error_classification.isServerError)(error))\n return \"SERVER_ERROR\";\n return \"CLIENT_ERROR\";\n}, \"getRetryErrorType\");\nvar retryMiddlewareOptions = {\n name: \"retryMiddleware\",\n tags: [\"RETRY\"],\n step: \"finalizeRequest\",\n priority: \"high\",\n override: true\n};\nvar getRetryPlugin = /* @__PURE__ */ __name((options) => ({\n applyToStack: (clientStack) => {\n clientStack.add(retryMiddleware(options), retryMiddlewareOptions);\n }\n}), \"getRetryPlugin\");\nvar getRetryAfterHint = /* @__PURE__ */ __name((response) => {\n if (!import_protocol_http.HttpResponse.isInstance(response))\n return;\n const retryAfterHeaderName = Object.keys(response.headers).find((key) => key.toLowerCase() === \"retry-after\");\n if (!retryAfterHeaderName)\n return;\n const retryAfter = response.headers[retryAfterHeaderName];\n const retryAfterSeconds = Number(retryAfter);\n if (!Number.isNaN(retryAfterSeconds))\n return new Date(retryAfterSeconds * 1e3);\n const retryAfterDate = new Date(retryAfter);\n return retryAfterDate;\n}, \"getRetryAfterHint\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n AdaptiveRetryStrategy,\n StandardRetryStrategy,\n ENV_MAX_ATTEMPTS,\n CONFIG_MAX_ATTEMPTS,\n NODE_MAX_ATTEMPT_CONFIG_OPTIONS,\n resolveRetryConfig,\n ENV_RETRY_MODE,\n CONFIG_RETRY_MODE,\n NODE_RETRY_MODE_CONFIG_OPTIONS,\n defaultDelayDecider,\n omitRetryHeadersMiddleware,\n omitRetryHeadersMiddlewareOptions,\n getOmitRetryHeadersPlugin,\n defaultRetryDecider,\n retryMiddleware,\n retryMiddlewareOptions,\n getRetryPlugin,\n getRetryAfterHint\n});\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isStreamingPayload = void 0;\nconst stream_1 = require(\"stream\");\nconst isStreamingPayload = (request) => (request === null || request === void 0 ? void 0 : request.body) instanceof stream_1.Readable ||\n (typeof ReadableStream !== \"undefined\" && (request === null || request === void 0 ? void 0 : request.body) instanceof ReadableStream);\nexports.isStreamingPayload = isStreamingPayload;\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n deserializerMiddleware: () => deserializerMiddleware,\n deserializerMiddlewareOption: () => deserializerMiddlewareOption,\n getSerdePlugin: () => getSerdePlugin,\n serializerMiddleware: () => serializerMiddleware,\n serializerMiddlewareOption: () => serializerMiddlewareOption\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/deserializerMiddleware.ts\nvar import_protocol_http = require(\"@smithy/protocol-http\");\nvar deserializerMiddleware = /* @__PURE__ */ __name((options, deserializer) => (next, context) => async (args) => {\n const { response } = await next(args);\n try {\n const parsed = await deserializer(response, options);\n return {\n response,\n output: parsed\n };\n } catch (error) {\n Object.defineProperty(error, \"$response\", {\n value: response\n });\n if (!(\"$metadata\" in error)) {\n const hint = `Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`;\n try {\n error.message += \"\\n \" + hint;\n } catch (e) {\n if (!context.logger || context.logger?.constructor?.name === \"NoOpLogger\") {\n console.warn(hint);\n } else {\n context.logger?.warn?.(hint);\n }\n }\n if (typeof error.$responseBodyText !== \"undefined\") {\n if (error.$response) {\n error.$response.body = error.$responseBodyText;\n }\n }\n try {\n if (import_protocol_http.HttpResponse.isInstance(response)) {\n const { headers = {} } = response;\n const headerEntries = Object.entries(headers);\n error.$metadata = {\n httpStatusCode: response.statusCode,\n requestId: findHeader(/^x-[\\w-]+-request-?id$/, headerEntries),\n extendedRequestId: findHeader(/^x-[\\w-]+-id-2$/, headerEntries),\n cfId: findHeader(/^x-[\\w-]+-cf-id$/, headerEntries)\n };\n }\n } catch (e) {\n }\n }\n throw error;\n }\n}, \"deserializerMiddleware\");\nvar findHeader = /* @__PURE__ */ __name((pattern, headers) => {\n return (headers.find(([k]) => {\n return k.match(pattern);\n }) || [void 0, void 0])[1];\n}, \"findHeader\");\n\n// src/serializerMiddleware.ts\nvar serializerMiddleware = /* @__PURE__ */ __name((options, serializer) => (next, context) => async (args) => {\n const endpointConfig = options;\n const endpoint = context.endpointV2?.url && endpointConfig.urlParser ? async () => endpointConfig.urlParser(context.endpointV2.url) : endpointConfig.endpoint;\n if (!endpoint) {\n throw new Error(\"No valid endpoint provider available.\");\n }\n const request = await serializer(args.input, { ...options, endpoint });\n return next({\n ...args,\n request\n });\n}, \"serializerMiddleware\");\n\n// src/serdePlugin.ts\nvar deserializerMiddlewareOption = {\n name: \"deserializerMiddleware\",\n step: \"deserialize\",\n tags: [\"DESERIALIZER\"],\n override: true\n};\nvar serializerMiddlewareOption = {\n name: \"serializerMiddleware\",\n step: \"serialize\",\n tags: [\"SERIALIZER\"],\n override: true\n};\nfunction getSerdePlugin(config, serializer, deserializer) {\n return {\n applyToStack: (commandStack) => {\n commandStack.add(deserializerMiddleware(config, deserializer), deserializerMiddlewareOption);\n commandStack.add(serializerMiddleware(config, serializer), serializerMiddlewareOption);\n }\n };\n}\n__name(getSerdePlugin, \"getSerdePlugin\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n deserializerMiddleware,\n deserializerMiddlewareOption,\n serializerMiddlewareOption,\n getSerdePlugin,\n serializerMiddleware\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n constructStack: () => constructStack\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/MiddlewareStack.ts\nvar getAllAliases = /* @__PURE__ */ __name((name, aliases) => {\n const _aliases = [];\n if (name) {\n _aliases.push(name);\n }\n if (aliases) {\n for (const alias of aliases) {\n _aliases.push(alias);\n }\n }\n return _aliases;\n}, \"getAllAliases\");\nvar getMiddlewareNameWithAliases = /* @__PURE__ */ __name((name, aliases) => {\n return `${name || \"anonymous\"}${aliases && aliases.length > 0 ? ` (a.k.a. ${aliases.join(\",\")})` : \"\"}`;\n}, \"getMiddlewareNameWithAliases\");\nvar constructStack = /* @__PURE__ */ __name(() => {\n let absoluteEntries = [];\n let relativeEntries = [];\n let identifyOnResolve = false;\n const entriesNameSet = /* @__PURE__ */ new Set();\n const sort = /* @__PURE__ */ __name((entries) => entries.sort(\n (a, b) => stepWeights[b.step] - stepWeights[a.step] || priorityWeights[b.priority || \"normal\"] - priorityWeights[a.priority || \"normal\"]\n ), \"sort\");\n const removeByName = /* @__PURE__ */ __name((toRemove) => {\n let isRemoved = false;\n const filterCb = /* @__PURE__ */ __name((entry) => {\n const aliases = getAllAliases(entry.name, entry.aliases);\n if (aliases.includes(toRemove)) {\n isRemoved = true;\n for (const alias of aliases) {\n entriesNameSet.delete(alias);\n }\n return false;\n }\n return true;\n }, \"filterCb\");\n absoluteEntries = absoluteEntries.filter(filterCb);\n relativeEntries = relativeEntries.filter(filterCb);\n return isRemoved;\n }, \"removeByName\");\n const removeByReference = /* @__PURE__ */ __name((toRemove) => {\n let isRemoved = false;\n const filterCb = /* @__PURE__ */ __name((entry) => {\n if (entry.middleware === toRemove) {\n isRemoved = true;\n for (const alias of getAllAliases(entry.name, entry.aliases)) {\n entriesNameSet.delete(alias);\n }\n return false;\n }\n return true;\n }, \"filterCb\");\n absoluteEntries = absoluteEntries.filter(filterCb);\n relativeEntries = relativeEntries.filter(filterCb);\n return isRemoved;\n }, \"removeByReference\");\n const cloneTo = /* @__PURE__ */ __name((toStack) => {\n absoluteEntries.forEach((entry) => {\n toStack.add(entry.middleware, { ...entry });\n });\n relativeEntries.forEach((entry) => {\n toStack.addRelativeTo(entry.middleware, { ...entry });\n });\n toStack.identifyOnResolve?.(stack.identifyOnResolve());\n return toStack;\n }, \"cloneTo\");\n const expandRelativeMiddlewareList = /* @__PURE__ */ __name((from) => {\n const expandedMiddlewareList = [];\n from.before.forEach((entry) => {\n if (entry.before.length === 0 && entry.after.length === 0) {\n expandedMiddlewareList.push(entry);\n } else {\n expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry));\n }\n });\n expandedMiddlewareList.push(from);\n from.after.reverse().forEach((entry) => {\n if (entry.before.length === 0 && entry.after.length === 0) {\n expandedMiddlewareList.push(entry);\n } else {\n expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry));\n }\n });\n return expandedMiddlewareList;\n }, \"expandRelativeMiddlewareList\");\n const getMiddlewareList = /* @__PURE__ */ __name((debug = false) => {\n const normalizedAbsoluteEntries = [];\n const normalizedRelativeEntries = [];\n const normalizedEntriesNameMap = {};\n absoluteEntries.forEach((entry) => {\n const normalizedEntry = {\n ...entry,\n before: [],\n after: []\n };\n for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) {\n normalizedEntriesNameMap[alias] = normalizedEntry;\n }\n normalizedAbsoluteEntries.push(normalizedEntry);\n });\n relativeEntries.forEach((entry) => {\n const normalizedEntry = {\n ...entry,\n before: [],\n after: []\n };\n for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) {\n normalizedEntriesNameMap[alias] = normalizedEntry;\n }\n normalizedRelativeEntries.push(normalizedEntry);\n });\n normalizedRelativeEntries.forEach((entry) => {\n if (entry.toMiddleware) {\n const toMiddleware = normalizedEntriesNameMap[entry.toMiddleware];\n if (toMiddleware === void 0) {\n if (debug) {\n return;\n }\n throw new Error(\n `${entry.toMiddleware} is not found when adding ${getMiddlewareNameWithAliases(entry.name, entry.aliases)} middleware ${entry.relation} ${entry.toMiddleware}`\n );\n }\n if (entry.relation === \"after\") {\n toMiddleware.after.push(entry);\n }\n if (entry.relation === \"before\") {\n toMiddleware.before.push(entry);\n }\n }\n });\n const mainChain = sort(normalizedAbsoluteEntries).map(expandRelativeMiddlewareList).reduce(\n (wholeList, expandedMiddlewareList) => {\n wholeList.push(...expandedMiddlewareList);\n return wholeList;\n },\n []\n );\n return mainChain;\n }, \"getMiddlewareList\");\n const stack = {\n add: (middleware, options = {}) => {\n const { name, override, aliases: _aliases } = options;\n const entry = {\n step: \"initialize\",\n priority: \"normal\",\n middleware,\n ...options\n };\n const aliases = getAllAliases(name, _aliases);\n if (aliases.length > 0) {\n if (aliases.some((alias) => entriesNameSet.has(alias))) {\n if (!override)\n throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`);\n for (const alias of aliases) {\n const toOverrideIndex = absoluteEntries.findIndex(\n (entry2) => entry2.name === alias || entry2.aliases?.some((a) => a === alias)\n );\n if (toOverrideIndex === -1) {\n continue;\n }\n const toOverride = absoluteEntries[toOverrideIndex];\n if (toOverride.step !== entry.step || entry.priority !== toOverride.priority) {\n throw new Error(\n `\"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}\" middleware with ${toOverride.priority} priority in ${toOverride.step} step cannot be overridden by \"${getMiddlewareNameWithAliases(name, _aliases)}\" middleware with ${entry.priority} priority in ${entry.step} step.`\n );\n }\n absoluteEntries.splice(toOverrideIndex, 1);\n }\n }\n for (const alias of aliases) {\n entriesNameSet.add(alias);\n }\n }\n absoluteEntries.push(entry);\n },\n addRelativeTo: (middleware, options) => {\n const { name, override, aliases: _aliases } = options;\n const entry = {\n middleware,\n ...options\n };\n const aliases = getAllAliases(name, _aliases);\n if (aliases.length > 0) {\n if (aliases.some((alias) => entriesNameSet.has(alias))) {\n if (!override)\n throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`);\n for (const alias of aliases) {\n const toOverrideIndex = relativeEntries.findIndex(\n (entry2) => entry2.name === alias || entry2.aliases?.some((a) => a === alias)\n );\n if (toOverrideIndex === -1) {\n continue;\n }\n const toOverride = relativeEntries[toOverrideIndex];\n if (toOverride.toMiddleware !== entry.toMiddleware || toOverride.relation !== entry.relation) {\n throw new Error(\n `\"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}\" middleware ${toOverride.relation} \"${toOverride.toMiddleware}\" middleware cannot be overridden by \"${getMiddlewareNameWithAliases(name, _aliases)}\" middleware ${entry.relation} \"${entry.toMiddleware}\" middleware.`\n );\n }\n relativeEntries.splice(toOverrideIndex, 1);\n }\n }\n for (const alias of aliases) {\n entriesNameSet.add(alias);\n }\n }\n relativeEntries.push(entry);\n },\n clone: () => cloneTo(constructStack()),\n use: (plugin) => {\n plugin.applyToStack(stack);\n },\n remove: (toRemove) => {\n if (typeof toRemove === \"string\")\n return removeByName(toRemove);\n else\n return removeByReference(toRemove);\n },\n removeByTag: (toRemove) => {\n let isRemoved = false;\n const filterCb = /* @__PURE__ */ __name((entry) => {\n const { tags, name, aliases: _aliases } = entry;\n if (tags && tags.includes(toRemove)) {\n const aliases = getAllAliases(name, _aliases);\n for (const alias of aliases) {\n entriesNameSet.delete(alias);\n }\n isRemoved = true;\n return false;\n }\n return true;\n }, \"filterCb\");\n absoluteEntries = absoluteEntries.filter(filterCb);\n relativeEntries = relativeEntries.filter(filterCb);\n return isRemoved;\n },\n concat: (from) => {\n const cloned = cloneTo(constructStack());\n cloned.use(from);\n cloned.identifyOnResolve(\n identifyOnResolve || cloned.identifyOnResolve() || (from.identifyOnResolve?.() ?? false)\n );\n return cloned;\n },\n applyToStack: cloneTo,\n identify: () => {\n return getMiddlewareList(true).map((mw) => {\n const step = mw.step ?? mw.relation + \" \" + mw.toMiddleware;\n return getMiddlewareNameWithAliases(mw.name, mw.aliases) + \" - \" + step;\n });\n },\n identifyOnResolve(toggle) {\n if (typeof toggle === \"boolean\")\n identifyOnResolve = toggle;\n return identifyOnResolve;\n },\n resolve: (handler, context) => {\n for (const middleware of getMiddlewareList().map((entry) => entry.middleware).reverse()) {\n handler = middleware(handler, context);\n }\n if (identifyOnResolve) {\n console.log(stack.identify());\n }\n return handler;\n }\n };\n return stack;\n}, \"constructStack\");\nvar stepWeights = {\n initialize: 5,\n serialize: 4,\n build: 3,\n finalizeRequest: 2,\n deserialize: 1\n};\nvar priorityWeights = {\n high: 3,\n normal: 2,\n low: 1\n};\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n constructStack\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n loadConfig: () => loadConfig\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/configLoader.ts\n\n\n// src/fromEnv.ts\nvar import_property_provider = require(\"@smithy/property-provider\");\n\n// src/getSelectorName.ts\nfunction getSelectorName(functionString) {\n try {\n const constants = new Set(Array.from(functionString.match(/([A-Z_]){3,}/g) ?? []));\n constants.delete(\"CONFIG\");\n constants.delete(\"CONFIG_PREFIX_SEPARATOR\");\n constants.delete(\"ENV\");\n return [...constants].join(\", \");\n } catch (e) {\n return functionString;\n }\n}\n__name(getSelectorName, \"getSelectorName\");\n\n// src/fromEnv.ts\nvar fromEnv = /* @__PURE__ */ __name((envVarSelector, options) => async () => {\n try {\n const config = envVarSelector(process.env, options);\n if (config === void 0) {\n throw new Error();\n }\n return config;\n } catch (e) {\n throw new import_property_provider.CredentialsProviderError(\n e.message || `Not found in ENV: ${getSelectorName(envVarSelector.toString())}`,\n { logger: options?.logger }\n );\n }\n}, \"fromEnv\");\n\n// src/fromSharedConfigFiles.ts\n\nvar import_shared_ini_file_loader = require(\"@smithy/shared-ini-file-loader\");\nvar fromSharedConfigFiles = /* @__PURE__ */ __name((configSelector, { preferredFile = \"config\", ...init } = {}) => async () => {\n const profile = (0, import_shared_ini_file_loader.getProfileName)(init);\n const { configFile, credentialsFile } = await (0, import_shared_ini_file_loader.loadSharedConfigFiles)(init);\n const profileFromCredentials = credentialsFile[profile] || {};\n const profileFromConfig = configFile[profile] || {};\n const mergedProfile = preferredFile === \"config\" ? { ...profileFromCredentials, ...profileFromConfig } : { ...profileFromConfig, ...profileFromCredentials };\n try {\n const cfgFile = preferredFile === \"config\" ? configFile : credentialsFile;\n const configValue = configSelector(mergedProfile, cfgFile);\n if (configValue === void 0) {\n throw new Error();\n }\n return configValue;\n } catch (e) {\n throw new import_property_provider.CredentialsProviderError(\n e.message || `Not found in config files w/ profile [${profile}]: ${getSelectorName(configSelector.toString())}`,\n { logger: init.logger }\n );\n }\n}, \"fromSharedConfigFiles\");\n\n// src/fromStatic.ts\n\nvar isFunction = /* @__PURE__ */ __name((func) => typeof func === \"function\", \"isFunction\");\nvar fromStatic = /* @__PURE__ */ __name((defaultValue) => isFunction(defaultValue) ? async () => await defaultValue() : (0, import_property_provider.fromStatic)(defaultValue), \"fromStatic\");\n\n// src/configLoader.ts\nvar loadConfig = /* @__PURE__ */ __name(({ environmentVariableSelector, configFileSelector, default: defaultValue }, configuration = {}) => {\n const { signingName, logger } = configuration;\n const envOptions = { signingName, logger };\n return (0, import_property_provider.memoize)(\n (0, import_property_provider.chain)(\n fromEnv(environmentVariableSelector, envOptions),\n fromSharedConfigFiles(configFileSelector, configuration),\n fromStatic(defaultValue)\n )\n );\n}, \"loadConfig\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n loadConfig\n});\n\n","var __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n DEFAULT_REQUEST_TIMEOUT: () => DEFAULT_REQUEST_TIMEOUT,\n NodeHttp2Handler: () => NodeHttp2Handler,\n NodeHttpHandler: () => NodeHttpHandler,\n streamCollector: () => streamCollector\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/node-http-handler.ts\nvar import_protocol_http = require(\"@smithy/protocol-http\");\nvar import_querystring_builder = require(\"@smithy/querystring-builder\");\nvar import_http = require(\"http\");\nvar import_https = require(\"https\");\n\n// src/constants.ts\nvar NODEJS_TIMEOUT_ERROR_CODES = [\"ECONNRESET\", \"EPIPE\", \"ETIMEDOUT\"];\n\n// src/get-transformed-headers.ts\nvar getTransformedHeaders = /* @__PURE__ */ __name((headers) => {\n const transformedHeaders = {};\n for (const name of Object.keys(headers)) {\n const headerValues = headers[name];\n transformedHeaders[name] = Array.isArray(headerValues) ? headerValues.join(\",\") : headerValues;\n }\n return transformedHeaders;\n}, \"getTransformedHeaders\");\n\n// src/timing.ts\nvar timing = {\n setTimeout: (cb, ms) => setTimeout(cb, ms),\n clearTimeout: (timeoutId) => clearTimeout(timeoutId)\n};\n\n// src/set-connection-timeout.ts\nvar DEFER_EVENT_LISTENER_TIME = 1e3;\nvar setConnectionTimeout = /* @__PURE__ */ __name((request, reject, timeoutInMs = 0) => {\n if (!timeoutInMs) {\n return -1;\n }\n const registerTimeout = /* @__PURE__ */ __name((offset) => {\n const timeoutId = timing.setTimeout(() => {\n request.destroy();\n reject(\n Object.assign(new Error(`Socket timed out without establishing a connection within ${timeoutInMs} ms`), {\n name: \"TimeoutError\"\n })\n );\n }, timeoutInMs - offset);\n const doWithSocket = /* @__PURE__ */ __name((socket) => {\n if (socket?.connecting) {\n socket.on(\"connect\", () => {\n timing.clearTimeout(timeoutId);\n });\n } else {\n timing.clearTimeout(timeoutId);\n }\n }, \"doWithSocket\");\n if (request.socket) {\n doWithSocket(request.socket);\n } else {\n request.on(\"socket\", doWithSocket);\n }\n }, \"registerTimeout\");\n if (timeoutInMs < 2e3) {\n registerTimeout(0);\n return 0;\n }\n return timing.setTimeout(registerTimeout.bind(null, DEFER_EVENT_LISTENER_TIME), DEFER_EVENT_LISTENER_TIME);\n}, \"setConnectionTimeout\");\n\n// src/set-socket-keep-alive.ts\nvar DEFER_EVENT_LISTENER_TIME2 = 3e3;\nvar setSocketKeepAlive = /* @__PURE__ */ __name((request, { keepAlive, keepAliveMsecs }, deferTimeMs = DEFER_EVENT_LISTENER_TIME2) => {\n if (keepAlive !== true) {\n return -1;\n }\n const registerListener = /* @__PURE__ */ __name(() => {\n if (request.socket) {\n request.socket.setKeepAlive(keepAlive, keepAliveMsecs || 0);\n } else {\n request.on(\"socket\", (socket) => {\n socket.setKeepAlive(keepAlive, keepAliveMsecs || 0);\n });\n }\n }, \"registerListener\");\n if (deferTimeMs === 0) {\n registerListener();\n return 0;\n }\n return timing.setTimeout(registerListener, deferTimeMs);\n}, \"setSocketKeepAlive\");\n\n// src/set-socket-timeout.ts\nvar DEFER_EVENT_LISTENER_TIME3 = 3e3;\nvar setSocketTimeout = /* @__PURE__ */ __name((request, reject, timeoutInMs = DEFAULT_REQUEST_TIMEOUT) => {\n const registerTimeout = /* @__PURE__ */ __name((offset) => {\n const timeout = timeoutInMs - offset;\n const onTimeout = /* @__PURE__ */ __name(() => {\n request.destroy();\n reject(Object.assign(new Error(`Connection timed out after ${timeoutInMs} ms`), { name: \"TimeoutError\" }));\n }, \"onTimeout\");\n if (request.socket) {\n request.socket.setTimeout(timeout, onTimeout);\n request.on(\"close\", () => request.socket?.removeListener(\"timeout\", onTimeout));\n } else {\n request.setTimeout(timeout, onTimeout);\n }\n }, \"registerTimeout\");\n if (0 < timeoutInMs && timeoutInMs < 6e3) {\n registerTimeout(0);\n return 0;\n }\n return timing.setTimeout(\n registerTimeout.bind(null, timeoutInMs === 0 ? 0 : DEFER_EVENT_LISTENER_TIME3),\n DEFER_EVENT_LISTENER_TIME3\n );\n}, \"setSocketTimeout\");\n\n// src/write-request-body.ts\nvar import_stream = require(\"stream\");\nvar MIN_WAIT_TIME = 6e3;\nasync function writeRequestBody(httpRequest, request, maxContinueTimeoutMs = MIN_WAIT_TIME) {\n const headers = request.headers ?? {};\n const expect = headers[\"Expect\"] || headers[\"expect\"];\n let timeoutId = -1;\n let sendBody = true;\n if (expect === \"100-continue\") {\n sendBody = await Promise.race([\n new Promise((resolve) => {\n timeoutId = Number(timing.setTimeout(() => resolve(true), Math.max(MIN_WAIT_TIME, maxContinueTimeoutMs)));\n }),\n new Promise((resolve) => {\n httpRequest.on(\"continue\", () => {\n timing.clearTimeout(timeoutId);\n resolve(true);\n });\n httpRequest.on(\"response\", () => {\n timing.clearTimeout(timeoutId);\n resolve(false);\n });\n httpRequest.on(\"error\", () => {\n timing.clearTimeout(timeoutId);\n resolve(false);\n });\n })\n ]);\n }\n if (sendBody) {\n writeBody(httpRequest, request.body);\n }\n}\n__name(writeRequestBody, \"writeRequestBody\");\nfunction writeBody(httpRequest, body) {\n if (body instanceof import_stream.Readable) {\n body.pipe(httpRequest);\n return;\n }\n if (body) {\n if (Buffer.isBuffer(body) || typeof body === \"string\") {\n httpRequest.end(body);\n return;\n }\n const uint8 = body;\n if (typeof uint8 === \"object\" && uint8.buffer && typeof uint8.byteOffset === \"number\" && typeof uint8.byteLength === \"number\") {\n httpRequest.end(Buffer.from(uint8.buffer, uint8.byteOffset, uint8.byteLength));\n return;\n }\n httpRequest.end(Buffer.from(body));\n return;\n }\n httpRequest.end();\n}\n__name(writeBody, \"writeBody\");\n\n// src/node-http-handler.ts\nvar DEFAULT_REQUEST_TIMEOUT = 0;\nvar NodeHttpHandler = class _NodeHttpHandler {\n constructor(options) {\n this.socketWarningTimestamp = 0;\n // Node http handler is hard-coded to http/1.1: https://github.com/nodejs/node/blob/ff5664b83b89c55e4ab5d5f60068fb457f1f5872/lib/_http_server.js#L286\n this.metadata = { handlerProtocol: \"http/1.1\" };\n this.configProvider = new Promise((resolve, reject) => {\n if (typeof options === \"function\") {\n options().then((_options) => {\n resolve(this.resolveDefaultConfig(_options));\n }).catch(reject);\n } else {\n resolve(this.resolveDefaultConfig(options));\n }\n });\n }\n static {\n __name(this, \"NodeHttpHandler\");\n }\n /**\n * @returns the input if it is an HttpHandler of any class,\n * or instantiates a new instance of this handler.\n */\n static create(instanceOrOptions) {\n if (typeof instanceOrOptions?.handle === \"function\") {\n return instanceOrOptions;\n }\n return new _NodeHttpHandler(instanceOrOptions);\n }\n /**\n * @internal\n *\n * @param agent - http(s) agent in use by the NodeHttpHandler instance.\n * @param socketWarningTimestamp - last socket usage check timestamp.\n * @param logger - channel for the warning.\n * @returns timestamp of last emitted warning.\n */\n static checkSocketUsage(agent, socketWarningTimestamp, logger = console) {\n const { sockets, requests, maxSockets } = agent;\n if (typeof maxSockets !== \"number\" || maxSockets === Infinity) {\n return socketWarningTimestamp;\n }\n const interval = 15e3;\n if (Date.now() - interval < socketWarningTimestamp) {\n return socketWarningTimestamp;\n }\n if (sockets && requests) {\n for (const origin in sockets) {\n const socketsInUse = sockets[origin]?.length ?? 0;\n const requestsEnqueued = requests[origin]?.length ?? 0;\n if (socketsInUse >= maxSockets && requestsEnqueued >= 2 * maxSockets) {\n logger?.warn?.(\n `@smithy/node-http-handler:WARN - socket usage at capacity=${socketsInUse} and ${requestsEnqueued} additional requests are enqueued.\nSee https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html\nor increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`\n );\n return Date.now();\n }\n }\n }\n return socketWarningTimestamp;\n }\n resolveDefaultConfig(options) {\n const { requestTimeout, connectionTimeout, socketTimeout, socketAcquisitionWarningTimeout, httpAgent, httpsAgent } = options || {};\n const keepAlive = true;\n const maxSockets = 50;\n return {\n connectionTimeout,\n requestTimeout: requestTimeout ?? socketTimeout,\n socketAcquisitionWarningTimeout,\n httpAgent: (() => {\n if (httpAgent instanceof import_http.Agent || typeof httpAgent?.destroy === \"function\") {\n return httpAgent;\n }\n return new import_http.Agent({ keepAlive, maxSockets, ...httpAgent });\n })(),\n httpsAgent: (() => {\n if (httpsAgent instanceof import_https.Agent || typeof httpsAgent?.destroy === \"function\") {\n return httpsAgent;\n }\n return new import_https.Agent({ keepAlive, maxSockets, ...httpsAgent });\n })(),\n logger: console\n };\n }\n destroy() {\n this.config?.httpAgent?.destroy();\n this.config?.httpsAgent?.destroy();\n }\n async handle(request, { abortSignal } = {}) {\n if (!this.config) {\n this.config = await this.configProvider;\n }\n return new Promise((_resolve, _reject) => {\n let writeRequestBodyPromise = void 0;\n const timeouts = [];\n const resolve = /* @__PURE__ */ __name(async (arg) => {\n await writeRequestBodyPromise;\n timeouts.forEach(timing.clearTimeout);\n _resolve(arg);\n }, \"resolve\");\n const reject = /* @__PURE__ */ __name(async (arg) => {\n await writeRequestBodyPromise;\n timeouts.forEach(timing.clearTimeout);\n _reject(arg);\n }, \"reject\");\n if (!this.config) {\n throw new Error(\"Node HTTP request handler config is not resolved\");\n }\n if (abortSignal?.aborted) {\n const abortError = new Error(\"Request aborted\");\n abortError.name = \"AbortError\";\n reject(abortError);\n return;\n }\n const isSSL = request.protocol === \"https:\";\n const agent = isSSL ? this.config.httpsAgent : this.config.httpAgent;\n timeouts.push(\n timing.setTimeout(\n () => {\n this.socketWarningTimestamp = _NodeHttpHandler.checkSocketUsage(\n agent,\n this.socketWarningTimestamp,\n this.config.logger\n );\n },\n this.config.socketAcquisitionWarningTimeout ?? (this.config.requestTimeout ?? 2e3) + (this.config.connectionTimeout ?? 1e3)\n )\n );\n const queryString = (0, import_querystring_builder.buildQueryString)(request.query || {});\n let auth = void 0;\n if (request.username != null || request.password != null) {\n const username = request.username ?? \"\";\n const password = request.password ?? \"\";\n auth = `${username}:${password}`;\n }\n let path = request.path;\n if (queryString) {\n path += `?${queryString}`;\n }\n if (request.fragment) {\n path += `#${request.fragment}`;\n }\n let hostname = request.hostname ?? \"\";\n if (hostname[0] === \"[\" && hostname.endsWith(\"]\")) {\n hostname = request.hostname.slice(1, -1);\n } else {\n hostname = request.hostname;\n }\n const nodeHttpsOptions = {\n headers: request.headers,\n host: hostname,\n method: request.method,\n path,\n port: request.port,\n agent,\n auth\n };\n const requestFunc = isSSL ? import_https.request : import_http.request;\n const req = requestFunc(nodeHttpsOptions, (res) => {\n const httpResponse = new import_protocol_http.HttpResponse({\n statusCode: res.statusCode || -1,\n reason: res.statusMessage,\n headers: getTransformedHeaders(res.headers),\n body: res\n });\n resolve({ response: httpResponse });\n });\n req.on(\"error\", (err) => {\n if (NODEJS_TIMEOUT_ERROR_CODES.includes(err.code)) {\n reject(Object.assign(err, { name: \"TimeoutError\" }));\n } else {\n reject(err);\n }\n });\n if (abortSignal) {\n const onAbort = /* @__PURE__ */ __name(() => {\n req.destroy();\n const abortError = new Error(\"Request aborted\");\n abortError.name = \"AbortError\";\n reject(abortError);\n }, \"onAbort\");\n if (typeof abortSignal.addEventListener === \"function\") {\n const signal = abortSignal;\n signal.addEventListener(\"abort\", onAbort, { once: true });\n req.once(\"close\", () => signal.removeEventListener(\"abort\", onAbort));\n } else {\n abortSignal.onabort = onAbort;\n }\n }\n timeouts.push(setConnectionTimeout(req, reject, this.config.connectionTimeout));\n timeouts.push(setSocketTimeout(req, reject, this.config.requestTimeout));\n const httpAgent = nodeHttpsOptions.agent;\n if (typeof httpAgent === \"object\" && \"keepAlive\" in httpAgent) {\n timeouts.push(\n setSocketKeepAlive(req, {\n // @ts-expect-error keepAlive is not public on httpAgent.\n keepAlive: httpAgent.keepAlive,\n // @ts-expect-error keepAliveMsecs is not public on httpAgent.\n keepAliveMsecs: httpAgent.keepAliveMsecs\n })\n );\n }\n writeRequestBodyPromise = writeRequestBody(req, request, this.config.requestTimeout).catch((e) => {\n timeouts.forEach(timing.clearTimeout);\n return _reject(e);\n });\n });\n }\n updateHttpClientConfig(key, value) {\n this.config = void 0;\n this.configProvider = this.configProvider.then((config) => {\n return {\n ...config,\n [key]: value\n };\n });\n }\n httpHandlerConfigs() {\n return this.config ?? {};\n }\n};\n\n// src/node-http2-handler.ts\n\n\nvar import_http22 = require(\"http2\");\n\n// src/node-http2-connection-manager.ts\nvar import_http2 = __toESM(require(\"http2\"));\n\n// src/node-http2-connection-pool.ts\nvar NodeHttp2ConnectionPool = class {\n constructor(sessions) {\n this.sessions = [];\n this.sessions = sessions ?? [];\n }\n static {\n __name(this, \"NodeHttp2ConnectionPool\");\n }\n poll() {\n if (this.sessions.length > 0) {\n return this.sessions.shift();\n }\n }\n offerLast(session) {\n this.sessions.push(session);\n }\n contains(session) {\n return this.sessions.includes(session);\n }\n remove(session) {\n this.sessions = this.sessions.filter((s) => s !== session);\n }\n [Symbol.iterator]() {\n return this.sessions[Symbol.iterator]();\n }\n destroy(connection) {\n for (const session of this.sessions) {\n if (session === connection) {\n if (!session.destroyed) {\n session.destroy();\n }\n }\n }\n }\n};\n\n// src/node-http2-connection-manager.ts\nvar NodeHttp2ConnectionManager = class {\n constructor(config) {\n this.sessionCache = /* @__PURE__ */ new Map();\n this.config = config;\n if (this.config.maxConcurrency && this.config.maxConcurrency <= 0) {\n throw new RangeError(\"maxConcurrency must be greater than zero.\");\n }\n }\n static {\n __name(this, \"NodeHttp2ConnectionManager\");\n }\n lease(requestContext, connectionConfiguration) {\n const url = this.getUrlString(requestContext);\n const existingPool = this.sessionCache.get(url);\n if (existingPool) {\n const existingSession = existingPool.poll();\n if (existingSession && !this.config.disableConcurrency) {\n return existingSession;\n }\n }\n const session = import_http2.default.connect(url);\n if (this.config.maxConcurrency) {\n session.settings({ maxConcurrentStreams: this.config.maxConcurrency }, (err) => {\n if (err) {\n throw new Error(\n \"Fail to set maxConcurrentStreams to \" + this.config.maxConcurrency + \"when creating new session for \" + requestContext.destination.toString()\n );\n }\n });\n }\n session.unref();\n const destroySessionCb = /* @__PURE__ */ __name(() => {\n session.destroy();\n this.deleteSession(url, session);\n }, \"destroySessionCb\");\n session.on(\"goaway\", destroySessionCb);\n session.on(\"error\", destroySessionCb);\n session.on(\"frameError\", destroySessionCb);\n session.on(\"close\", () => this.deleteSession(url, session));\n if (connectionConfiguration.requestTimeout) {\n session.setTimeout(connectionConfiguration.requestTimeout, destroySessionCb);\n }\n const connectionPool = this.sessionCache.get(url) || new NodeHttp2ConnectionPool();\n connectionPool.offerLast(session);\n this.sessionCache.set(url, connectionPool);\n return session;\n }\n /**\n * Delete a session from the connection pool.\n * @param authority The authority of the session to delete.\n * @param session The session to delete.\n */\n deleteSession(authority, session) {\n const existingConnectionPool = this.sessionCache.get(authority);\n if (!existingConnectionPool) {\n return;\n }\n if (!existingConnectionPool.contains(session)) {\n return;\n }\n existingConnectionPool.remove(session);\n this.sessionCache.set(authority, existingConnectionPool);\n }\n release(requestContext, session) {\n const cacheKey = this.getUrlString(requestContext);\n this.sessionCache.get(cacheKey)?.offerLast(session);\n }\n destroy() {\n for (const [key, connectionPool] of this.sessionCache) {\n for (const session of connectionPool) {\n if (!session.destroyed) {\n session.destroy();\n }\n connectionPool.remove(session);\n }\n this.sessionCache.delete(key);\n }\n }\n setMaxConcurrentStreams(maxConcurrentStreams) {\n if (maxConcurrentStreams && maxConcurrentStreams <= 0) {\n throw new RangeError(\"maxConcurrentStreams must be greater than zero.\");\n }\n this.config.maxConcurrency = maxConcurrentStreams;\n }\n setDisableConcurrentStreams(disableConcurrentStreams) {\n this.config.disableConcurrency = disableConcurrentStreams;\n }\n getUrlString(request) {\n return request.destination.toString();\n }\n};\n\n// src/node-http2-handler.ts\nvar NodeHttp2Handler = class _NodeHttp2Handler {\n constructor(options) {\n this.metadata = { handlerProtocol: \"h2\" };\n this.connectionManager = new NodeHttp2ConnectionManager({});\n this.configProvider = new Promise((resolve, reject) => {\n if (typeof options === \"function\") {\n options().then((opts) => {\n resolve(opts || {});\n }).catch(reject);\n } else {\n resolve(options || {});\n }\n });\n }\n static {\n __name(this, \"NodeHttp2Handler\");\n }\n /**\n * @returns the input if it is an HttpHandler of any class,\n * or instantiates a new instance of this handler.\n */\n static create(instanceOrOptions) {\n if (typeof instanceOrOptions?.handle === \"function\") {\n return instanceOrOptions;\n }\n return new _NodeHttp2Handler(instanceOrOptions);\n }\n destroy() {\n this.connectionManager.destroy();\n }\n async handle(request, { abortSignal } = {}) {\n if (!this.config) {\n this.config = await this.configProvider;\n this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams || false);\n if (this.config.maxConcurrentStreams) {\n this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams);\n }\n }\n const { requestTimeout, disableConcurrentStreams } = this.config;\n return new Promise((_resolve, _reject) => {\n let fulfilled = false;\n let writeRequestBodyPromise = void 0;\n const resolve = /* @__PURE__ */ __name(async (arg) => {\n await writeRequestBodyPromise;\n _resolve(arg);\n }, \"resolve\");\n const reject = /* @__PURE__ */ __name(async (arg) => {\n await writeRequestBodyPromise;\n _reject(arg);\n }, \"reject\");\n if (abortSignal?.aborted) {\n fulfilled = true;\n const abortError = new Error(\"Request aborted\");\n abortError.name = \"AbortError\";\n reject(abortError);\n return;\n }\n const { hostname, method, port, protocol, query } = request;\n let auth = \"\";\n if (request.username != null || request.password != null) {\n const username = request.username ?? \"\";\n const password = request.password ?? \"\";\n auth = `${username}:${password}@`;\n }\n const authority = `${protocol}//${auth}${hostname}${port ? `:${port}` : \"\"}`;\n const requestContext = { destination: new URL(authority) };\n const session = this.connectionManager.lease(requestContext, {\n requestTimeout: this.config?.sessionTimeout,\n disableConcurrentStreams: disableConcurrentStreams || false\n });\n const rejectWithDestroy = /* @__PURE__ */ __name((err) => {\n if (disableConcurrentStreams) {\n this.destroySession(session);\n }\n fulfilled = true;\n reject(err);\n }, \"rejectWithDestroy\");\n const queryString = (0, import_querystring_builder.buildQueryString)(query || {});\n let path = request.path;\n if (queryString) {\n path += `?${queryString}`;\n }\n if (request.fragment) {\n path += `#${request.fragment}`;\n }\n const req = session.request({\n ...request.headers,\n [import_http22.constants.HTTP2_HEADER_PATH]: path,\n [import_http22.constants.HTTP2_HEADER_METHOD]: method\n });\n session.ref();\n req.on(\"response\", (headers) => {\n const httpResponse = new import_protocol_http.HttpResponse({\n statusCode: headers[\":status\"] || -1,\n headers: getTransformedHeaders(headers),\n body: req\n });\n fulfilled = true;\n resolve({ response: httpResponse });\n if (disableConcurrentStreams) {\n session.close();\n this.connectionManager.deleteSession(authority, session);\n }\n });\n if (requestTimeout) {\n req.setTimeout(requestTimeout, () => {\n req.close();\n const timeoutError = new Error(`Stream timed out because of no activity for ${requestTimeout} ms`);\n timeoutError.name = \"TimeoutError\";\n rejectWithDestroy(timeoutError);\n });\n }\n if (abortSignal) {\n const onAbort = /* @__PURE__ */ __name(() => {\n req.close();\n const abortError = new Error(\"Request aborted\");\n abortError.name = \"AbortError\";\n rejectWithDestroy(abortError);\n }, \"onAbort\");\n if (typeof abortSignal.addEventListener === \"function\") {\n const signal = abortSignal;\n signal.addEventListener(\"abort\", onAbort, { once: true });\n req.once(\"close\", () => signal.removeEventListener(\"abort\", onAbort));\n } else {\n abortSignal.onabort = onAbort;\n }\n }\n req.on(\"frameError\", (type, code, id) => {\n rejectWithDestroy(new Error(`Frame type id ${type} in stream id ${id} has failed with code ${code}.`));\n });\n req.on(\"error\", rejectWithDestroy);\n req.on(\"aborted\", () => {\n rejectWithDestroy(\n new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${req.rstCode}.`)\n );\n });\n req.on(\"close\", () => {\n session.unref();\n if (disableConcurrentStreams) {\n session.destroy();\n }\n if (!fulfilled) {\n rejectWithDestroy(new Error(\"Unexpected error: http2 request did not get a response\"));\n }\n });\n writeRequestBodyPromise = writeRequestBody(req, request, requestTimeout);\n });\n }\n updateHttpClientConfig(key, value) {\n this.config = void 0;\n this.configProvider = this.configProvider.then((config) => {\n return {\n ...config,\n [key]: value\n };\n });\n }\n httpHandlerConfigs() {\n return this.config ?? {};\n }\n /**\n * Destroys a session.\n * @param session - the session to destroy.\n */\n destroySession(session) {\n if (!session.destroyed) {\n session.destroy();\n }\n }\n};\n\n// src/stream-collector/collector.ts\n\nvar Collector = class extends import_stream.Writable {\n constructor() {\n super(...arguments);\n this.bufferedBytes = [];\n }\n static {\n __name(this, \"Collector\");\n }\n _write(chunk, encoding, callback) {\n this.bufferedBytes.push(chunk);\n callback();\n }\n};\n\n// src/stream-collector/index.ts\nvar streamCollector = /* @__PURE__ */ __name((stream) => {\n if (isReadableStreamInstance(stream)) {\n return collectReadableStream(stream);\n }\n return new Promise((resolve, reject) => {\n const collector = new Collector();\n stream.pipe(collector);\n stream.on(\"error\", (err) => {\n collector.end();\n reject(err);\n });\n collector.on(\"error\", reject);\n collector.on(\"finish\", function() {\n const bytes = new Uint8Array(Buffer.concat(this.bufferedBytes));\n resolve(bytes);\n });\n });\n}, \"streamCollector\");\nvar isReadableStreamInstance = /* @__PURE__ */ __name((stream) => typeof ReadableStream === \"function\" && stream instanceof ReadableStream, \"isReadableStreamInstance\");\nasync function collectReadableStream(stream) {\n const chunks = [];\n const reader = stream.getReader();\n let isDone = false;\n let length = 0;\n while (!isDone) {\n const { done, value } = await reader.read();\n if (value) {\n chunks.push(value);\n length += value.length;\n }\n isDone = done;\n }\n const collected = new Uint8Array(length);\n let offset = 0;\n for (const chunk of chunks) {\n collected.set(chunk, offset);\n offset += chunk.length;\n }\n return collected;\n}\n__name(collectReadableStream, \"collectReadableStream\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n DEFAULT_REQUEST_TIMEOUT,\n NodeHttpHandler,\n NodeHttp2Handler,\n streamCollector\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n CredentialsProviderError: () => CredentialsProviderError,\n ProviderError: () => ProviderError,\n TokenProviderError: () => TokenProviderError,\n chain: () => chain,\n fromStatic: () => fromStatic,\n memoize: () => memoize\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/ProviderError.ts\nvar ProviderError = class _ProviderError extends Error {\n constructor(message, options = true) {\n let logger;\n let tryNextLink = true;\n if (typeof options === \"boolean\") {\n logger = void 0;\n tryNextLink = options;\n } else if (options != null && typeof options === \"object\") {\n logger = options.logger;\n tryNextLink = options.tryNextLink ?? true;\n }\n super(message);\n this.name = \"ProviderError\";\n this.tryNextLink = tryNextLink;\n Object.setPrototypeOf(this, _ProviderError.prototype);\n logger?.debug?.(`@smithy/property-provider ${tryNextLink ? \"->\" : \"(!)\"} ${message}`);\n }\n static {\n __name(this, \"ProviderError\");\n }\n /**\n * @deprecated use new operator.\n */\n static from(error, options = true) {\n return Object.assign(new this(error.message, options), error);\n }\n};\n\n// src/CredentialsProviderError.ts\nvar CredentialsProviderError = class _CredentialsProviderError extends ProviderError {\n /**\n * @override\n */\n constructor(message, options = true) {\n super(message, options);\n this.name = \"CredentialsProviderError\";\n Object.setPrototypeOf(this, _CredentialsProviderError.prototype);\n }\n static {\n __name(this, \"CredentialsProviderError\");\n }\n};\n\n// src/TokenProviderError.ts\nvar TokenProviderError = class _TokenProviderError extends ProviderError {\n /**\n * @override\n */\n constructor(message, options = true) {\n super(message, options);\n this.name = \"TokenProviderError\";\n Object.setPrototypeOf(this, _TokenProviderError.prototype);\n }\n static {\n __name(this, \"TokenProviderError\");\n }\n};\n\n// src/chain.ts\nvar chain = /* @__PURE__ */ __name((...providers) => async () => {\n if (providers.length === 0) {\n throw new ProviderError(\"No providers in chain\");\n }\n let lastProviderError;\n for (const provider of providers) {\n try {\n const credentials = await provider();\n return credentials;\n } catch (err) {\n lastProviderError = err;\n if (err?.tryNextLink) {\n continue;\n }\n throw err;\n }\n }\n throw lastProviderError;\n}, \"chain\");\n\n// src/fromStatic.ts\nvar fromStatic = /* @__PURE__ */ __name((staticValue) => () => Promise.resolve(staticValue), \"fromStatic\");\n\n// src/memoize.ts\nvar memoize = /* @__PURE__ */ __name((provider, isExpired, requiresRefresh) => {\n let resolved;\n let pending;\n let hasResult;\n let isConstant = false;\n const coalesceProvider = /* @__PURE__ */ __name(async () => {\n if (!pending) {\n pending = provider();\n }\n try {\n resolved = await pending;\n hasResult = true;\n isConstant = false;\n } finally {\n pending = void 0;\n }\n return resolved;\n }, \"coalesceProvider\");\n if (isExpired === void 0) {\n return async (options) => {\n if (!hasResult || options?.forceRefresh) {\n resolved = await coalesceProvider();\n }\n return resolved;\n };\n }\n return async (options) => {\n if (!hasResult || options?.forceRefresh) {\n resolved = await coalesceProvider();\n }\n if (isConstant) {\n return resolved;\n }\n if (requiresRefresh && !requiresRefresh(resolved)) {\n isConstant = true;\n return resolved;\n }\n if (isExpired(resolved)) {\n await coalesceProvider();\n return resolved;\n }\n return resolved;\n };\n}, \"memoize\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n CredentialsProviderError,\n ProviderError,\n TokenProviderError,\n chain,\n fromStatic,\n memoize\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n Field: () => Field,\n Fields: () => Fields,\n HttpRequest: () => HttpRequest,\n HttpResponse: () => HttpResponse,\n IHttpRequest: () => import_types.HttpRequest,\n getHttpHandlerExtensionConfiguration: () => getHttpHandlerExtensionConfiguration,\n isValidHostname: () => isValidHostname,\n resolveHttpHandlerRuntimeConfig: () => resolveHttpHandlerRuntimeConfig\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/extensions/httpExtensionConfiguration.ts\nvar getHttpHandlerExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {\n return {\n setHttpHandler(handler) {\n runtimeConfig.httpHandler = handler;\n },\n httpHandler() {\n return runtimeConfig.httpHandler;\n },\n updateHttpClientConfig(key, value) {\n runtimeConfig.httpHandler?.updateHttpClientConfig(key, value);\n },\n httpHandlerConfigs() {\n return runtimeConfig.httpHandler.httpHandlerConfigs();\n }\n };\n}, \"getHttpHandlerExtensionConfiguration\");\nvar resolveHttpHandlerRuntimeConfig = /* @__PURE__ */ __name((httpHandlerExtensionConfiguration) => {\n return {\n httpHandler: httpHandlerExtensionConfiguration.httpHandler()\n };\n}, \"resolveHttpHandlerRuntimeConfig\");\n\n// src/Field.ts\nvar import_types = require(\"@smithy/types\");\nvar Field = class {\n static {\n __name(this, \"Field\");\n }\n constructor({ name, kind = import_types.FieldPosition.HEADER, values = [] }) {\n this.name = name;\n this.kind = kind;\n this.values = values;\n }\n /**\n * Appends a value to the field.\n *\n * @param value The value to append.\n */\n add(value) {\n this.values.push(value);\n }\n /**\n * Overwrite existing field values.\n *\n * @param values The new field values.\n */\n set(values) {\n this.values = values;\n }\n /**\n * Remove all matching entries from list.\n *\n * @param value Value to remove.\n */\n remove(value) {\n this.values = this.values.filter((v) => v !== value);\n }\n /**\n * Get comma-delimited string.\n *\n * @returns String representation of {@link Field}.\n */\n toString() {\n return this.values.map((v) => v.includes(\",\") || v.includes(\" \") ? `\"${v}\"` : v).join(\", \");\n }\n /**\n * Get string values as a list\n *\n * @returns Values in {@link Field} as a list.\n */\n get() {\n return this.values;\n }\n};\n\n// src/Fields.ts\nvar Fields = class {\n constructor({ fields = [], encoding = \"utf-8\" }) {\n this.entries = {};\n fields.forEach(this.setField.bind(this));\n this.encoding = encoding;\n }\n static {\n __name(this, \"Fields\");\n }\n /**\n * Set entry for a {@link Field} name. The `name`\n * attribute will be used to key the collection.\n *\n * @param field The {@link Field} to set.\n */\n setField(field) {\n this.entries[field.name.toLowerCase()] = field;\n }\n /**\n * Retrieve {@link Field} entry by name.\n *\n * @param name The name of the {@link Field} entry\n * to retrieve\n * @returns The {@link Field} if it exists.\n */\n getField(name) {\n return this.entries[name.toLowerCase()];\n }\n /**\n * Delete entry from collection.\n *\n * @param name Name of the entry to delete.\n */\n removeField(name) {\n delete this.entries[name.toLowerCase()];\n }\n /**\n * Helper function for retrieving specific types of fields.\n * Used to grab all headers or all trailers.\n *\n * @param kind {@link FieldPosition} of entries to retrieve.\n * @returns The {@link Field} entries with the specified\n * {@link FieldPosition}.\n */\n getByType(kind) {\n return Object.values(this.entries).filter((field) => field.kind === kind);\n }\n};\n\n// src/httpRequest.ts\n\nvar HttpRequest = class _HttpRequest {\n static {\n __name(this, \"HttpRequest\");\n }\n constructor(options) {\n this.method = options.method || \"GET\";\n this.hostname = options.hostname || \"localhost\";\n this.port = options.port;\n this.query = options.query || {};\n this.headers = options.headers || {};\n this.body = options.body;\n this.protocol = options.protocol ? options.protocol.slice(-1) !== \":\" ? `${options.protocol}:` : options.protocol : \"https:\";\n this.path = options.path ? options.path.charAt(0) !== \"/\" ? `/${options.path}` : options.path : \"/\";\n this.username = options.username;\n this.password = options.password;\n this.fragment = options.fragment;\n }\n /**\n * Note: this does not deep-clone the body.\n */\n static clone(request) {\n const cloned = new _HttpRequest({\n ...request,\n headers: { ...request.headers }\n });\n if (cloned.query) {\n cloned.query = cloneQuery(cloned.query);\n }\n return cloned;\n }\n /**\n * This method only actually asserts that request is the interface {@link IHttpRequest},\n * and not necessarily this concrete class. Left in place for API stability.\n *\n * Do not call instance methods on the input of this function, and\n * do not assume it has the HttpRequest prototype.\n */\n static isInstance(request) {\n if (!request) {\n return false;\n }\n const req = request;\n return \"method\" in req && \"protocol\" in req && \"hostname\" in req && \"path\" in req && typeof req[\"query\"] === \"object\" && typeof req[\"headers\"] === \"object\";\n }\n /**\n * @deprecated use static HttpRequest.clone(request) instead. It's not safe to call\n * this method because {@link HttpRequest.isInstance} incorrectly\n * asserts that IHttpRequest (interface) objects are of type HttpRequest (class).\n */\n clone() {\n return _HttpRequest.clone(this);\n }\n};\nfunction cloneQuery(query) {\n return Object.keys(query).reduce((carry, paramName) => {\n const param = query[paramName];\n return {\n ...carry,\n [paramName]: Array.isArray(param) ? [...param] : param\n };\n }, {});\n}\n__name(cloneQuery, \"cloneQuery\");\n\n// src/httpResponse.ts\nvar HttpResponse = class {\n static {\n __name(this, \"HttpResponse\");\n }\n constructor(options) {\n this.statusCode = options.statusCode;\n this.reason = options.reason;\n this.headers = options.headers || {};\n this.body = options.body;\n }\n static isInstance(response) {\n if (!response)\n return false;\n const resp = response;\n return typeof resp.statusCode === \"number\" && typeof resp.headers === \"object\";\n }\n};\n\n// src/isValidHostname.ts\nfunction isValidHostname(hostname) {\n const hostPattern = /^[a-z0-9][a-z0-9\\.\\-]*[a-z0-9]$/;\n return hostPattern.test(hostname);\n}\n__name(isValidHostname, \"isValidHostname\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n getHttpHandlerExtensionConfiguration,\n resolveHttpHandlerRuntimeConfig,\n Field,\n Fields,\n HttpRequest,\n HttpResponse,\n isValidHostname\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n AlgorithmId: () => AlgorithmId,\n EndpointURLScheme: () => EndpointURLScheme,\n FieldPosition: () => FieldPosition,\n HttpApiKeyAuthLocation: () => HttpApiKeyAuthLocation,\n HttpAuthLocation: () => HttpAuthLocation,\n IniSectionType: () => IniSectionType,\n RequestHandlerProtocol: () => RequestHandlerProtocol,\n SMITHY_CONTEXT_KEY: () => SMITHY_CONTEXT_KEY,\n getDefaultClientConfiguration: () => getDefaultClientConfiguration,\n resolveDefaultRuntimeConfig: () => resolveDefaultRuntimeConfig\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/auth/auth.ts\nvar HttpAuthLocation = /* @__PURE__ */ ((HttpAuthLocation2) => {\n HttpAuthLocation2[\"HEADER\"] = \"header\";\n HttpAuthLocation2[\"QUERY\"] = \"query\";\n return HttpAuthLocation2;\n})(HttpAuthLocation || {});\n\n// src/auth/HttpApiKeyAuth.ts\nvar HttpApiKeyAuthLocation = /* @__PURE__ */ ((HttpApiKeyAuthLocation2) => {\n HttpApiKeyAuthLocation2[\"HEADER\"] = \"header\";\n HttpApiKeyAuthLocation2[\"QUERY\"] = \"query\";\n return HttpApiKeyAuthLocation2;\n})(HttpApiKeyAuthLocation || {});\n\n// src/endpoint.ts\nvar EndpointURLScheme = /* @__PURE__ */ ((EndpointURLScheme2) => {\n EndpointURLScheme2[\"HTTP\"] = \"http\";\n EndpointURLScheme2[\"HTTPS\"] = \"https\";\n return EndpointURLScheme2;\n})(EndpointURLScheme || {});\n\n// src/extensions/checksum.ts\nvar AlgorithmId = /* @__PURE__ */ ((AlgorithmId2) => {\n AlgorithmId2[\"MD5\"] = \"md5\";\n AlgorithmId2[\"CRC32\"] = \"crc32\";\n AlgorithmId2[\"CRC32C\"] = \"crc32c\";\n AlgorithmId2[\"SHA1\"] = \"sha1\";\n AlgorithmId2[\"SHA256\"] = \"sha256\";\n return AlgorithmId2;\n})(AlgorithmId || {});\nvar getChecksumConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {\n const checksumAlgorithms = [];\n if (runtimeConfig.sha256 !== void 0) {\n checksumAlgorithms.push({\n algorithmId: () => \"sha256\" /* SHA256 */,\n checksumConstructor: () => runtimeConfig.sha256\n });\n }\n if (runtimeConfig.md5 != void 0) {\n checksumAlgorithms.push({\n algorithmId: () => \"md5\" /* MD5 */,\n checksumConstructor: () => runtimeConfig.md5\n });\n }\n return {\n addChecksumAlgorithm(algo) {\n checksumAlgorithms.push(algo);\n },\n checksumAlgorithms() {\n return checksumAlgorithms;\n }\n };\n}, \"getChecksumConfiguration\");\nvar resolveChecksumRuntimeConfig = /* @__PURE__ */ __name((clientConfig) => {\n const runtimeConfig = {};\n clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => {\n runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor();\n });\n return runtimeConfig;\n}, \"resolveChecksumRuntimeConfig\");\n\n// src/extensions/defaultClientConfiguration.ts\nvar getDefaultClientConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {\n return getChecksumConfiguration(runtimeConfig);\n}, \"getDefaultClientConfiguration\");\nvar resolveDefaultRuntimeConfig = /* @__PURE__ */ __name((config) => {\n return resolveChecksumRuntimeConfig(config);\n}, \"resolveDefaultRuntimeConfig\");\n\n// src/http.ts\nvar FieldPosition = /* @__PURE__ */ ((FieldPosition2) => {\n FieldPosition2[FieldPosition2[\"HEADER\"] = 0] = \"HEADER\";\n FieldPosition2[FieldPosition2[\"TRAILER\"] = 1] = \"TRAILER\";\n return FieldPosition2;\n})(FieldPosition || {});\n\n// src/middleware.ts\nvar SMITHY_CONTEXT_KEY = \"__smithy_context\";\n\n// src/profile.ts\nvar IniSectionType = /* @__PURE__ */ ((IniSectionType2) => {\n IniSectionType2[\"PROFILE\"] = \"profile\";\n IniSectionType2[\"SSO_SESSION\"] = \"sso-session\";\n IniSectionType2[\"SERVICES\"] = \"services\";\n return IniSectionType2;\n})(IniSectionType || {});\n\n// src/transfer.ts\nvar RequestHandlerProtocol = /* @__PURE__ */ ((RequestHandlerProtocol2) => {\n RequestHandlerProtocol2[\"HTTP_0_9\"] = \"http/0.9\";\n RequestHandlerProtocol2[\"HTTP_1_0\"] = \"http/1.0\";\n RequestHandlerProtocol2[\"TDS_8_0\"] = \"tds/8.0\";\n return RequestHandlerProtocol2;\n})(RequestHandlerProtocol || {});\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n HttpAuthLocation,\n HttpApiKeyAuthLocation,\n EndpointURLScheme,\n AlgorithmId,\n getDefaultClientConfiguration,\n resolveDefaultRuntimeConfig,\n FieldPosition,\n SMITHY_CONTEXT_KEY,\n IniSectionType,\n RequestHandlerProtocol\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n buildQueryString: () => buildQueryString\n});\nmodule.exports = __toCommonJS(src_exports);\nvar import_util_uri_escape = require(\"@smithy/util-uri-escape\");\nfunction buildQueryString(query) {\n const parts = [];\n for (let key of Object.keys(query).sort()) {\n const value = query[key];\n key = (0, import_util_uri_escape.escapeUri)(key);\n if (Array.isArray(value)) {\n for (let i = 0, iLen = value.length; i < iLen; i++) {\n parts.push(`${key}=${(0, import_util_uri_escape.escapeUri)(value[i])}`);\n }\n } else {\n let qsEntry = key;\n if (value || typeof value === \"string\") {\n qsEntry += `=${(0, import_util_uri_escape.escapeUri)(value)}`;\n }\n parts.push(qsEntry);\n }\n }\n return parts.join(\"&\");\n}\n__name(buildQueryString, \"buildQueryString\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n buildQueryString\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n parseQueryString: () => parseQueryString\n});\nmodule.exports = __toCommonJS(src_exports);\nfunction parseQueryString(querystring) {\n const query = {};\n querystring = querystring.replace(/^\\?/, \"\");\n if (querystring) {\n for (const pair of querystring.split(\"&\")) {\n let [key, value = null] = pair.split(\"=\");\n key = decodeURIComponent(key);\n if (value) {\n value = decodeURIComponent(value);\n }\n if (!(key in query)) {\n query[key] = value;\n } else if (Array.isArray(query[key])) {\n query[key].push(value);\n } else {\n query[key] = [query[key], value];\n }\n }\n }\n return query;\n}\n__name(parseQueryString, \"parseQueryString\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n parseQueryString\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n isBrowserNetworkError: () => isBrowserNetworkError,\n isClockSkewCorrectedError: () => isClockSkewCorrectedError,\n isClockSkewError: () => isClockSkewError,\n isRetryableByTrait: () => isRetryableByTrait,\n isServerError: () => isServerError,\n isThrottlingError: () => isThrottlingError,\n isTransientError: () => isTransientError\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/constants.ts\nvar CLOCK_SKEW_ERROR_CODES = [\n \"AuthFailure\",\n \"InvalidSignatureException\",\n \"RequestExpired\",\n \"RequestInTheFuture\",\n \"RequestTimeTooSkewed\",\n \"SignatureDoesNotMatch\"\n];\nvar THROTTLING_ERROR_CODES = [\n \"BandwidthLimitExceeded\",\n \"EC2ThrottledException\",\n \"LimitExceededException\",\n \"PriorRequestNotComplete\",\n \"ProvisionedThroughputExceededException\",\n \"RequestLimitExceeded\",\n \"RequestThrottled\",\n \"RequestThrottledException\",\n \"SlowDown\",\n \"ThrottledException\",\n \"Throttling\",\n \"ThrottlingException\",\n \"TooManyRequestsException\",\n \"TransactionInProgressException\"\n // DynamoDB\n];\nvar TRANSIENT_ERROR_CODES = [\"TimeoutError\", \"RequestTimeout\", \"RequestTimeoutException\"];\nvar TRANSIENT_ERROR_STATUS_CODES = [500, 502, 503, 504];\nvar NODEJS_TIMEOUT_ERROR_CODES = [\"ECONNRESET\", \"ECONNREFUSED\", \"EPIPE\", \"ETIMEDOUT\"];\n\n// src/index.ts\nvar isRetryableByTrait = /* @__PURE__ */ __name((error) => error.$retryable !== void 0, \"isRetryableByTrait\");\nvar isClockSkewError = /* @__PURE__ */ __name((error) => CLOCK_SKEW_ERROR_CODES.includes(error.name), \"isClockSkewError\");\nvar isClockSkewCorrectedError = /* @__PURE__ */ __name((error) => error.$metadata?.clockSkewCorrected, \"isClockSkewCorrectedError\");\nvar isBrowserNetworkError = /* @__PURE__ */ __name((error) => {\n const errorMessages = /* @__PURE__ */ new Set([\n \"Failed to fetch\",\n // Chrome\n \"NetworkError when attempting to fetch resource\",\n // Firefox\n \"The Internet connection appears to be offline\",\n // Safari 16\n \"Load failed\",\n // Safari 17+\n \"Network request failed\"\n // `cross-fetch`\n ]);\n const isValid = error && error instanceof TypeError;\n if (!isValid) {\n return false;\n }\n return errorMessages.has(error.message);\n}, \"isBrowserNetworkError\");\nvar isThrottlingError = /* @__PURE__ */ __name((error) => error.$metadata?.httpStatusCode === 429 || THROTTLING_ERROR_CODES.includes(error.name) || error.$retryable?.throttling == true, \"isThrottlingError\");\nvar isTransientError = /* @__PURE__ */ __name((error, depth = 0) => isClockSkewCorrectedError(error) || TRANSIENT_ERROR_CODES.includes(error.name) || NODEJS_TIMEOUT_ERROR_CODES.includes(error?.code || \"\") || TRANSIENT_ERROR_STATUS_CODES.includes(error.$metadata?.httpStatusCode || 0) || isBrowserNetworkError(error) || error.cause !== void 0 && depth <= 10 && isTransientError(error.cause, depth + 1), \"isTransientError\");\nvar isServerError = /* @__PURE__ */ __name((error) => {\n if (error.$metadata?.httpStatusCode !== void 0) {\n const statusCode = error.$metadata.httpStatusCode;\n if (500 <= statusCode && statusCode <= 599 && !isTransientError(error)) {\n return true;\n }\n return false;\n }\n return false;\n}, \"isServerError\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n isRetryableByTrait,\n isClockSkewError,\n isClockSkewCorrectedError,\n isBrowserNetworkError,\n isThrottlingError,\n isTransientError,\n isServerError\n});\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getHomeDir = void 0;\nconst os_1 = require(\"os\");\nconst path_1 = require(\"path\");\nconst homeDirCache = {};\nconst getHomeDirCacheKey = () => {\n if (process && process.geteuid) {\n return `${process.geteuid()}`;\n }\n return \"DEFAULT\";\n};\nconst getHomeDir = () => {\n const { HOME, USERPROFILE, HOMEPATH, HOMEDRIVE = `C:${path_1.sep}` } = process.env;\n if (HOME)\n return HOME;\n if (USERPROFILE)\n return USERPROFILE;\n if (HOMEPATH)\n return `${HOMEDRIVE}${HOMEPATH}`;\n const homeDirCacheKey = getHomeDirCacheKey();\n if (!homeDirCache[homeDirCacheKey])\n homeDirCache[homeDirCacheKey] = (0, os_1.homedir)();\n return homeDirCache[homeDirCacheKey];\n};\nexports.getHomeDir = getHomeDir;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getSSOTokenFilepath = void 0;\nconst crypto_1 = require(\"crypto\");\nconst path_1 = require(\"path\");\nconst getHomeDir_1 = require(\"./getHomeDir\");\nconst getSSOTokenFilepath = (id) => {\n const hasher = (0, crypto_1.createHash)(\"sha1\");\n const cacheName = hasher.update(id).digest(\"hex\");\n return (0, path_1.join)((0, getHomeDir_1.getHomeDir)(), \".aws\", \"sso\", \"cache\", `${cacheName}.json`);\n};\nexports.getSSOTokenFilepath = getSSOTokenFilepath;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getSSOTokenFromFile = void 0;\nconst fs_1 = require(\"fs\");\nconst getSSOTokenFilepath_1 = require(\"./getSSOTokenFilepath\");\nconst { readFile } = fs_1.promises;\nconst getSSOTokenFromFile = async (id) => {\n const ssoTokenFilepath = (0, getSSOTokenFilepath_1.getSSOTokenFilepath)(id);\n const ssoTokenText = await readFile(ssoTokenFilepath, \"utf8\");\n return JSON.parse(ssoTokenText);\n};\nexports.getSSOTokenFromFile = getSSOTokenFromFile;\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n CONFIG_PREFIX_SEPARATOR: () => CONFIG_PREFIX_SEPARATOR,\n DEFAULT_PROFILE: () => DEFAULT_PROFILE,\n ENV_PROFILE: () => ENV_PROFILE,\n getProfileName: () => getProfileName,\n loadSharedConfigFiles: () => loadSharedConfigFiles,\n loadSsoSessionData: () => loadSsoSessionData,\n parseKnownFiles: () => parseKnownFiles\n});\nmodule.exports = __toCommonJS(src_exports);\n__reExport(src_exports, require(\"././getHomeDir\"), module.exports);\n\n// src/getProfileName.ts\nvar ENV_PROFILE = \"AWS_PROFILE\";\nvar DEFAULT_PROFILE = \"default\";\nvar getProfileName = /* @__PURE__ */ __name((init) => init.profile || process.env[ENV_PROFILE] || DEFAULT_PROFILE, \"getProfileName\");\n\n// src/index.ts\n__reExport(src_exports, require(\"././getSSOTokenFilepath\"), module.exports);\n__reExport(src_exports, require(\"././getSSOTokenFromFile\"), module.exports);\n\n// src/loadSharedConfigFiles.ts\n\n\n// src/getConfigData.ts\nvar import_types = require(\"@smithy/types\");\nvar getConfigData = /* @__PURE__ */ __name((data) => Object.entries(data).filter(([key]) => {\n const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR);\n if (indexOfSeparator === -1) {\n return false;\n }\n return Object.values(import_types.IniSectionType).includes(key.substring(0, indexOfSeparator));\n}).reduce(\n (acc, [key, value]) => {\n const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR);\n const updatedKey = key.substring(0, indexOfSeparator) === import_types.IniSectionType.PROFILE ? key.substring(indexOfSeparator + 1) : key;\n acc[updatedKey] = value;\n return acc;\n },\n {\n // Populate default profile, if present.\n ...data.default && { default: data.default }\n }\n), \"getConfigData\");\n\n// src/getConfigFilepath.ts\nvar import_path = require(\"path\");\nvar import_getHomeDir = require(\"././getHomeDir\");\nvar ENV_CONFIG_PATH = \"AWS_CONFIG_FILE\";\nvar getConfigFilepath = /* @__PURE__ */ __name(() => process.env[ENV_CONFIG_PATH] || (0, import_path.join)((0, import_getHomeDir.getHomeDir)(), \".aws\", \"config\"), \"getConfigFilepath\");\n\n// src/getCredentialsFilepath.ts\n\nvar import_getHomeDir2 = require(\"././getHomeDir\");\nvar ENV_CREDENTIALS_PATH = \"AWS_SHARED_CREDENTIALS_FILE\";\nvar getCredentialsFilepath = /* @__PURE__ */ __name(() => process.env[ENV_CREDENTIALS_PATH] || (0, import_path.join)((0, import_getHomeDir2.getHomeDir)(), \".aws\", \"credentials\"), \"getCredentialsFilepath\");\n\n// src/loadSharedConfigFiles.ts\nvar import_getHomeDir3 = require(\"././getHomeDir\");\n\n// src/parseIni.ts\n\nvar prefixKeyRegex = /^([\\w-]+)\\s([\"'])?([\\w-@\\+\\.%:/]+)\\2$/;\nvar profileNameBlockList = [\"__proto__\", \"profile __proto__\"];\nvar parseIni = /* @__PURE__ */ __name((iniData) => {\n const map = {};\n let currentSection;\n let currentSubSection;\n for (const iniLine of iniData.split(/\\r?\\n/)) {\n const trimmedLine = iniLine.split(/(^|\\s)[;#]/)[0].trim();\n const isSection = trimmedLine[0] === \"[\" && trimmedLine[trimmedLine.length - 1] === \"]\";\n if (isSection) {\n currentSection = void 0;\n currentSubSection = void 0;\n const sectionName = trimmedLine.substring(1, trimmedLine.length - 1);\n const matches = prefixKeyRegex.exec(sectionName);\n if (matches) {\n const [, prefix, , name] = matches;\n if (Object.values(import_types.IniSectionType).includes(prefix)) {\n currentSection = [prefix, name].join(CONFIG_PREFIX_SEPARATOR);\n }\n } else {\n currentSection = sectionName;\n }\n if (profileNameBlockList.includes(sectionName)) {\n throw new Error(`Found invalid profile name \"${sectionName}\"`);\n }\n } else if (currentSection) {\n const indexOfEqualsSign = trimmedLine.indexOf(\"=\");\n if (![0, -1].includes(indexOfEqualsSign)) {\n const [name, value] = [\n trimmedLine.substring(0, indexOfEqualsSign).trim(),\n trimmedLine.substring(indexOfEqualsSign + 1).trim()\n ];\n if (value === \"\") {\n currentSubSection = name;\n } else {\n if (currentSubSection && iniLine.trimStart() === iniLine) {\n currentSubSection = void 0;\n }\n map[currentSection] = map[currentSection] || {};\n const key = currentSubSection ? [currentSubSection, name].join(CONFIG_PREFIX_SEPARATOR) : name;\n map[currentSection][key] = value;\n }\n }\n }\n }\n return map;\n}, \"parseIni\");\n\n// src/loadSharedConfigFiles.ts\nvar import_slurpFile = require(\"././slurpFile\");\nvar swallowError = /* @__PURE__ */ __name(() => ({}), \"swallowError\");\nvar CONFIG_PREFIX_SEPARATOR = \".\";\nvar loadSharedConfigFiles = /* @__PURE__ */ __name(async (init = {}) => {\n const { filepath = getCredentialsFilepath(), configFilepath = getConfigFilepath() } = init;\n const homeDir = (0, import_getHomeDir3.getHomeDir)();\n const relativeHomeDirPrefix = \"~/\";\n let resolvedFilepath = filepath;\n if (filepath.startsWith(relativeHomeDirPrefix)) {\n resolvedFilepath = (0, import_path.join)(homeDir, filepath.slice(2));\n }\n let resolvedConfigFilepath = configFilepath;\n if (configFilepath.startsWith(relativeHomeDirPrefix)) {\n resolvedConfigFilepath = (0, import_path.join)(homeDir, configFilepath.slice(2));\n }\n const parsedFiles = await Promise.all([\n (0, import_slurpFile.slurpFile)(resolvedConfigFilepath, {\n ignoreCache: init.ignoreCache\n }).then(parseIni).then(getConfigData).catch(swallowError),\n (0, import_slurpFile.slurpFile)(resolvedFilepath, {\n ignoreCache: init.ignoreCache\n }).then(parseIni).catch(swallowError)\n ]);\n return {\n configFile: parsedFiles[0],\n credentialsFile: parsedFiles[1]\n };\n}, \"loadSharedConfigFiles\");\n\n// src/getSsoSessionData.ts\n\nvar getSsoSessionData = /* @__PURE__ */ __name((data) => Object.entries(data).filter(([key]) => key.startsWith(import_types.IniSectionType.SSO_SESSION + CONFIG_PREFIX_SEPARATOR)).reduce((acc, [key, value]) => ({ ...acc, [key.substring(key.indexOf(CONFIG_PREFIX_SEPARATOR) + 1)]: value }), {}), \"getSsoSessionData\");\n\n// src/loadSsoSessionData.ts\nvar import_slurpFile2 = require(\"././slurpFile\");\nvar swallowError2 = /* @__PURE__ */ __name(() => ({}), \"swallowError\");\nvar loadSsoSessionData = /* @__PURE__ */ __name(async (init = {}) => (0, import_slurpFile2.slurpFile)(init.configFilepath ?? getConfigFilepath()).then(parseIni).then(getSsoSessionData).catch(swallowError2), \"loadSsoSessionData\");\n\n// src/mergeConfigFiles.ts\nvar mergeConfigFiles = /* @__PURE__ */ __name((...files) => {\n const merged = {};\n for (const file of files) {\n for (const [key, values] of Object.entries(file)) {\n if (merged[key] !== void 0) {\n Object.assign(merged[key], values);\n } else {\n merged[key] = values;\n }\n }\n }\n return merged;\n}, \"mergeConfigFiles\");\n\n// src/parseKnownFiles.ts\nvar parseKnownFiles = /* @__PURE__ */ __name(async (init) => {\n const parsedFiles = await loadSharedConfigFiles(init);\n return mergeConfigFiles(parsedFiles.configFile, parsedFiles.credentialsFile);\n}, \"parseKnownFiles\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n getHomeDir,\n ENV_PROFILE,\n DEFAULT_PROFILE,\n getProfileName,\n getSSOTokenFilepath,\n getSSOTokenFromFile,\n CONFIG_PREFIX_SEPARATOR,\n loadSharedConfigFiles,\n loadSsoSessionData,\n parseKnownFiles\n});\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.slurpFile = void 0;\nconst fs_1 = require(\"fs\");\nconst { readFile } = fs_1.promises;\nconst filePromisesHash = {};\nconst slurpFile = (path, options) => {\n if (!filePromisesHash[path] || (options === null || options === void 0 ? void 0 : options.ignoreCache)) {\n filePromisesHash[path] = readFile(path, \"utf8\");\n }\n return filePromisesHash[path];\n};\nexports.slurpFile = slurpFile;\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n AlgorithmId: () => AlgorithmId,\n EndpointURLScheme: () => EndpointURLScheme,\n FieldPosition: () => FieldPosition,\n HttpApiKeyAuthLocation: () => HttpApiKeyAuthLocation,\n HttpAuthLocation: () => HttpAuthLocation,\n IniSectionType: () => IniSectionType,\n RequestHandlerProtocol: () => RequestHandlerProtocol,\n SMITHY_CONTEXT_KEY: () => SMITHY_CONTEXT_KEY,\n getDefaultClientConfiguration: () => getDefaultClientConfiguration,\n resolveDefaultRuntimeConfig: () => resolveDefaultRuntimeConfig\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/auth/auth.ts\nvar HttpAuthLocation = /* @__PURE__ */ ((HttpAuthLocation2) => {\n HttpAuthLocation2[\"HEADER\"] = \"header\";\n HttpAuthLocation2[\"QUERY\"] = \"query\";\n return HttpAuthLocation2;\n})(HttpAuthLocation || {});\n\n// src/auth/HttpApiKeyAuth.ts\nvar HttpApiKeyAuthLocation = /* @__PURE__ */ ((HttpApiKeyAuthLocation2) => {\n HttpApiKeyAuthLocation2[\"HEADER\"] = \"header\";\n HttpApiKeyAuthLocation2[\"QUERY\"] = \"query\";\n return HttpApiKeyAuthLocation2;\n})(HttpApiKeyAuthLocation || {});\n\n// src/endpoint.ts\nvar EndpointURLScheme = /* @__PURE__ */ ((EndpointURLScheme2) => {\n EndpointURLScheme2[\"HTTP\"] = \"http\";\n EndpointURLScheme2[\"HTTPS\"] = \"https\";\n return EndpointURLScheme2;\n})(EndpointURLScheme || {});\n\n// src/extensions/checksum.ts\nvar AlgorithmId = /* @__PURE__ */ ((AlgorithmId2) => {\n AlgorithmId2[\"MD5\"] = \"md5\";\n AlgorithmId2[\"CRC32\"] = \"crc32\";\n AlgorithmId2[\"CRC32C\"] = \"crc32c\";\n AlgorithmId2[\"SHA1\"] = \"sha1\";\n AlgorithmId2[\"SHA256\"] = \"sha256\";\n return AlgorithmId2;\n})(AlgorithmId || {});\nvar getChecksumConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {\n const checksumAlgorithms = [];\n if (runtimeConfig.sha256 !== void 0) {\n checksumAlgorithms.push({\n algorithmId: () => \"sha256\" /* SHA256 */,\n checksumConstructor: () => runtimeConfig.sha256\n });\n }\n if (runtimeConfig.md5 != void 0) {\n checksumAlgorithms.push({\n algorithmId: () => \"md5\" /* MD5 */,\n checksumConstructor: () => runtimeConfig.md5\n });\n }\n return {\n addChecksumAlgorithm(algo) {\n checksumAlgorithms.push(algo);\n },\n checksumAlgorithms() {\n return checksumAlgorithms;\n }\n };\n}, \"getChecksumConfiguration\");\nvar resolveChecksumRuntimeConfig = /* @__PURE__ */ __name((clientConfig) => {\n const runtimeConfig = {};\n clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => {\n runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor();\n });\n return runtimeConfig;\n}, \"resolveChecksumRuntimeConfig\");\n\n// src/extensions/defaultClientConfiguration.ts\nvar getDefaultClientConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {\n return getChecksumConfiguration(runtimeConfig);\n}, \"getDefaultClientConfiguration\");\nvar resolveDefaultRuntimeConfig = /* @__PURE__ */ __name((config) => {\n return resolveChecksumRuntimeConfig(config);\n}, \"resolveDefaultRuntimeConfig\");\n\n// src/http.ts\nvar FieldPosition = /* @__PURE__ */ ((FieldPosition2) => {\n FieldPosition2[FieldPosition2[\"HEADER\"] = 0] = \"HEADER\";\n FieldPosition2[FieldPosition2[\"TRAILER\"] = 1] = \"TRAILER\";\n return FieldPosition2;\n})(FieldPosition || {});\n\n// src/middleware.ts\nvar SMITHY_CONTEXT_KEY = \"__smithy_context\";\n\n// src/profile.ts\nvar IniSectionType = /* @__PURE__ */ ((IniSectionType2) => {\n IniSectionType2[\"PROFILE\"] = \"profile\";\n IniSectionType2[\"SSO_SESSION\"] = \"sso-session\";\n IniSectionType2[\"SERVICES\"] = \"services\";\n return IniSectionType2;\n})(IniSectionType || {});\n\n// src/transfer.ts\nvar RequestHandlerProtocol = /* @__PURE__ */ ((RequestHandlerProtocol2) => {\n RequestHandlerProtocol2[\"HTTP_0_9\"] = \"http/0.9\";\n RequestHandlerProtocol2[\"HTTP_1_0\"] = \"http/1.0\";\n RequestHandlerProtocol2[\"TDS_8_0\"] = \"tds/8.0\";\n return RequestHandlerProtocol2;\n})(RequestHandlerProtocol || {});\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n HttpAuthLocation,\n HttpApiKeyAuthLocation,\n EndpointURLScheme,\n AlgorithmId,\n getDefaultClientConfiguration,\n resolveDefaultRuntimeConfig,\n FieldPosition,\n SMITHY_CONTEXT_KEY,\n IniSectionType,\n RequestHandlerProtocol\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n ALGORITHM_IDENTIFIER: () => ALGORITHM_IDENTIFIER,\n ALGORITHM_IDENTIFIER_V4A: () => ALGORITHM_IDENTIFIER_V4A,\n ALGORITHM_QUERY_PARAM: () => ALGORITHM_QUERY_PARAM,\n ALWAYS_UNSIGNABLE_HEADERS: () => ALWAYS_UNSIGNABLE_HEADERS,\n AMZ_DATE_HEADER: () => AMZ_DATE_HEADER,\n AMZ_DATE_QUERY_PARAM: () => AMZ_DATE_QUERY_PARAM,\n AUTH_HEADER: () => AUTH_HEADER,\n CREDENTIAL_QUERY_PARAM: () => CREDENTIAL_QUERY_PARAM,\n DATE_HEADER: () => DATE_HEADER,\n EVENT_ALGORITHM_IDENTIFIER: () => EVENT_ALGORITHM_IDENTIFIER,\n EXPIRES_QUERY_PARAM: () => EXPIRES_QUERY_PARAM,\n GENERATED_HEADERS: () => GENERATED_HEADERS,\n HOST_HEADER: () => HOST_HEADER,\n KEY_TYPE_IDENTIFIER: () => KEY_TYPE_IDENTIFIER,\n MAX_CACHE_SIZE: () => MAX_CACHE_SIZE,\n MAX_PRESIGNED_TTL: () => MAX_PRESIGNED_TTL,\n PROXY_HEADER_PATTERN: () => PROXY_HEADER_PATTERN,\n REGION_SET_PARAM: () => REGION_SET_PARAM,\n SEC_HEADER_PATTERN: () => SEC_HEADER_PATTERN,\n SHA256_HEADER: () => SHA256_HEADER,\n SIGNATURE_HEADER: () => SIGNATURE_HEADER,\n SIGNATURE_QUERY_PARAM: () => SIGNATURE_QUERY_PARAM,\n SIGNED_HEADERS_QUERY_PARAM: () => SIGNED_HEADERS_QUERY_PARAM,\n SignatureV4: () => SignatureV4,\n SignatureV4Base: () => SignatureV4Base,\n TOKEN_HEADER: () => TOKEN_HEADER,\n TOKEN_QUERY_PARAM: () => TOKEN_QUERY_PARAM,\n UNSIGNABLE_PATTERNS: () => UNSIGNABLE_PATTERNS,\n UNSIGNED_PAYLOAD: () => UNSIGNED_PAYLOAD,\n clearCredentialCache: () => clearCredentialCache,\n createScope: () => createScope,\n getCanonicalHeaders: () => getCanonicalHeaders,\n getCanonicalQuery: () => getCanonicalQuery,\n getPayloadHash: () => getPayloadHash,\n getSigningKey: () => getSigningKey,\n hasHeader: () => hasHeader,\n moveHeadersToQuery: () => moveHeadersToQuery,\n prepareRequest: () => prepareRequest,\n signatureV4aContainer: () => signatureV4aContainer\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/SignatureV4.ts\n\nvar import_util_utf85 = require(\"@smithy/util-utf8\");\n\n// src/constants.ts\nvar ALGORITHM_QUERY_PARAM = \"X-Amz-Algorithm\";\nvar CREDENTIAL_QUERY_PARAM = \"X-Amz-Credential\";\nvar AMZ_DATE_QUERY_PARAM = \"X-Amz-Date\";\nvar SIGNED_HEADERS_QUERY_PARAM = \"X-Amz-SignedHeaders\";\nvar EXPIRES_QUERY_PARAM = \"X-Amz-Expires\";\nvar SIGNATURE_QUERY_PARAM = \"X-Amz-Signature\";\nvar TOKEN_QUERY_PARAM = \"X-Amz-Security-Token\";\nvar REGION_SET_PARAM = \"X-Amz-Region-Set\";\nvar AUTH_HEADER = \"authorization\";\nvar AMZ_DATE_HEADER = AMZ_DATE_QUERY_PARAM.toLowerCase();\nvar DATE_HEADER = \"date\";\nvar GENERATED_HEADERS = [AUTH_HEADER, AMZ_DATE_HEADER, DATE_HEADER];\nvar SIGNATURE_HEADER = SIGNATURE_QUERY_PARAM.toLowerCase();\nvar SHA256_HEADER = \"x-amz-content-sha256\";\nvar TOKEN_HEADER = TOKEN_QUERY_PARAM.toLowerCase();\nvar HOST_HEADER = \"host\";\nvar ALWAYS_UNSIGNABLE_HEADERS = {\n authorization: true,\n \"cache-control\": true,\n connection: true,\n expect: true,\n from: true,\n \"keep-alive\": true,\n \"max-forwards\": true,\n pragma: true,\n referer: true,\n te: true,\n trailer: true,\n \"transfer-encoding\": true,\n upgrade: true,\n \"user-agent\": true,\n \"x-amzn-trace-id\": true\n};\nvar PROXY_HEADER_PATTERN = /^proxy-/;\nvar SEC_HEADER_PATTERN = /^sec-/;\nvar UNSIGNABLE_PATTERNS = [/^proxy-/i, /^sec-/i];\nvar ALGORITHM_IDENTIFIER = \"AWS4-HMAC-SHA256\";\nvar ALGORITHM_IDENTIFIER_V4A = \"AWS4-ECDSA-P256-SHA256\";\nvar EVENT_ALGORITHM_IDENTIFIER = \"AWS4-HMAC-SHA256-PAYLOAD\";\nvar UNSIGNED_PAYLOAD = \"UNSIGNED-PAYLOAD\";\nvar MAX_CACHE_SIZE = 50;\nvar KEY_TYPE_IDENTIFIER = \"aws4_request\";\nvar MAX_PRESIGNED_TTL = 60 * 60 * 24 * 7;\n\n// src/credentialDerivation.ts\nvar import_util_hex_encoding = require(\"@smithy/util-hex-encoding\");\nvar import_util_utf8 = require(\"@smithy/util-utf8\");\nvar signingKeyCache = {};\nvar cacheQueue = [];\nvar createScope = /* @__PURE__ */ __name((shortDate, region, service) => `${shortDate}/${region}/${service}/${KEY_TYPE_IDENTIFIER}`, \"createScope\");\nvar getSigningKey = /* @__PURE__ */ __name(async (sha256Constructor, credentials, shortDate, region, service) => {\n const credsHash = await hmac(sha256Constructor, credentials.secretAccessKey, credentials.accessKeyId);\n const cacheKey = `${shortDate}:${region}:${service}:${(0, import_util_hex_encoding.toHex)(credsHash)}:${credentials.sessionToken}`;\n if (cacheKey in signingKeyCache) {\n return signingKeyCache[cacheKey];\n }\n cacheQueue.push(cacheKey);\n while (cacheQueue.length > MAX_CACHE_SIZE) {\n delete signingKeyCache[cacheQueue.shift()];\n }\n let key = `AWS4${credentials.secretAccessKey}`;\n for (const signable of [shortDate, region, service, KEY_TYPE_IDENTIFIER]) {\n key = await hmac(sha256Constructor, key, signable);\n }\n return signingKeyCache[cacheKey] = key;\n}, \"getSigningKey\");\nvar clearCredentialCache = /* @__PURE__ */ __name(() => {\n cacheQueue.length = 0;\n Object.keys(signingKeyCache).forEach((cacheKey) => {\n delete signingKeyCache[cacheKey];\n });\n}, \"clearCredentialCache\");\nvar hmac = /* @__PURE__ */ __name((ctor, secret, data) => {\n const hash = new ctor(secret);\n hash.update((0, import_util_utf8.toUint8Array)(data));\n return hash.digest();\n}, \"hmac\");\n\n// src/getCanonicalHeaders.ts\nvar getCanonicalHeaders = /* @__PURE__ */ __name(({ headers }, unsignableHeaders, signableHeaders) => {\n const canonical = {};\n for (const headerName of Object.keys(headers).sort()) {\n if (headers[headerName] == void 0) {\n continue;\n }\n const canonicalHeaderName = headerName.toLowerCase();\n if (canonicalHeaderName in ALWAYS_UNSIGNABLE_HEADERS || unsignableHeaders?.has(canonicalHeaderName) || PROXY_HEADER_PATTERN.test(canonicalHeaderName) || SEC_HEADER_PATTERN.test(canonicalHeaderName)) {\n if (!signableHeaders || signableHeaders && !signableHeaders.has(canonicalHeaderName)) {\n continue;\n }\n }\n canonical[canonicalHeaderName] = headers[headerName].trim().replace(/\\s+/g, \" \");\n }\n return canonical;\n}, \"getCanonicalHeaders\");\n\n// src/getPayloadHash.ts\nvar import_is_array_buffer = require(\"@smithy/is-array-buffer\");\n\nvar import_util_utf82 = require(\"@smithy/util-utf8\");\nvar getPayloadHash = /* @__PURE__ */ __name(async ({ headers, body }, hashConstructor) => {\n for (const headerName of Object.keys(headers)) {\n if (headerName.toLowerCase() === SHA256_HEADER) {\n return headers[headerName];\n }\n }\n if (body == void 0) {\n return \"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\";\n } else if (typeof body === \"string\" || ArrayBuffer.isView(body) || (0, import_is_array_buffer.isArrayBuffer)(body)) {\n const hashCtor = new hashConstructor();\n hashCtor.update((0, import_util_utf82.toUint8Array)(body));\n return (0, import_util_hex_encoding.toHex)(await hashCtor.digest());\n }\n return UNSIGNED_PAYLOAD;\n}, \"getPayloadHash\");\n\n// src/HeaderFormatter.ts\n\nvar import_util_utf83 = require(\"@smithy/util-utf8\");\nvar HeaderFormatter = class {\n static {\n __name(this, \"HeaderFormatter\");\n }\n format(headers) {\n const chunks = [];\n for (const headerName of Object.keys(headers)) {\n const bytes = (0, import_util_utf83.fromUtf8)(headerName);\n chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName]));\n }\n const out = new Uint8Array(chunks.reduce((carry, bytes) => carry + bytes.byteLength, 0));\n let position = 0;\n for (const chunk of chunks) {\n out.set(chunk, position);\n position += chunk.byteLength;\n }\n return out;\n }\n formatHeaderValue(header) {\n switch (header.type) {\n case \"boolean\":\n return Uint8Array.from([header.value ? 0 /* boolTrue */ : 1 /* boolFalse */]);\n case \"byte\":\n return Uint8Array.from([2 /* byte */, header.value]);\n case \"short\":\n const shortView = new DataView(new ArrayBuffer(3));\n shortView.setUint8(0, 3 /* short */);\n shortView.setInt16(1, header.value, false);\n return new Uint8Array(shortView.buffer);\n case \"integer\":\n const intView = new DataView(new ArrayBuffer(5));\n intView.setUint8(0, 4 /* integer */);\n intView.setInt32(1, header.value, false);\n return new Uint8Array(intView.buffer);\n case \"long\":\n const longBytes = new Uint8Array(9);\n longBytes[0] = 5 /* long */;\n longBytes.set(header.value.bytes, 1);\n return longBytes;\n case \"binary\":\n const binView = new DataView(new ArrayBuffer(3 + header.value.byteLength));\n binView.setUint8(0, 6 /* byteArray */);\n binView.setUint16(1, header.value.byteLength, false);\n const binBytes = new Uint8Array(binView.buffer);\n binBytes.set(header.value, 3);\n return binBytes;\n case \"string\":\n const utf8Bytes = (0, import_util_utf83.fromUtf8)(header.value);\n const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength));\n strView.setUint8(0, 7 /* string */);\n strView.setUint16(1, utf8Bytes.byteLength, false);\n const strBytes = new Uint8Array(strView.buffer);\n strBytes.set(utf8Bytes, 3);\n return strBytes;\n case \"timestamp\":\n const tsBytes = new Uint8Array(9);\n tsBytes[0] = 8 /* timestamp */;\n tsBytes.set(Int64.fromNumber(header.value.valueOf()).bytes, 1);\n return tsBytes;\n case \"uuid\":\n if (!UUID_PATTERN.test(header.value)) {\n throw new Error(`Invalid UUID received: ${header.value}`);\n }\n const uuidBytes = new Uint8Array(17);\n uuidBytes[0] = 9 /* uuid */;\n uuidBytes.set((0, import_util_hex_encoding.fromHex)(header.value.replace(/\\-/g, \"\")), 1);\n return uuidBytes;\n }\n }\n};\nvar UUID_PATTERN = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;\nvar Int64 = class _Int64 {\n constructor(bytes) {\n this.bytes = bytes;\n if (bytes.byteLength !== 8) {\n throw new Error(\"Int64 buffers must be exactly 8 bytes\");\n }\n }\n static {\n __name(this, \"Int64\");\n }\n static fromNumber(number) {\n if (number > 9223372036854776e3 || number < -9223372036854776e3) {\n throw new Error(`${number} is too large (or, if negative, too small) to represent as an Int64`);\n }\n const bytes = new Uint8Array(8);\n for (let i = 7, remaining = Math.abs(Math.round(number)); i > -1 && remaining > 0; i--, remaining /= 256) {\n bytes[i] = remaining;\n }\n if (number < 0) {\n negate(bytes);\n }\n return new _Int64(bytes);\n }\n /**\n * Called implicitly by infix arithmetic operators.\n */\n valueOf() {\n const bytes = this.bytes.slice(0);\n const negative = bytes[0] & 128;\n if (negative) {\n negate(bytes);\n }\n return parseInt((0, import_util_hex_encoding.toHex)(bytes), 16) * (negative ? -1 : 1);\n }\n toString() {\n return String(this.valueOf());\n }\n};\nfunction negate(bytes) {\n for (let i = 0; i < 8; i++) {\n bytes[i] ^= 255;\n }\n for (let i = 7; i > -1; i--) {\n bytes[i]++;\n if (bytes[i] !== 0)\n break;\n }\n}\n__name(negate, \"negate\");\n\n// src/headerUtil.ts\nvar hasHeader = /* @__PURE__ */ __name((soughtHeader, headers) => {\n soughtHeader = soughtHeader.toLowerCase();\n for (const headerName of Object.keys(headers)) {\n if (soughtHeader === headerName.toLowerCase()) {\n return true;\n }\n }\n return false;\n}, \"hasHeader\");\n\n// src/moveHeadersToQuery.ts\nvar import_protocol_http = require(\"@smithy/protocol-http\");\nvar moveHeadersToQuery = /* @__PURE__ */ __name((request, options = {}) => {\n const { headers, query = {} } = import_protocol_http.HttpRequest.clone(request);\n for (const name of Object.keys(headers)) {\n const lname = name.toLowerCase();\n if (lname.slice(0, 6) === \"x-amz-\" && !options.unhoistableHeaders?.has(lname) || options.hoistableHeaders?.has(lname)) {\n query[name] = headers[name];\n delete headers[name];\n }\n }\n return {\n ...request,\n headers,\n query\n };\n}, \"moveHeadersToQuery\");\n\n// src/prepareRequest.ts\n\nvar prepareRequest = /* @__PURE__ */ __name((request) => {\n request = import_protocol_http.HttpRequest.clone(request);\n for (const headerName of Object.keys(request.headers)) {\n if (GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) {\n delete request.headers[headerName];\n }\n }\n return request;\n}, \"prepareRequest\");\n\n// src/SignatureV4Base.ts\n\nvar import_util_middleware = require(\"@smithy/util-middleware\");\n\nvar import_util_utf84 = require(\"@smithy/util-utf8\");\n\n// src/getCanonicalQuery.ts\nvar import_util_uri_escape = require(\"@smithy/util-uri-escape\");\nvar getCanonicalQuery = /* @__PURE__ */ __name(({ query = {} }) => {\n const keys = [];\n const serialized = {};\n for (const key of Object.keys(query)) {\n if (key.toLowerCase() === SIGNATURE_HEADER) {\n continue;\n }\n const encodedKey = (0, import_util_uri_escape.escapeUri)(key);\n keys.push(encodedKey);\n const value = query[key];\n if (typeof value === \"string\") {\n serialized[encodedKey] = `${encodedKey}=${(0, import_util_uri_escape.escapeUri)(value)}`;\n } else if (Array.isArray(value)) {\n serialized[encodedKey] = value.slice(0).reduce((encoded, value2) => encoded.concat([`${encodedKey}=${(0, import_util_uri_escape.escapeUri)(value2)}`]), []).sort().join(\"&\");\n }\n }\n return keys.sort().map((key) => serialized[key]).filter((serialized2) => serialized2).join(\"&\");\n}, \"getCanonicalQuery\");\n\n// src/utilDate.ts\nvar iso8601 = /* @__PURE__ */ __name((time) => toDate(time).toISOString().replace(/\\.\\d{3}Z$/, \"Z\"), \"iso8601\");\nvar toDate = /* @__PURE__ */ __name((time) => {\n if (typeof time === \"number\") {\n return new Date(time * 1e3);\n }\n if (typeof time === \"string\") {\n if (Number(time)) {\n return new Date(Number(time) * 1e3);\n }\n return new Date(time);\n }\n return time;\n}, \"toDate\");\n\n// src/SignatureV4Base.ts\nvar SignatureV4Base = class {\n static {\n __name(this, \"SignatureV4Base\");\n }\n constructor({\n applyChecksum,\n credentials,\n region,\n service,\n sha256,\n uriEscapePath = true\n }) {\n this.service = service;\n this.sha256 = sha256;\n this.uriEscapePath = uriEscapePath;\n this.applyChecksum = typeof applyChecksum === \"boolean\" ? applyChecksum : true;\n this.regionProvider = (0, import_util_middleware.normalizeProvider)(region);\n this.credentialProvider = (0, import_util_middleware.normalizeProvider)(credentials);\n }\n createCanonicalRequest(request, canonicalHeaders, payloadHash) {\n const sortedHeaders = Object.keys(canonicalHeaders).sort();\n return `${request.method}\n${this.getCanonicalPath(request)}\n${getCanonicalQuery(request)}\n${sortedHeaders.map((name) => `${name}:${canonicalHeaders[name]}`).join(\"\\n\")}\n\n${sortedHeaders.join(\";\")}\n${payloadHash}`;\n }\n async createStringToSign(longDate, credentialScope, canonicalRequest, algorithmIdentifier) {\n const hash = new this.sha256();\n hash.update((0, import_util_utf84.toUint8Array)(canonicalRequest));\n const hashedRequest = await hash.digest();\n return `${algorithmIdentifier}\n${longDate}\n${credentialScope}\n${(0, import_util_hex_encoding.toHex)(hashedRequest)}`;\n }\n getCanonicalPath({ path }) {\n if (this.uriEscapePath) {\n const normalizedPathSegments = [];\n for (const pathSegment of path.split(\"/\")) {\n if (pathSegment?.length === 0)\n continue;\n if (pathSegment === \".\")\n continue;\n if (pathSegment === \"..\") {\n normalizedPathSegments.pop();\n } else {\n normalizedPathSegments.push(pathSegment);\n }\n }\n const normalizedPath = `${path?.startsWith(\"/\") ? \"/\" : \"\"}${normalizedPathSegments.join(\"/\")}${normalizedPathSegments.length > 0 && path?.endsWith(\"/\") ? \"/\" : \"\"}`;\n const doubleEncoded = (0, import_util_uri_escape.escapeUri)(normalizedPath);\n return doubleEncoded.replace(/%2F/g, \"/\");\n }\n return path;\n }\n validateResolvedCredentials(credentials) {\n if (typeof credentials !== \"object\" || // @ts-expect-error: Property 'accessKeyId' does not exist on type 'object'.ts(2339)\n typeof credentials.accessKeyId !== \"string\" || // @ts-expect-error: Property 'secretAccessKey' does not exist on type 'object'.ts(2339)\n typeof credentials.secretAccessKey !== \"string\") {\n throw new Error(\"Resolved credential object is not valid\");\n }\n }\n formatDate(now) {\n const longDate = iso8601(now).replace(/[\\-:]/g, \"\");\n return {\n longDate,\n shortDate: longDate.slice(0, 8)\n };\n }\n getCanonicalHeaderList(headers) {\n return Object.keys(headers).sort().join(\";\");\n }\n};\n\n// src/SignatureV4.ts\nvar SignatureV4 = class extends SignatureV4Base {\n constructor({\n applyChecksum,\n credentials,\n region,\n service,\n sha256,\n uriEscapePath = true\n }) {\n super({\n applyChecksum,\n credentials,\n region,\n service,\n sha256,\n uriEscapePath\n });\n this.headerFormatter = new HeaderFormatter();\n }\n static {\n __name(this, \"SignatureV4\");\n }\n async presign(originalRequest, options = {}) {\n const {\n signingDate = /* @__PURE__ */ new Date(),\n expiresIn = 3600,\n unsignableHeaders,\n unhoistableHeaders,\n signableHeaders,\n hoistableHeaders,\n signingRegion,\n signingService\n } = options;\n const credentials = await this.credentialProvider();\n this.validateResolvedCredentials(credentials);\n const region = signingRegion ?? await this.regionProvider();\n const { longDate, shortDate } = this.formatDate(signingDate);\n if (expiresIn > MAX_PRESIGNED_TTL) {\n return Promise.reject(\n \"Signature version 4 presigned URLs must have an expiration date less than one week in the future\"\n );\n }\n const scope = createScope(shortDate, region, signingService ?? this.service);\n const request = moveHeadersToQuery(prepareRequest(originalRequest), { unhoistableHeaders, hoistableHeaders });\n if (credentials.sessionToken) {\n request.query[TOKEN_QUERY_PARAM] = credentials.sessionToken;\n }\n request.query[ALGORITHM_QUERY_PARAM] = ALGORITHM_IDENTIFIER;\n request.query[CREDENTIAL_QUERY_PARAM] = `${credentials.accessKeyId}/${scope}`;\n request.query[AMZ_DATE_QUERY_PARAM] = longDate;\n request.query[EXPIRES_QUERY_PARAM] = expiresIn.toString(10);\n const canonicalHeaders = getCanonicalHeaders(request, unsignableHeaders, signableHeaders);\n request.query[SIGNED_HEADERS_QUERY_PARAM] = this.getCanonicalHeaderList(canonicalHeaders);\n request.query[SIGNATURE_QUERY_PARAM] = await this.getSignature(\n longDate,\n scope,\n this.getSigningKey(credentials, region, shortDate, signingService),\n this.createCanonicalRequest(request, canonicalHeaders, await getPayloadHash(originalRequest, this.sha256))\n );\n return request;\n }\n async sign(toSign, options) {\n if (typeof toSign === \"string\") {\n return this.signString(toSign, options);\n } else if (toSign.headers && toSign.payload) {\n return this.signEvent(toSign, options);\n } else if (toSign.message) {\n return this.signMessage(toSign, options);\n } else {\n return this.signRequest(toSign, options);\n }\n }\n async signEvent({ headers, payload }, { signingDate = /* @__PURE__ */ new Date(), priorSignature, signingRegion, signingService }) {\n const region = signingRegion ?? await this.regionProvider();\n const { shortDate, longDate } = this.formatDate(signingDate);\n const scope = createScope(shortDate, region, signingService ?? this.service);\n const hashedPayload = await getPayloadHash({ headers: {}, body: payload }, this.sha256);\n const hash = new this.sha256();\n hash.update(headers);\n const hashedHeaders = (0, import_util_hex_encoding.toHex)(await hash.digest());\n const stringToSign = [\n EVENT_ALGORITHM_IDENTIFIER,\n longDate,\n scope,\n priorSignature,\n hashedHeaders,\n hashedPayload\n ].join(\"\\n\");\n return this.signString(stringToSign, { signingDate, signingRegion: region, signingService });\n }\n async signMessage(signableMessage, { signingDate = /* @__PURE__ */ new Date(), signingRegion, signingService }) {\n const promise = this.signEvent(\n {\n headers: this.headerFormatter.format(signableMessage.message.headers),\n payload: signableMessage.message.body\n },\n {\n signingDate,\n signingRegion,\n signingService,\n priorSignature: signableMessage.priorSignature\n }\n );\n return promise.then((signature) => {\n return { message: signableMessage.message, signature };\n });\n }\n async signString(stringToSign, { signingDate = /* @__PURE__ */ new Date(), signingRegion, signingService } = {}) {\n const credentials = await this.credentialProvider();\n this.validateResolvedCredentials(credentials);\n const region = signingRegion ?? await this.regionProvider();\n const { shortDate } = this.formatDate(signingDate);\n const hash = new this.sha256(await this.getSigningKey(credentials, region, shortDate, signingService));\n hash.update((0, import_util_utf85.toUint8Array)(stringToSign));\n return (0, import_util_hex_encoding.toHex)(await hash.digest());\n }\n async signRequest(requestToSign, {\n signingDate = /* @__PURE__ */ new Date(),\n signableHeaders,\n unsignableHeaders,\n signingRegion,\n signingService\n } = {}) {\n const credentials = await this.credentialProvider();\n this.validateResolvedCredentials(credentials);\n const region = signingRegion ?? await this.regionProvider();\n const request = prepareRequest(requestToSign);\n const { longDate, shortDate } = this.formatDate(signingDate);\n const scope = createScope(shortDate, region, signingService ?? this.service);\n request.headers[AMZ_DATE_HEADER] = longDate;\n if (credentials.sessionToken) {\n request.headers[TOKEN_HEADER] = credentials.sessionToken;\n }\n const payloadHash = await getPayloadHash(request, this.sha256);\n if (!hasHeader(SHA256_HEADER, request.headers) && this.applyChecksum) {\n request.headers[SHA256_HEADER] = payloadHash;\n }\n const canonicalHeaders = getCanonicalHeaders(request, unsignableHeaders, signableHeaders);\n const signature = await this.getSignature(\n longDate,\n scope,\n this.getSigningKey(credentials, region, shortDate, signingService),\n this.createCanonicalRequest(request, canonicalHeaders, payloadHash)\n );\n request.headers[AUTH_HEADER] = `${ALGORITHM_IDENTIFIER} Credential=${credentials.accessKeyId}/${scope}, SignedHeaders=${this.getCanonicalHeaderList(canonicalHeaders)}, Signature=${signature}`;\n return request;\n }\n async getSignature(longDate, credentialScope, keyPromise, canonicalRequest) {\n const stringToSign = await this.createStringToSign(\n longDate,\n credentialScope,\n canonicalRequest,\n ALGORITHM_IDENTIFIER\n );\n const hash = new this.sha256(await keyPromise);\n hash.update((0, import_util_utf85.toUint8Array)(stringToSign));\n return (0, import_util_hex_encoding.toHex)(await hash.digest());\n }\n getSigningKey(credentials, region, shortDate, service) {\n return getSigningKey(this.sha256, credentials, shortDate, region, service || this.service);\n }\n};\n\n// src/signature-v4a-container.ts\nvar signatureV4aContainer = {\n SignatureV4a: null\n};\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n getCanonicalHeaders,\n getCanonicalQuery,\n getPayloadHash,\n moveHeadersToQuery,\n prepareRequest,\n SignatureV4Base,\n hasHeader,\n SignatureV4,\n ALGORITHM_QUERY_PARAM,\n CREDENTIAL_QUERY_PARAM,\n AMZ_DATE_QUERY_PARAM,\n SIGNED_HEADERS_QUERY_PARAM,\n EXPIRES_QUERY_PARAM,\n SIGNATURE_QUERY_PARAM,\n TOKEN_QUERY_PARAM,\n REGION_SET_PARAM,\n AUTH_HEADER,\n AMZ_DATE_HEADER,\n DATE_HEADER,\n GENERATED_HEADERS,\n SIGNATURE_HEADER,\n SHA256_HEADER,\n TOKEN_HEADER,\n HOST_HEADER,\n ALWAYS_UNSIGNABLE_HEADERS,\n PROXY_HEADER_PATTERN,\n SEC_HEADER_PATTERN,\n UNSIGNABLE_PATTERNS,\n ALGORITHM_IDENTIFIER,\n ALGORITHM_IDENTIFIER_V4A,\n EVENT_ALGORITHM_IDENTIFIER,\n UNSIGNED_PAYLOAD,\n MAX_CACHE_SIZE,\n KEY_TYPE_IDENTIFIER,\n MAX_PRESIGNED_TTL,\n createScope,\n getSigningKey,\n clearCredentialCache,\n signatureV4aContainer\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n Client: () => Client,\n Command: () => Command,\n NoOpLogger: () => NoOpLogger,\n SENSITIVE_STRING: () => SENSITIVE_STRING,\n ServiceException: () => ServiceException,\n _json: () => _json,\n collectBody: () => import_protocols.collectBody,\n convertMap: () => convertMap,\n createAggregatedClient: () => createAggregatedClient,\n decorateServiceException: () => decorateServiceException,\n emitWarningIfUnsupportedVersion: () => emitWarningIfUnsupportedVersion,\n extendedEncodeURIComponent: () => import_protocols.extendedEncodeURIComponent,\n getArrayIfSingleItem: () => getArrayIfSingleItem,\n getDefaultClientConfiguration: () => getDefaultClientConfiguration,\n getDefaultExtensionConfiguration: () => getDefaultExtensionConfiguration,\n getValueFromTextNode: () => getValueFromTextNode,\n isSerializableHeaderValue: () => isSerializableHeaderValue,\n loadConfigsForDefaultMode: () => loadConfigsForDefaultMode,\n map: () => map,\n resolveDefaultRuntimeConfig: () => resolveDefaultRuntimeConfig,\n resolvedPath: () => import_protocols.resolvedPath,\n serializeDateTime: () => serializeDateTime,\n serializeFloat: () => serializeFloat,\n take: () => take,\n throwDefaultError: () => throwDefaultError,\n withBaseException: () => withBaseException\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/client.ts\nvar import_middleware_stack = require(\"@smithy/middleware-stack\");\nvar Client = class {\n constructor(config) {\n this.config = config;\n this.middlewareStack = (0, import_middleware_stack.constructStack)();\n }\n static {\n __name(this, \"Client\");\n }\n send(command, optionsOrCb, cb) {\n const options = typeof optionsOrCb !== \"function\" ? optionsOrCb : void 0;\n const callback = typeof optionsOrCb === \"function\" ? optionsOrCb : cb;\n const useHandlerCache = options === void 0 && this.config.cacheMiddleware === true;\n let handler;\n if (useHandlerCache) {\n if (!this.handlers) {\n this.handlers = /* @__PURE__ */ new WeakMap();\n }\n const handlers = this.handlers;\n if (handlers.has(command.constructor)) {\n handler = handlers.get(command.constructor);\n } else {\n handler = command.resolveMiddleware(this.middlewareStack, this.config, options);\n handlers.set(command.constructor, handler);\n }\n } else {\n delete this.handlers;\n handler = command.resolveMiddleware(this.middlewareStack, this.config, options);\n }\n if (callback) {\n handler(command).then(\n (result) => callback(null, result.output),\n (err) => callback(err)\n ).catch(\n // prevent any errors thrown in the callback from triggering an\n // unhandled promise rejection\n () => {\n }\n );\n } else {\n return handler(command).then((result) => result.output);\n }\n }\n destroy() {\n this.config?.requestHandler?.destroy?.();\n delete this.handlers;\n }\n};\n\n// src/collect-stream-body.ts\nvar import_protocols = require(\"@smithy/core/protocols\");\n\n// src/command.ts\n\nvar import_types = require(\"@smithy/types\");\nvar Command = class {\n constructor() {\n this.middlewareStack = (0, import_middleware_stack.constructStack)();\n }\n static {\n __name(this, \"Command\");\n }\n /**\n * Factory for Command ClassBuilder.\n * @internal\n */\n static classBuilder() {\n return new ClassBuilder();\n }\n /**\n * @internal\n */\n resolveMiddlewareWithContext(clientStack, configuration, options, {\n middlewareFn,\n clientName,\n commandName,\n inputFilterSensitiveLog,\n outputFilterSensitiveLog,\n smithyContext,\n additionalContext,\n CommandCtor\n }) {\n for (const mw of middlewareFn.bind(this)(CommandCtor, clientStack, configuration, options)) {\n this.middlewareStack.use(mw);\n }\n const stack = clientStack.concat(this.middlewareStack);\n const { logger } = configuration;\n const handlerExecutionContext = {\n logger,\n clientName,\n commandName,\n inputFilterSensitiveLog,\n outputFilterSensitiveLog,\n [import_types.SMITHY_CONTEXT_KEY]: {\n commandInstance: this,\n ...smithyContext\n },\n ...additionalContext\n };\n const { requestHandler } = configuration;\n return stack.resolve(\n (request) => requestHandler.handle(request.request, options || {}),\n handlerExecutionContext\n );\n }\n};\nvar ClassBuilder = class {\n constructor() {\n this._init = () => {\n };\n this._ep = {};\n this._middlewareFn = () => [];\n this._commandName = \"\";\n this._clientName = \"\";\n this._additionalContext = {};\n this._smithyContext = {};\n this._inputFilterSensitiveLog = (_) => _;\n this._outputFilterSensitiveLog = (_) => _;\n this._serializer = null;\n this._deserializer = null;\n }\n static {\n __name(this, \"ClassBuilder\");\n }\n /**\n * Optional init callback.\n */\n init(cb) {\n this._init = cb;\n }\n /**\n * Set the endpoint parameter instructions.\n */\n ep(endpointParameterInstructions) {\n this._ep = endpointParameterInstructions;\n return this;\n }\n /**\n * Add any number of middleware.\n */\n m(middlewareSupplier) {\n this._middlewareFn = middlewareSupplier;\n return this;\n }\n /**\n * Set the initial handler execution context Smithy field.\n */\n s(service, operation, smithyContext = {}) {\n this._smithyContext = {\n service,\n operation,\n ...smithyContext\n };\n return this;\n }\n /**\n * Set the initial handler execution context.\n */\n c(additionalContext = {}) {\n this._additionalContext = additionalContext;\n return this;\n }\n /**\n * Set constant string identifiers for the operation.\n */\n n(clientName, commandName) {\n this._clientName = clientName;\n this._commandName = commandName;\n return this;\n }\n /**\n * Set the input and output sensistive log filters.\n */\n f(inputFilter = (_) => _, outputFilter = (_) => _) {\n this._inputFilterSensitiveLog = inputFilter;\n this._outputFilterSensitiveLog = outputFilter;\n return this;\n }\n /**\n * Sets the serializer.\n */\n ser(serializer) {\n this._serializer = serializer;\n return this;\n }\n /**\n * Sets the deserializer.\n */\n de(deserializer) {\n this._deserializer = deserializer;\n return this;\n }\n /**\n * Sets input/output schema for the operation.\n */\n sc(operation) {\n this._operationSchema = operation;\n this._smithyContext.operationSchema = operation;\n return this;\n }\n /**\n * @returns a Command class with the classBuilder properties.\n */\n build() {\n const closure = this;\n let CommandRef;\n return CommandRef = class extends Command {\n /**\n * @public\n */\n constructor(...[input]) {\n super();\n /**\n * @internal\n */\n // @ts-ignore used in middlewareFn closure.\n this.serialize = closure._serializer;\n /**\n * @internal\n */\n // @ts-ignore used in middlewareFn closure.\n this.deserialize = closure._deserializer;\n this.input = input ?? {};\n closure._init(this);\n this.schema = closure._operationSchema;\n }\n static {\n __name(this, \"CommandRef\");\n }\n /**\n * @public\n */\n static getEndpointParameterInstructions() {\n return closure._ep;\n }\n /**\n * @internal\n */\n resolveMiddleware(stack, configuration, options) {\n return this.resolveMiddlewareWithContext(stack, configuration, options, {\n CommandCtor: CommandRef,\n middlewareFn: closure._middlewareFn,\n clientName: closure._clientName,\n commandName: closure._commandName,\n inputFilterSensitiveLog: closure._inputFilterSensitiveLog,\n outputFilterSensitiveLog: closure._outputFilterSensitiveLog,\n smithyContext: closure._smithyContext,\n additionalContext: closure._additionalContext\n });\n }\n };\n }\n};\n\n// src/constants.ts\nvar SENSITIVE_STRING = \"***SensitiveInformation***\";\n\n// src/create-aggregated-client.ts\nvar createAggregatedClient = /* @__PURE__ */ __name((commands, Client2) => {\n for (const command of Object.keys(commands)) {\n const CommandCtor = commands[command];\n const methodImpl = /* @__PURE__ */ __name(async function(args, optionsOrCb, cb) {\n const command2 = new CommandCtor(args);\n if (typeof optionsOrCb === \"function\") {\n this.send(command2, optionsOrCb);\n } else if (typeof cb === \"function\") {\n if (typeof optionsOrCb !== \"object\")\n throw new Error(`Expected http options but got ${typeof optionsOrCb}`);\n this.send(command2, optionsOrCb || {}, cb);\n } else {\n return this.send(command2, optionsOrCb);\n }\n }, \"methodImpl\");\n const methodName = (command[0].toLowerCase() + command.slice(1)).replace(/Command$/, \"\");\n Client2.prototype[methodName] = methodImpl;\n }\n}, \"createAggregatedClient\");\n\n// src/exceptions.ts\nvar ServiceException = class _ServiceException extends Error {\n static {\n __name(this, \"ServiceException\");\n }\n constructor(options) {\n super(options.message);\n Object.setPrototypeOf(this, Object.getPrototypeOf(this).constructor.prototype);\n this.name = options.name;\n this.$fault = options.$fault;\n this.$metadata = options.$metadata;\n }\n /**\n * Checks if a value is an instance of ServiceException (duck typed)\n */\n static isInstance(value) {\n if (!value)\n return false;\n const candidate = value;\n return _ServiceException.prototype.isPrototypeOf(candidate) || Boolean(candidate.$fault) && Boolean(candidate.$metadata) && (candidate.$fault === \"client\" || candidate.$fault === \"server\");\n }\n /**\n * Custom instanceof check to support the operator for ServiceException base class\n */\n static [Symbol.hasInstance](instance) {\n if (!instance)\n return false;\n const candidate = instance;\n if (this === _ServiceException) {\n return _ServiceException.isInstance(instance);\n }\n if (_ServiceException.isInstance(instance)) {\n if (candidate.name && this.name) {\n return this.prototype.isPrototypeOf(instance) || candidate.name === this.name;\n }\n return this.prototype.isPrototypeOf(instance);\n }\n return false;\n }\n};\nvar decorateServiceException = /* @__PURE__ */ __name((exception, additions = {}) => {\n Object.entries(additions).filter(([, v]) => v !== void 0).forEach(([k, v]) => {\n if (exception[k] == void 0 || exception[k] === \"\") {\n exception[k] = v;\n }\n });\n const message = exception.message || exception.Message || \"UnknownError\";\n exception.message = message;\n delete exception.Message;\n return exception;\n}, \"decorateServiceException\");\n\n// src/default-error-handler.ts\nvar throwDefaultError = /* @__PURE__ */ __name(({ output, parsedBody, exceptionCtor, errorCode }) => {\n const $metadata = deserializeMetadata(output);\n const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + \"\" : void 0;\n const response = new exceptionCtor({\n name: parsedBody?.code || parsedBody?.Code || errorCode || statusCode || \"UnknownError\",\n $fault: \"client\",\n $metadata\n });\n throw decorateServiceException(response, parsedBody);\n}, \"throwDefaultError\");\nvar withBaseException = /* @__PURE__ */ __name((ExceptionCtor) => {\n return ({ output, parsedBody, errorCode }) => {\n throwDefaultError({ output, parsedBody, exceptionCtor: ExceptionCtor, errorCode });\n };\n}, \"withBaseException\");\nvar deserializeMetadata = /* @__PURE__ */ __name((output) => ({\n httpStatusCode: output.statusCode,\n requestId: output.headers[\"x-amzn-requestid\"] ?? output.headers[\"x-amzn-request-id\"] ?? output.headers[\"x-amz-request-id\"],\n extendedRequestId: output.headers[\"x-amz-id-2\"],\n cfId: output.headers[\"x-amz-cf-id\"]\n}), \"deserializeMetadata\");\n\n// src/defaults-mode.ts\nvar loadConfigsForDefaultMode = /* @__PURE__ */ __name((mode) => {\n switch (mode) {\n case \"standard\":\n return {\n retryMode: \"standard\",\n connectionTimeout: 3100\n };\n case \"in-region\":\n return {\n retryMode: \"standard\",\n connectionTimeout: 1100\n };\n case \"cross-region\":\n return {\n retryMode: \"standard\",\n connectionTimeout: 3100\n };\n case \"mobile\":\n return {\n retryMode: \"standard\",\n connectionTimeout: 3e4\n };\n default:\n return {};\n }\n}, \"loadConfigsForDefaultMode\");\n\n// src/emitWarningIfUnsupportedVersion.ts\nvar warningEmitted = false;\nvar emitWarningIfUnsupportedVersion = /* @__PURE__ */ __name((version) => {\n if (version && !warningEmitted && parseInt(version.substring(1, version.indexOf(\".\"))) < 16) {\n warningEmitted = true;\n }\n}, \"emitWarningIfUnsupportedVersion\");\n\n// src/extended-encode-uri-component.ts\n\n\n// src/extensions/checksum.ts\n\nvar getChecksumConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {\n const checksumAlgorithms = [];\n for (const id in import_types.AlgorithmId) {\n const algorithmId = import_types.AlgorithmId[id];\n if (runtimeConfig[algorithmId] === void 0) {\n continue;\n }\n checksumAlgorithms.push({\n algorithmId: () => algorithmId,\n checksumConstructor: () => runtimeConfig[algorithmId]\n });\n }\n return {\n addChecksumAlgorithm(algo) {\n checksumAlgorithms.push(algo);\n },\n checksumAlgorithms() {\n return checksumAlgorithms;\n }\n };\n}, \"getChecksumConfiguration\");\nvar resolveChecksumRuntimeConfig = /* @__PURE__ */ __name((clientConfig) => {\n const runtimeConfig = {};\n clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => {\n runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor();\n });\n return runtimeConfig;\n}, \"resolveChecksumRuntimeConfig\");\n\n// src/extensions/retry.ts\nvar getRetryConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {\n return {\n setRetryStrategy(retryStrategy) {\n runtimeConfig.retryStrategy = retryStrategy;\n },\n retryStrategy() {\n return runtimeConfig.retryStrategy;\n }\n };\n}, \"getRetryConfiguration\");\nvar resolveRetryRuntimeConfig = /* @__PURE__ */ __name((retryStrategyConfiguration) => {\n const runtimeConfig = {};\n runtimeConfig.retryStrategy = retryStrategyConfiguration.retryStrategy();\n return runtimeConfig;\n}, \"resolveRetryRuntimeConfig\");\n\n// src/extensions/defaultExtensionConfiguration.ts\nvar getDefaultExtensionConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {\n return Object.assign(getChecksumConfiguration(runtimeConfig), getRetryConfiguration(runtimeConfig));\n}, \"getDefaultExtensionConfiguration\");\nvar getDefaultClientConfiguration = getDefaultExtensionConfiguration;\nvar resolveDefaultRuntimeConfig = /* @__PURE__ */ __name((config) => {\n return Object.assign(resolveChecksumRuntimeConfig(config), resolveRetryRuntimeConfig(config));\n}, \"resolveDefaultRuntimeConfig\");\n\n// src/get-array-if-single-item.ts\nvar getArrayIfSingleItem = /* @__PURE__ */ __name((mayBeArray) => Array.isArray(mayBeArray) ? mayBeArray : [mayBeArray], \"getArrayIfSingleItem\");\n\n// src/get-value-from-text-node.ts\nvar getValueFromTextNode = /* @__PURE__ */ __name((obj) => {\n const textNodeName = \"#text\";\n for (const key in obj) {\n if (obj.hasOwnProperty(key) && obj[key][textNodeName] !== void 0) {\n obj[key] = obj[key][textNodeName];\n } else if (typeof obj[key] === \"object\" && obj[key] !== null) {\n obj[key] = getValueFromTextNode(obj[key]);\n }\n }\n return obj;\n}, \"getValueFromTextNode\");\n\n// src/is-serializable-header-value.ts\nvar isSerializableHeaderValue = /* @__PURE__ */ __name((value) => {\n return value != null;\n}, \"isSerializableHeaderValue\");\n\n// src/NoOpLogger.ts\nvar NoOpLogger = class {\n static {\n __name(this, \"NoOpLogger\");\n }\n trace() {\n }\n debug() {\n }\n info() {\n }\n warn() {\n }\n error() {\n }\n};\n\n// src/object-mapping.ts\nfunction map(arg0, arg1, arg2) {\n let target;\n let filter;\n let instructions;\n if (typeof arg1 === \"undefined\" && typeof arg2 === \"undefined\") {\n target = {};\n instructions = arg0;\n } else {\n target = arg0;\n if (typeof arg1 === \"function\") {\n filter = arg1;\n instructions = arg2;\n return mapWithFilter(target, filter, instructions);\n } else {\n instructions = arg1;\n }\n }\n for (const key of Object.keys(instructions)) {\n if (!Array.isArray(instructions[key])) {\n target[key] = instructions[key];\n continue;\n }\n applyInstruction(target, null, instructions, key);\n }\n return target;\n}\n__name(map, \"map\");\nvar convertMap = /* @__PURE__ */ __name((target) => {\n const output = {};\n for (const [k, v] of Object.entries(target || {})) {\n output[k] = [, v];\n }\n return output;\n}, \"convertMap\");\nvar take = /* @__PURE__ */ __name((source, instructions) => {\n const out = {};\n for (const key in instructions) {\n applyInstruction(out, source, instructions, key);\n }\n return out;\n}, \"take\");\nvar mapWithFilter = /* @__PURE__ */ __name((target, filter, instructions) => {\n return map(\n target,\n Object.entries(instructions).reduce(\n (_instructions, [key, value]) => {\n if (Array.isArray(value)) {\n _instructions[key] = value;\n } else {\n if (typeof value === \"function\") {\n _instructions[key] = [filter, value()];\n } else {\n _instructions[key] = [filter, value];\n }\n }\n return _instructions;\n },\n {}\n )\n );\n}, \"mapWithFilter\");\nvar applyInstruction = /* @__PURE__ */ __name((target, source, instructions, targetKey) => {\n if (source !== null) {\n let instruction = instructions[targetKey];\n if (typeof instruction === \"function\") {\n instruction = [, instruction];\n }\n const [filter2 = nonNullish, valueFn = pass, sourceKey = targetKey] = instruction;\n if (typeof filter2 === \"function\" && filter2(source[sourceKey]) || typeof filter2 !== \"function\" && !!filter2) {\n target[targetKey] = valueFn(source[sourceKey]);\n }\n return;\n }\n let [filter, value] = instructions[targetKey];\n if (typeof value === \"function\") {\n let _value;\n const defaultFilterPassed = filter === void 0 && (_value = value()) != null;\n const customFilterPassed = typeof filter === \"function\" && !!filter(void 0) || typeof filter !== \"function\" && !!filter;\n if (defaultFilterPassed) {\n target[targetKey] = _value;\n } else if (customFilterPassed) {\n target[targetKey] = value();\n }\n } else {\n const defaultFilterPassed = filter === void 0 && value != null;\n const customFilterPassed = typeof filter === \"function\" && !!filter(value) || typeof filter !== \"function\" && !!filter;\n if (defaultFilterPassed || customFilterPassed) {\n target[targetKey] = value;\n }\n }\n}, \"applyInstruction\");\nvar nonNullish = /* @__PURE__ */ __name((_) => _ != null, \"nonNullish\");\nvar pass = /* @__PURE__ */ __name((_) => _, \"pass\");\n\n// src/resolve-path.ts\n\n\n// src/ser-utils.ts\nvar serializeFloat = /* @__PURE__ */ __name((value) => {\n if (value !== value) {\n return \"NaN\";\n }\n switch (value) {\n case Infinity:\n return \"Infinity\";\n case -Infinity:\n return \"-Infinity\";\n default:\n return value;\n }\n}, \"serializeFloat\");\nvar serializeDateTime = /* @__PURE__ */ __name((date) => date.toISOString().replace(\".000Z\", \"Z\"), \"serializeDateTime\");\n\n// src/serde-json.ts\nvar _json = /* @__PURE__ */ __name((obj) => {\n if (obj == null) {\n return {};\n }\n if (Array.isArray(obj)) {\n return obj.filter((_) => _ != null).map(_json);\n }\n if (typeof obj === \"object\") {\n const target = {};\n for (const key of Object.keys(obj)) {\n if (obj[key] == null) {\n continue;\n }\n target[key] = _json(obj[key]);\n }\n return target;\n }\n return obj;\n}, \"_json\");\n\n// src/index.ts\n__reExport(src_exports, require(\"@smithy/core/serde\"), module.exports);\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n Client,\n collectBody,\n Command,\n SENSITIVE_STRING,\n createAggregatedClient,\n throwDefaultError,\n withBaseException,\n loadConfigsForDefaultMode,\n emitWarningIfUnsupportedVersion,\n ServiceException,\n decorateServiceException,\n extendedEncodeURIComponent,\n getDefaultExtensionConfiguration,\n getDefaultClientConfiguration,\n resolveDefaultRuntimeConfig,\n getArrayIfSingleItem,\n getValueFromTextNode,\n isSerializableHeaderValue,\n NoOpLogger,\n convertMap,\n take,\n map,\n resolvedPath,\n serializeFloat,\n serializeDateTime,\n _json,\n LazyJsonString,\n NumericValue,\n copyDocumentWithTransform,\n dateToUtcString,\n expectBoolean,\n expectByte,\n expectFloat32,\n expectInt,\n expectInt32,\n expectLong,\n expectNonNull,\n expectNumber,\n expectObject,\n expectShort,\n expectString,\n expectUnion,\n handleFloat,\n limitedParseDouble,\n limitedParseFloat,\n limitedParseFloat32,\n logger,\n nv,\n parseBoolean,\n parseEpochTimestamp,\n parseRfc3339DateTime,\n parseRfc3339DateTimeWithOffset,\n parseRfc7231DateTime,\n quoteHeader,\n splitEvery,\n splitHeader,\n strictParseByte,\n strictParseDouble,\n strictParseFloat,\n strictParseFloat32,\n strictParseInt,\n strictParseInt32,\n strictParseLong,\n strictParseShort\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n AlgorithmId: () => AlgorithmId,\n EndpointURLScheme: () => EndpointURLScheme,\n FieldPosition: () => FieldPosition,\n HttpApiKeyAuthLocation: () => HttpApiKeyAuthLocation,\n HttpAuthLocation: () => HttpAuthLocation,\n IniSectionType: () => IniSectionType,\n RequestHandlerProtocol: () => RequestHandlerProtocol,\n SMITHY_CONTEXT_KEY: () => SMITHY_CONTEXT_KEY,\n getDefaultClientConfiguration: () => getDefaultClientConfiguration,\n resolveDefaultRuntimeConfig: () => resolveDefaultRuntimeConfig\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/auth/auth.ts\nvar HttpAuthLocation = /* @__PURE__ */ ((HttpAuthLocation2) => {\n HttpAuthLocation2[\"HEADER\"] = \"header\";\n HttpAuthLocation2[\"QUERY\"] = \"query\";\n return HttpAuthLocation2;\n})(HttpAuthLocation || {});\n\n// src/auth/HttpApiKeyAuth.ts\nvar HttpApiKeyAuthLocation = /* @__PURE__ */ ((HttpApiKeyAuthLocation2) => {\n HttpApiKeyAuthLocation2[\"HEADER\"] = \"header\";\n HttpApiKeyAuthLocation2[\"QUERY\"] = \"query\";\n return HttpApiKeyAuthLocation2;\n})(HttpApiKeyAuthLocation || {});\n\n// src/endpoint.ts\nvar EndpointURLScheme = /* @__PURE__ */ ((EndpointURLScheme2) => {\n EndpointURLScheme2[\"HTTP\"] = \"http\";\n EndpointURLScheme2[\"HTTPS\"] = \"https\";\n return EndpointURLScheme2;\n})(EndpointURLScheme || {});\n\n// src/extensions/checksum.ts\nvar AlgorithmId = /* @__PURE__ */ ((AlgorithmId2) => {\n AlgorithmId2[\"MD5\"] = \"md5\";\n AlgorithmId2[\"CRC32\"] = \"crc32\";\n AlgorithmId2[\"CRC32C\"] = \"crc32c\";\n AlgorithmId2[\"SHA1\"] = \"sha1\";\n AlgorithmId2[\"SHA256\"] = \"sha256\";\n return AlgorithmId2;\n})(AlgorithmId || {});\nvar getChecksumConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {\n const checksumAlgorithms = [];\n if (runtimeConfig.sha256 !== void 0) {\n checksumAlgorithms.push({\n algorithmId: () => \"sha256\" /* SHA256 */,\n checksumConstructor: () => runtimeConfig.sha256\n });\n }\n if (runtimeConfig.md5 != void 0) {\n checksumAlgorithms.push({\n algorithmId: () => \"md5\" /* MD5 */,\n checksumConstructor: () => runtimeConfig.md5\n });\n }\n return {\n addChecksumAlgorithm(algo) {\n checksumAlgorithms.push(algo);\n },\n checksumAlgorithms() {\n return checksumAlgorithms;\n }\n };\n}, \"getChecksumConfiguration\");\nvar resolveChecksumRuntimeConfig = /* @__PURE__ */ __name((clientConfig) => {\n const runtimeConfig = {};\n clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => {\n runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor();\n });\n return runtimeConfig;\n}, \"resolveChecksumRuntimeConfig\");\n\n// src/extensions/defaultClientConfiguration.ts\nvar getDefaultClientConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {\n return getChecksumConfiguration(runtimeConfig);\n}, \"getDefaultClientConfiguration\");\nvar resolveDefaultRuntimeConfig = /* @__PURE__ */ __name((config) => {\n return resolveChecksumRuntimeConfig(config);\n}, \"resolveDefaultRuntimeConfig\");\n\n// src/http.ts\nvar FieldPosition = /* @__PURE__ */ ((FieldPosition2) => {\n FieldPosition2[FieldPosition2[\"HEADER\"] = 0] = \"HEADER\";\n FieldPosition2[FieldPosition2[\"TRAILER\"] = 1] = \"TRAILER\";\n return FieldPosition2;\n})(FieldPosition || {});\n\n// src/middleware.ts\nvar SMITHY_CONTEXT_KEY = \"__smithy_context\";\n\n// src/profile.ts\nvar IniSectionType = /* @__PURE__ */ ((IniSectionType2) => {\n IniSectionType2[\"PROFILE\"] = \"profile\";\n IniSectionType2[\"SSO_SESSION\"] = \"sso-session\";\n IniSectionType2[\"SERVICES\"] = \"services\";\n return IniSectionType2;\n})(IniSectionType || {});\n\n// src/transfer.ts\nvar RequestHandlerProtocol = /* @__PURE__ */ ((RequestHandlerProtocol2) => {\n RequestHandlerProtocol2[\"HTTP_0_9\"] = \"http/0.9\";\n RequestHandlerProtocol2[\"HTTP_1_0\"] = \"http/1.0\";\n RequestHandlerProtocol2[\"TDS_8_0\"] = \"tds/8.0\";\n return RequestHandlerProtocol2;\n})(RequestHandlerProtocol || {});\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n HttpAuthLocation,\n HttpApiKeyAuthLocation,\n EndpointURLScheme,\n AlgorithmId,\n getDefaultClientConfiguration,\n resolveDefaultRuntimeConfig,\n FieldPosition,\n SMITHY_CONTEXT_KEY,\n IniSectionType,\n RequestHandlerProtocol\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n parseUrl: () => parseUrl\n});\nmodule.exports = __toCommonJS(src_exports);\nvar import_querystring_parser = require(\"@smithy/querystring-parser\");\nvar parseUrl = /* @__PURE__ */ __name((url) => {\n if (typeof url === \"string\") {\n return parseUrl(new URL(url));\n }\n const { hostname, pathname, port, protocol, search } = url;\n let query;\n if (search) {\n query = (0, import_querystring_parser.parseQueryString)(search);\n }\n return {\n hostname,\n port: port ? parseInt(port) : void 0,\n protocol,\n path: pathname,\n query\n };\n}, \"parseUrl\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n parseUrl\n});\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.fromBase64 = void 0;\nconst util_buffer_from_1 = require(\"@smithy/util-buffer-from\");\nconst BASE64_REGEX = /^[A-Za-z0-9+/]*={0,2}$/;\nconst fromBase64 = (input) => {\n if ((input.length * 3) % 4 !== 0) {\n throw new TypeError(`Incorrect padding on base64 string.`);\n }\n if (!BASE64_REGEX.exec(input)) {\n throw new TypeError(`Invalid base64 string.`);\n }\n const buffer = (0, util_buffer_from_1.fromString)(input, \"base64\");\n return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength);\n};\nexports.fromBase64 = fromBase64;\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\nmodule.exports = __toCommonJS(src_exports);\n__reExport(src_exports, require(\"././fromBase64\"), module.exports);\n__reExport(src_exports, require(\"././toBase64\"), module.exports);\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n fromBase64,\n toBase64\n});\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.toBase64 = void 0;\nconst util_buffer_from_1 = require(\"@smithy/util-buffer-from\");\nconst util_utf8_1 = require(\"@smithy/util-utf8\");\nconst toBase64 = (_input) => {\n let input;\n if (typeof _input === \"string\") {\n input = (0, util_utf8_1.fromUtf8)(_input);\n }\n else {\n input = _input;\n }\n if (typeof input !== \"object\" || typeof input.byteOffset !== \"number\" || typeof input.byteLength !== \"number\") {\n throw new Error(\"@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array.\");\n }\n return (0, util_buffer_from_1.fromArrayBuffer)(input.buffer, input.byteOffset, input.byteLength).toString(\"base64\");\n};\nexports.toBase64 = toBase64;\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n calculateBodyLength: () => calculateBodyLength\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/calculateBodyLength.ts\nvar TEXT_ENCODER = typeof TextEncoder == \"function\" ? new TextEncoder() : null;\nvar calculateBodyLength = /* @__PURE__ */ __name((body) => {\n if (typeof body === \"string\") {\n if (TEXT_ENCODER) {\n return TEXT_ENCODER.encode(body).byteLength;\n }\n let len = body.length;\n for (let i = len - 1; i >= 0; i--) {\n const code = body.charCodeAt(i);\n if (code > 127 && code <= 2047)\n len++;\n else if (code > 2047 && code <= 65535)\n len += 2;\n if (code >= 56320 && code <= 57343)\n i--;\n }\n return len;\n } else if (typeof body.byteLength === \"number\") {\n return body.byteLength;\n } else if (typeof body.size === \"number\") {\n return body.size;\n }\n throw new Error(`Body Length computation failed for ${body}`);\n}, \"calculateBodyLength\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n calculateBodyLength\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n calculateBodyLength: () => calculateBodyLength\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/calculateBodyLength.ts\nvar import_fs = require(\"fs\");\nvar calculateBodyLength = /* @__PURE__ */ __name((body) => {\n if (!body) {\n return 0;\n }\n if (typeof body === \"string\") {\n return Buffer.byteLength(body);\n } else if (typeof body.byteLength === \"number\") {\n return body.byteLength;\n } else if (typeof body.size === \"number\") {\n return body.size;\n } else if (typeof body.start === \"number\" && typeof body.end === \"number\") {\n return body.end + 1 - body.start;\n } else if (typeof body.path === \"string\" || Buffer.isBuffer(body.path)) {\n return (0, import_fs.lstatSync)(body.path).size;\n } else if (typeof body.fd === \"number\") {\n return (0, import_fs.fstatSync)(body.fd).size;\n }\n throw new Error(`Body Length computation failed for ${body}`);\n}, \"calculateBodyLength\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n calculateBodyLength\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n fromArrayBuffer: () => fromArrayBuffer,\n fromString: () => fromString\n});\nmodule.exports = __toCommonJS(src_exports);\nvar import_is_array_buffer = require(\"@smithy/is-array-buffer\");\nvar import_buffer = require(\"buffer\");\nvar fromArrayBuffer = /* @__PURE__ */ __name((input, offset = 0, length = input.byteLength - offset) => {\n if (!(0, import_is_array_buffer.isArrayBuffer)(input)) {\n throw new TypeError(`The \"input\" argument must be ArrayBuffer. Received type ${typeof input} (${input})`);\n }\n return import_buffer.Buffer.from(input, offset, length);\n}, \"fromArrayBuffer\");\nvar fromString = /* @__PURE__ */ __name((input, encoding) => {\n if (typeof input !== \"string\") {\n throw new TypeError(`The \"input\" argument must be of type string. Received type ${typeof input} (${input})`);\n }\n return encoding ? import_buffer.Buffer.from(input, encoding) : import_buffer.Buffer.from(input);\n}, \"fromString\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n fromArrayBuffer,\n fromString\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n SelectorType: () => SelectorType,\n booleanSelector: () => booleanSelector,\n numberSelector: () => numberSelector\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/booleanSelector.ts\nvar booleanSelector = /* @__PURE__ */ __name((obj, key, type) => {\n if (!(key in obj))\n return void 0;\n if (obj[key] === \"true\")\n return true;\n if (obj[key] === \"false\")\n return false;\n throw new Error(`Cannot load ${type} \"${key}\". Expected \"true\" or \"false\", got ${obj[key]}.`);\n}, \"booleanSelector\");\n\n// src/numberSelector.ts\nvar numberSelector = /* @__PURE__ */ __name((obj, key, type) => {\n if (!(key in obj))\n return void 0;\n const numberValue = parseInt(obj[key], 10);\n if (Number.isNaN(numberValue)) {\n throw new TypeError(`Cannot load ${type} '${key}'. Expected number, got '${obj[key]}'.`);\n }\n return numberValue;\n}, \"numberSelector\");\n\n// src/types.ts\nvar SelectorType = /* @__PURE__ */ ((SelectorType2) => {\n SelectorType2[\"ENV\"] = \"env\";\n SelectorType2[\"CONFIG\"] = \"shared config entry\";\n return SelectorType2;\n})(SelectorType || {});\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n booleanSelector,\n numberSelector,\n SelectorType\n});\n\n","var __create = Object.create;\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __getProtoOf = Object.getPrototypeOf;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(\n // If the importer is in node compatibility mode or this is not an ESM\n // file that has been converted to a CommonJS file using a Babel-\n // compatible transform (i.e. \"__esModule\" has not been set), then set\n // \"default\" to the CommonJS \"module.exports\" for node compatibility.\n isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target,\n mod\n));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n resolveDefaultsModeConfig: () => resolveDefaultsModeConfig\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/resolveDefaultsModeConfig.ts\nvar import_config_resolver = require(\"@smithy/config-resolver\");\nvar import_node_config_provider = require(\"@smithy/node-config-provider\");\nvar import_property_provider = require(\"@smithy/property-provider\");\n\n// src/constants.ts\nvar AWS_EXECUTION_ENV = \"AWS_EXECUTION_ENV\";\nvar AWS_REGION_ENV = \"AWS_REGION\";\nvar AWS_DEFAULT_REGION_ENV = \"AWS_DEFAULT_REGION\";\nvar ENV_IMDS_DISABLED = \"AWS_EC2_METADATA_DISABLED\";\nvar DEFAULTS_MODE_OPTIONS = [\"in-region\", \"cross-region\", \"mobile\", \"standard\", \"legacy\"];\nvar IMDS_REGION_PATH = \"/latest/meta-data/placement/region\";\n\n// src/defaultsModeConfig.ts\nvar AWS_DEFAULTS_MODE_ENV = \"AWS_DEFAULTS_MODE\";\nvar AWS_DEFAULTS_MODE_CONFIG = \"defaults_mode\";\nvar NODE_DEFAULTS_MODE_CONFIG_OPTIONS = {\n environmentVariableSelector: (env) => {\n return env[AWS_DEFAULTS_MODE_ENV];\n },\n configFileSelector: (profile) => {\n return profile[AWS_DEFAULTS_MODE_CONFIG];\n },\n default: \"legacy\"\n};\n\n// src/resolveDefaultsModeConfig.ts\nvar resolveDefaultsModeConfig = /* @__PURE__ */ __name(({\n region = (0, import_node_config_provider.loadConfig)(import_config_resolver.NODE_REGION_CONFIG_OPTIONS),\n defaultsMode = (0, import_node_config_provider.loadConfig)(NODE_DEFAULTS_MODE_CONFIG_OPTIONS)\n} = {}) => (0, import_property_provider.memoize)(async () => {\n const mode = typeof defaultsMode === \"function\" ? await defaultsMode() : defaultsMode;\n switch (mode?.toLowerCase()) {\n case \"auto\":\n return resolveNodeDefaultsModeAuto(region);\n case \"in-region\":\n case \"cross-region\":\n case \"mobile\":\n case \"standard\":\n case \"legacy\":\n return Promise.resolve(mode?.toLocaleLowerCase());\n case void 0:\n return Promise.resolve(\"legacy\");\n default:\n throw new Error(\n `Invalid parameter for \"defaultsMode\", expect ${DEFAULTS_MODE_OPTIONS.join(\", \")}, got ${mode}`\n );\n }\n}), \"resolveDefaultsModeConfig\");\nvar resolveNodeDefaultsModeAuto = /* @__PURE__ */ __name(async (clientRegion) => {\n if (clientRegion) {\n const resolvedRegion = typeof clientRegion === \"function\" ? await clientRegion() : clientRegion;\n const inferredRegion = await inferPhysicalRegion();\n if (!inferredRegion) {\n return \"standard\";\n }\n if (resolvedRegion === inferredRegion) {\n return \"in-region\";\n } else {\n return \"cross-region\";\n }\n }\n return \"standard\";\n}, \"resolveNodeDefaultsModeAuto\");\nvar inferPhysicalRegion = /* @__PURE__ */ __name(async () => {\n if (process.env[AWS_EXECUTION_ENV] && (process.env[AWS_REGION_ENV] || process.env[AWS_DEFAULT_REGION_ENV])) {\n return process.env[AWS_REGION_ENV] ?? process.env[AWS_DEFAULT_REGION_ENV];\n }\n if (!process.env[ENV_IMDS_DISABLED]) {\n try {\n const { getInstanceMetadataEndpoint, httpRequest } = await Promise.resolve().then(() => __toESM(require(\"@smithy/credential-provider-imds\")));\n const endpoint = await getInstanceMetadataEndpoint();\n return (await httpRequest({ ...endpoint, path: IMDS_REGION_PATH })).toString();\n } catch (e) {\n }\n }\n}, \"inferPhysicalRegion\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n resolveDefaultsModeConfig\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n EndpointCache: () => EndpointCache,\n EndpointError: () => EndpointError,\n customEndpointFunctions: () => customEndpointFunctions,\n isIpAddress: () => isIpAddress,\n isValidHostLabel: () => isValidHostLabel,\n resolveEndpoint: () => resolveEndpoint\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/cache/EndpointCache.ts\nvar EndpointCache = class {\n /**\n * @param [size] - desired average maximum capacity. A buffer of 10 additional keys will be allowed\n * before keys are dropped.\n * @param [params] - list of params to consider as part of the cache key.\n *\n * If the params list is not populated, no caching will happen.\n * This may be out of order depending on how the object is created and arrives to this class.\n */\n constructor({ size, params }) {\n this.data = /* @__PURE__ */ new Map();\n this.parameters = [];\n this.capacity = size ?? 50;\n if (params) {\n this.parameters = params;\n }\n }\n static {\n __name(this, \"EndpointCache\");\n }\n /**\n * @param endpointParams - query for endpoint.\n * @param resolver - provider of the value if not present.\n * @returns endpoint corresponding to the query.\n */\n get(endpointParams, resolver) {\n const key = this.hash(endpointParams);\n if (key === false) {\n return resolver();\n }\n if (!this.data.has(key)) {\n if (this.data.size > this.capacity + 10) {\n const keys = this.data.keys();\n let i = 0;\n while (true) {\n const { value, done } = keys.next();\n this.data.delete(value);\n if (done || ++i > 10) {\n break;\n }\n }\n }\n this.data.set(key, resolver());\n }\n return this.data.get(key);\n }\n size() {\n return this.data.size;\n }\n /**\n * @returns cache key or false if not cachable.\n */\n hash(endpointParams) {\n let buffer = \"\";\n const { parameters } = this;\n if (parameters.length === 0) {\n return false;\n }\n for (const param of parameters) {\n const val = String(endpointParams[param] ?? \"\");\n if (val.includes(\"|;\")) {\n return false;\n }\n buffer += val + \"|;\";\n }\n return buffer;\n }\n};\n\n// src/lib/isIpAddress.ts\nvar IP_V4_REGEX = new RegExp(\n `^(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)(?:\\\\.(?:25[0-5]|2[0-4]\\\\d|1\\\\d\\\\d|[1-9]\\\\d|\\\\d)){3}$`\n);\nvar isIpAddress = /* @__PURE__ */ __name((value) => IP_V4_REGEX.test(value) || value.startsWith(\"[\") && value.endsWith(\"]\"), \"isIpAddress\");\n\n// src/lib/isValidHostLabel.ts\nvar VALID_HOST_LABEL_REGEX = new RegExp(`^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$`);\nvar isValidHostLabel = /* @__PURE__ */ __name((value, allowSubDomains = false) => {\n if (!allowSubDomains) {\n return VALID_HOST_LABEL_REGEX.test(value);\n }\n const labels = value.split(\".\");\n for (const label of labels) {\n if (!isValidHostLabel(label)) {\n return false;\n }\n }\n return true;\n}, \"isValidHostLabel\");\n\n// src/utils/customEndpointFunctions.ts\nvar customEndpointFunctions = {};\n\n// src/debug/debugId.ts\nvar debugId = \"endpoints\";\n\n// src/debug/toDebugString.ts\nfunction toDebugString(input) {\n if (typeof input !== \"object\" || input == null) {\n return input;\n }\n if (\"ref\" in input) {\n return `$${toDebugString(input.ref)}`;\n }\n if (\"fn\" in input) {\n return `${input.fn}(${(input.argv || []).map(toDebugString).join(\", \")})`;\n }\n return JSON.stringify(input, null, 2);\n}\n__name(toDebugString, \"toDebugString\");\n\n// src/types/EndpointError.ts\nvar EndpointError = class extends Error {\n static {\n __name(this, \"EndpointError\");\n }\n constructor(message) {\n super(message);\n this.name = \"EndpointError\";\n }\n};\n\n// src/lib/booleanEquals.ts\nvar booleanEquals = /* @__PURE__ */ __name((value1, value2) => value1 === value2, \"booleanEquals\");\n\n// src/lib/getAttrPathList.ts\nvar getAttrPathList = /* @__PURE__ */ __name((path) => {\n const parts = path.split(\".\");\n const pathList = [];\n for (const part of parts) {\n const squareBracketIndex = part.indexOf(\"[\");\n if (squareBracketIndex !== -1) {\n if (part.indexOf(\"]\") !== part.length - 1) {\n throw new EndpointError(`Path: '${path}' does not end with ']'`);\n }\n const arrayIndex = part.slice(squareBracketIndex + 1, -1);\n if (Number.isNaN(parseInt(arrayIndex))) {\n throw new EndpointError(`Invalid array index: '${arrayIndex}' in path: '${path}'`);\n }\n if (squareBracketIndex !== 0) {\n pathList.push(part.slice(0, squareBracketIndex));\n }\n pathList.push(arrayIndex);\n } else {\n pathList.push(part);\n }\n }\n return pathList;\n}, \"getAttrPathList\");\n\n// src/lib/getAttr.ts\nvar getAttr = /* @__PURE__ */ __name((value, path) => getAttrPathList(path).reduce((acc, index) => {\n if (typeof acc !== \"object\") {\n throw new EndpointError(`Index '${index}' in '${path}' not found in '${JSON.stringify(value)}'`);\n } else if (Array.isArray(acc)) {\n return acc[parseInt(index)];\n }\n return acc[index];\n}, value), \"getAttr\");\n\n// src/lib/isSet.ts\nvar isSet = /* @__PURE__ */ __name((value) => value != null, \"isSet\");\n\n// src/lib/not.ts\nvar not = /* @__PURE__ */ __name((value) => !value, \"not\");\n\n// src/lib/parseURL.ts\nvar import_types3 = require(\"@smithy/types\");\nvar DEFAULT_PORTS = {\n [import_types3.EndpointURLScheme.HTTP]: 80,\n [import_types3.EndpointURLScheme.HTTPS]: 443\n};\nvar parseURL = /* @__PURE__ */ __name((value) => {\n const whatwgURL = (() => {\n try {\n if (value instanceof URL) {\n return value;\n }\n if (typeof value === \"object\" && \"hostname\" in value) {\n const { hostname: hostname2, port, protocol: protocol2 = \"\", path = \"\", query = {} } = value;\n const url = new URL(`${protocol2}//${hostname2}${port ? `:${port}` : \"\"}${path}`);\n url.search = Object.entries(query).map(([k, v]) => `${k}=${v}`).join(\"&\");\n return url;\n }\n return new URL(value);\n } catch (error) {\n return null;\n }\n })();\n if (!whatwgURL) {\n console.error(`Unable to parse ${JSON.stringify(value)} as a whatwg URL.`);\n return null;\n }\n const urlString = whatwgURL.href;\n const { host, hostname, pathname, protocol, search } = whatwgURL;\n if (search) {\n return null;\n }\n const scheme = protocol.slice(0, -1);\n if (!Object.values(import_types3.EndpointURLScheme).includes(scheme)) {\n return null;\n }\n const isIp = isIpAddress(hostname);\n const inputContainsDefaultPort = urlString.includes(`${host}:${DEFAULT_PORTS[scheme]}`) || typeof value === \"string\" && value.includes(`${host}:${DEFAULT_PORTS[scheme]}`);\n const authority = `${host}${inputContainsDefaultPort ? `:${DEFAULT_PORTS[scheme]}` : ``}`;\n return {\n scheme,\n authority,\n path: pathname,\n normalizedPath: pathname.endsWith(\"/\") ? pathname : `${pathname}/`,\n isIp\n };\n}, \"parseURL\");\n\n// src/lib/stringEquals.ts\nvar stringEquals = /* @__PURE__ */ __name((value1, value2) => value1 === value2, \"stringEquals\");\n\n// src/lib/substring.ts\nvar substring = /* @__PURE__ */ __name((input, start, stop, reverse) => {\n if (start >= stop || input.length < stop) {\n return null;\n }\n if (!reverse) {\n return input.substring(start, stop);\n }\n return input.substring(input.length - stop, input.length - start);\n}, \"substring\");\n\n// src/lib/uriEncode.ts\nvar uriEncode = /* @__PURE__ */ __name((value) => encodeURIComponent(value).replace(/[!*'()]/g, (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`), \"uriEncode\");\n\n// src/utils/endpointFunctions.ts\nvar endpointFunctions = {\n booleanEquals,\n getAttr,\n isSet,\n isValidHostLabel,\n not,\n parseURL,\n stringEquals,\n substring,\n uriEncode\n};\n\n// src/utils/evaluateTemplate.ts\nvar evaluateTemplate = /* @__PURE__ */ __name((template, options) => {\n const evaluatedTemplateArr = [];\n const templateContext = {\n ...options.endpointParams,\n ...options.referenceRecord\n };\n let currentIndex = 0;\n while (currentIndex < template.length) {\n const openingBraceIndex = template.indexOf(\"{\", currentIndex);\n if (openingBraceIndex === -1) {\n evaluatedTemplateArr.push(template.slice(currentIndex));\n break;\n }\n evaluatedTemplateArr.push(template.slice(currentIndex, openingBraceIndex));\n const closingBraceIndex = template.indexOf(\"}\", openingBraceIndex);\n if (closingBraceIndex === -1) {\n evaluatedTemplateArr.push(template.slice(openingBraceIndex));\n break;\n }\n if (template[openingBraceIndex + 1] === \"{\" && template[closingBraceIndex + 1] === \"}\") {\n evaluatedTemplateArr.push(template.slice(openingBraceIndex + 1, closingBraceIndex));\n currentIndex = closingBraceIndex + 2;\n }\n const parameterName = template.substring(openingBraceIndex + 1, closingBraceIndex);\n if (parameterName.includes(\"#\")) {\n const [refName, attrName] = parameterName.split(\"#\");\n evaluatedTemplateArr.push(getAttr(templateContext[refName], attrName));\n } else {\n evaluatedTemplateArr.push(templateContext[parameterName]);\n }\n currentIndex = closingBraceIndex + 1;\n }\n return evaluatedTemplateArr.join(\"\");\n}, \"evaluateTemplate\");\n\n// src/utils/getReferenceValue.ts\nvar getReferenceValue = /* @__PURE__ */ __name(({ ref }, options) => {\n const referenceRecord = {\n ...options.endpointParams,\n ...options.referenceRecord\n };\n return referenceRecord[ref];\n}, \"getReferenceValue\");\n\n// src/utils/evaluateExpression.ts\nvar evaluateExpression = /* @__PURE__ */ __name((obj, keyName, options) => {\n if (typeof obj === \"string\") {\n return evaluateTemplate(obj, options);\n } else if (obj[\"fn\"]) {\n return callFunction(obj, options);\n } else if (obj[\"ref\"]) {\n return getReferenceValue(obj, options);\n }\n throw new EndpointError(`'${keyName}': ${String(obj)} is not a string, function or reference.`);\n}, \"evaluateExpression\");\n\n// src/utils/callFunction.ts\nvar callFunction = /* @__PURE__ */ __name(({ fn, argv }, options) => {\n const evaluatedArgs = argv.map(\n (arg) => [\"boolean\", \"number\"].includes(typeof arg) ? arg : evaluateExpression(arg, \"arg\", options)\n );\n const fnSegments = fn.split(\".\");\n if (fnSegments[0] in customEndpointFunctions && fnSegments[1] != null) {\n return customEndpointFunctions[fnSegments[0]][fnSegments[1]](...evaluatedArgs);\n }\n return endpointFunctions[fn](...evaluatedArgs);\n}, \"callFunction\");\n\n// src/utils/evaluateCondition.ts\nvar evaluateCondition = /* @__PURE__ */ __name(({ assign, ...fnArgs }, options) => {\n if (assign && assign in options.referenceRecord) {\n throw new EndpointError(`'${assign}' is already defined in Reference Record.`);\n }\n const value = callFunction(fnArgs, options);\n options.logger?.debug?.(`${debugId} evaluateCondition: ${toDebugString(fnArgs)} = ${toDebugString(value)}`);\n return {\n result: value === \"\" ? true : !!value,\n ...assign != null && { toAssign: { name: assign, value } }\n };\n}, \"evaluateCondition\");\n\n// src/utils/evaluateConditions.ts\nvar evaluateConditions = /* @__PURE__ */ __name((conditions = [], options) => {\n const conditionsReferenceRecord = {};\n for (const condition of conditions) {\n const { result, toAssign } = evaluateCondition(condition, {\n ...options,\n referenceRecord: {\n ...options.referenceRecord,\n ...conditionsReferenceRecord\n }\n });\n if (!result) {\n return { result };\n }\n if (toAssign) {\n conditionsReferenceRecord[toAssign.name] = toAssign.value;\n options.logger?.debug?.(`${debugId} assign: ${toAssign.name} := ${toDebugString(toAssign.value)}`);\n }\n }\n return { result: true, referenceRecord: conditionsReferenceRecord };\n}, \"evaluateConditions\");\n\n// src/utils/getEndpointHeaders.ts\nvar getEndpointHeaders = /* @__PURE__ */ __name((headers, options) => Object.entries(headers).reduce(\n (acc, [headerKey, headerVal]) => ({\n ...acc,\n [headerKey]: headerVal.map((headerValEntry) => {\n const processedExpr = evaluateExpression(headerValEntry, \"Header value entry\", options);\n if (typeof processedExpr !== \"string\") {\n throw new EndpointError(`Header '${headerKey}' value '${processedExpr}' is not a string`);\n }\n return processedExpr;\n })\n }),\n {}\n), \"getEndpointHeaders\");\n\n// src/utils/getEndpointProperty.ts\nvar getEndpointProperty = /* @__PURE__ */ __name((property, options) => {\n if (Array.isArray(property)) {\n return property.map((propertyEntry) => getEndpointProperty(propertyEntry, options));\n }\n switch (typeof property) {\n case \"string\":\n return evaluateTemplate(property, options);\n case \"object\":\n if (property === null) {\n throw new EndpointError(`Unexpected endpoint property: ${property}`);\n }\n return getEndpointProperties(property, options);\n case \"boolean\":\n return property;\n default:\n throw new EndpointError(`Unexpected endpoint property type: ${typeof property}`);\n }\n}, \"getEndpointProperty\");\n\n// src/utils/getEndpointProperties.ts\nvar getEndpointProperties = /* @__PURE__ */ __name((properties, options) => Object.entries(properties).reduce(\n (acc, [propertyKey, propertyVal]) => ({\n ...acc,\n [propertyKey]: getEndpointProperty(propertyVal, options)\n }),\n {}\n), \"getEndpointProperties\");\n\n// src/utils/getEndpointUrl.ts\nvar getEndpointUrl = /* @__PURE__ */ __name((endpointUrl, options) => {\n const expression = evaluateExpression(endpointUrl, \"Endpoint URL\", options);\n if (typeof expression === \"string\") {\n try {\n return new URL(expression);\n } catch (error) {\n console.error(`Failed to construct URL with ${expression}`, error);\n throw error;\n }\n }\n throw new EndpointError(`Endpoint URL must be a string, got ${typeof expression}`);\n}, \"getEndpointUrl\");\n\n// src/utils/evaluateEndpointRule.ts\nvar evaluateEndpointRule = /* @__PURE__ */ __name((endpointRule, options) => {\n const { conditions, endpoint } = endpointRule;\n const { result, referenceRecord } = evaluateConditions(conditions, options);\n if (!result) {\n return;\n }\n const endpointRuleOptions = {\n ...options,\n referenceRecord: { ...options.referenceRecord, ...referenceRecord }\n };\n const { url, properties, headers } = endpoint;\n options.logger?.debug?.(`${debugId} Resolving endpoint from template: ${toDebugString(endpoint)}`);\n return {\n ...headers != void 0 && {\n headers: getEndpointHeaders(headers, endpointRuleOptions)\n },\n ...properties != void 0 && {\n properties: getEndpointProperties(properties, endpointRuleOptions)\n },\n url: getEndpointUrl(url, endpointRuleOptions)\n };\n}, \"evaluateEndpointRule\");\n\n// src/utils/evaluateErrorRule.ts\nvar evaluateErrorRule = /* @__PURE__ */ __name((errorRule, options) => {\n const { conditions, error } = errorRule;\n const { result, referenceRecord } = evaluateConditions(conditions, options);\n if (!result) {\n return;\n }\n throw new EndpointError(\n evaluateExpression(error, \"Error\", {\n ...options,\n referenceRecord: { ...options.referenceRecord, ...referenceRecord }\n })\n );\n}, \"evaluateErrorRule\");\n\n// src/utils/evaluateTreeRule.ts\nvar evaluateTreeRule = /* @__PURE__ */ __name((treeRule, options) => {\n const { conditions, rules } = treeRule;\n const { result, referenceRecord } = evaluateConditions(conditions, options);\n if (!result) {\n return;\n }\n return evaluateRules(rules, {\n ...options,\n referenceRecord: { ...options.referenceRecord, ...referenceRecord }\n });\n}, \"evaluateTreeRule\");\n\n// src/utils/evaluateRules.ts\nvar evaluateRules = /* @__PURE__ */ __name((rules, options) => {\n for (const rule of rules) {\n if (rule.type === \"endpoint\") {\n const endpointOrUndefined = evaluateEndpointRule(rule, options);\n if (endpointOrUndefined) {\n return endpointOrUndefined;\n }\n } else if (rule.type === \"error\") {\n evaluateErrorRule(rule, options);\n } else if (rule.type === \"tree\") {\n const endpointOrUndefined = evaluateTreeRule(rule, options);\n if (endpointOrUndefined) {\n return endpointOrUndefined;\n }\n } else {\n throw new EndpointError(`Unknown endpoint rule: ${rule}`);\n }\n }\n throw new EndpointError(`Rules evaluation failed`);\n}, \"evaluateRules\");\n\n// src/resolveEndpoint.ts\nvar resolveEndpoint = /* @__PURE__ */ __name((ruleSetObject, options) => {\n const { endpointParams, logger } = options;\n const { parameters, rules } = ruleSetObject;\n options.logger?.debug?.(`${debugId} Initial EndpointParams: ${toDebugString(endpointParams)}`);\n const paramsWithDefault = Object.entries(parameters).filter(([, v]) => v.default != null).map(([k, v]) => [k, v.default]);\n if (paramsWithDefault.length > 0) {\n for (const [paramKey, paramDefaultValue] of paramsWithDefault) {\n endpointParams[paramKey] = endpointParams[paramKey] ?? paramDefaultValue;\n }\n }\n const requiredParams = Object.entries(parameters).filter(([, v]) => v.required).map(([k]) => k);\n for (const requiredParam of requiredParams) {\n if (endpointParams[requiredParam] == null) {\n throw new EndpointError(`Missing required parameter: '${requiredParam}'`);\n }\n }\n const endpoint = evaluateRules(rules, { endpointParams, logger, referenceRecord: {} });\n options.logger?.debug?.(`${debugId} Resolved endpoint: ${toDebugString(endpoint)}`);\n return endpoint;\n}, \"resolveEndpoint\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n EndpointCache,\n isIpAddress,\n isValidHostLabel,\n customEndpointFunctions,\n resolveEndpoint,\n EndpointError\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n AlgorithmId: () => AlgorithmId,\n EndpointURLScheme: () => EndpointURLScheme,\n FieldPosition: () => FieldPosition,\n HttpApiKeyAuthLocation: () => HttpApiKeyAuthLocation,\n HttpAuthLocation: () => HttpAuthLocation,\n IniSectionType: () => IniSectionType,\n RequestHandlerProtocol: () => RequestHandlerProtocol,\n SMITHY_CONTEXT_KEY: () => SMITHY_CONTEXT_KEY,\n getDefaultClientConfiguration: () => getDefaultClientConfiguration,\n resolveDefaultRuntimeConfig: () => resolveDefaultRuntimeConfig\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/auth/auth.ts\nvar HttpAuthLocation = /* @__PURE__ */ ((HttpAuthLocation2) => {\n HttpAuthLocation2[\"HEADER\"] = \"header\";\n HttpAuthLocation2[\"QUERY\"] = \"query\";\n return HttpAuthLocation2;\n})(HttpAuthLocation || {});\n\n// src/auth/HttpApiKeyAuth.ts\nvar HttpApiKeyAuthLocation = /* @__PURE__ */ ((HttpApiKeyAuthLocation2) => {\n HttpApiKeyAuthLocation2[\"HEADER\"] = \"header\";\n HttpApiKeyAuthLocation2[\"QUERY\"] = \"query\";\n return HttpApiKeyAuthLocation2;\n})(HttpApiKeyAuthLocation || {});\n\n// src/endpoint.ts\nvar EndpointURLScheme = /* @__PURE__ */ ((EndpointURLScheme2) => {\n EndpointURLScheme2[\"HTTP\"] = \"http\";\n EndpointURLScheme2[\"HTTPS\"] = \"https\";\n return EndpointURLScheme2;\n})(EndpointURLScheme || {});\n\n// src/extensions/checksum.ts\nvar AlgorithmId = /* @__PURE__ */ ((AlgorithmId2) => {\n AlgorithmId2[\"MD5\"] = \"md5\";\n AlgorithmId2[\"CRC32\"] = \"crc32\";\n AlgorithmId2[\"CRC32C\"] = \"crc32c\";\n AlgorithmId2[\"SHA1\"] = \"sha1\";\n AlgorithmId2[\"SHA256\"] = \"sha256\";\n return AlgorithmId2;\n})(AlgorithmId || {});\nvar getChecksumConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {\n const checksumAlgorithms = [];\n if (runtimeConfig.sha256 !== void 0) {\n checksumAlgorithms.push({\n algorithmId: () => \"sha256\" /* SHA256 */,\n checksumConstructor: () => runtimeConfig.sha256\n });\n }\n if (runtimeConfig.md5 != void 0) {\n checksumAlgorithms.push({\n algorithmId: () => \"md5\" /* MD5 */,\n checksumConstructor: () => runtimeConfig.md5\n });\n }\n return {\n addChecksumAlgorithm(algo) {\n checksumAlgorithms.push(algo);\n },\n checksumAlgorithms() {\n return checksumAlgorithms;\n }\n };\n}, \"getChecksumConfiguration\");\nvar resolveChecksumRuntimeConfig = /* @__PURE__ */ __name((clientConfig) => {\n const runtimeConfig = {};\n clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => {\n runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor();\n });\n return runtimeConfig;\n}, \"resolveChecksumRuntimeConfig\");\n\n// src/extensions/defaultClientConfiguration.ts\nvar getDefaultClientConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {\n return getChecksumConfiguration(runtimeConfig);\n}, \"getDefaultClientConfiguration\");\nvar resolveDefaultRuntimeConfig = /* @__PURE__ */ __name((config) => {\n return resolveChecksumRuntimeConfig(config);\n}, \"resolveDefaultRuntimeConfig\");\n\n// src/http.ts\nvar FieldPosition = /* @__PURE__ */ ((FieldPosition2) => {\n FieldPosition2[FieldPosition2[\"HEADER\"] = 0] = \"HEADER\";\n FieldPosition2[FieldPosition2[\"TRAILER\"] = 1] = \"TRAILER\";\n return FieldPosition2;\n})(FieldPosition || {});\n\n// src/middleware.ts\nvar SMITHY_CONTEXT_KEY = \"__smithy_context\";\n\n// src/profile.ts\nvar IniSectionType = /* @__PURE__ */ ((IniSectionType2) => {\n IniSectionType2[\"PROFILE\"] = \"profile\";\n IniSectionType2[\"SSO_SESSION\"] = \"sso-session\";\n IniSectionType2[\"SERVICES\"] = \"services\";\n return IniSectionType2;\n})(IniSectionType || {});\n\n// src/transfer.ts\nvar RequestHandlerProtocol = /* @__PURE__ */ ((RequestHandlerProtocol2) => {\n RequestHandlerProtocol2[\"HTTP_0_9\"] = \"http/0.9\";\n RequestHandlerProtocol2[\"HTTP_1_0\"] = \"http/1.0\";\n RequestHandlerProtocol2[\"TDS_8_0\"] = \"tds/8.0\";\n return RequestHandlerProtocol2;\n})(RequestHandlerProtocol || {});\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n HttpAuthLocation,\n HttpApiKeyAuthLocation,\n EndpointURLScheme,\n AlgorithmId,\n getDefaultClientConfiguration,\n resolveDefaultRuntimeConfig,\n FieldPosition,\n SMITHY_CONTEXT_KEY,\n IniSectionType,\n RequestHandlerProtocol\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n fromHex: () => fromHex,\n toHex: () => toHex\n});\nmodule.exports = __toCommonJS(src_exports);\nvar SHORT_TO_HEX = {};\nvar HEX_TO_SHORT = {};\nfor (let i = 0; i < 256; i++) {\n let encodedByte = i.toString(16).toLowerCase();\n if (encodedByte.length === 1) {\n encodedByte = `0${encodedByte}`;\n }\n SHORT_TO_HEX[i] = encodedByte;\n HEX_TO_SHORT[encodedByte] = i;\n}\nfunction fromHex(encoded) {\n if (encoded.length % 2 !== 0) {\n throw new Error(\"Hex encoded strings must have an even number length\");\n }\n const out = new Uint8Array(encoded.length / 2);\n for (let i = 0; i < encoded.length; i += 2) {\n const encodedByte = encoded.slice(i, i + 2).toLowerCase();\n if (encodedByte in HEX_TO_SHORT) {\n out[i / 2] = HEX_TO_SHORT[encodedByte];\n } else {\n throw new Error(`Cannot decode unrecognized sequence ${encodedByte} as hexadecimal`);\n }\n }\n return out;\n}\n__name(fromHex, \"fromHex\");\nfunction toHex(bytes) {\n let out = \"\";\n for (let i = 0; i < bytes.byteLength; i++) {\n out += SHORT_TO_HEX[bytes[i]];\n }\n return out;\n}\n__name(toHex, \"toHex\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n fromHex,\n toHex\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n getSmithyContext: () => getSmithyContext,\n normalizeProvider: () => normalizeProvider\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/getSmithyContext.ts\nvar import_types = require(\"@smithy/types\");\nvar getSmithyContext = /* @__PURE__ */ __name((context) => context[import_types.SMITHY_CONTEXT_KEY] || (context[import_types.SMITHY_CONTEXT_KEY] = {}), \"getSmithyContext\");\n\n// src/normalizeProvider.ts\nvar normalizeProvider = /* @__PURE__ */ __name((input) => {\n if (typeof input === \"function\")\n return input;\n const promisified = Promise.resolve(input);\n return () => promisified;\n}, \"normalizeProvider\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n getSmithyContext,\n normalizeProvider\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n AlgorithmId: () => AlgorithmId,\n EndpointURLScheme: () => EndpointURLScheme,\n FieldPosition: () => FieldPosition,\n HttpApiKeyAuthLocation: () => HttpApiKeyAuthLocation,\n HttpAuthLocation: () => HttpAuthLocation,\n IniSectionType: () => IniSectionType,\n RequestHandlerProtocol: () => RequestHandlerProtocol,\n SMITHY_CONTEXT_KEY: () => SMITHY_CONTEXT_KEY,\n getDefaultClientConfiguration: () => getDefaultClientConfiguration,\n resolveDefaultRuntimeConfig: () => resolveDefaultRuntimeConfig\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/auth/auth.ts\nvar HttpAuthLocation = /* @__PURE__ */ ((HttpAuthLocation2) => {\n HttpAuthLocation2[\"HEADER\"] = \"header\";\n HttpAuthLocation2[\"QUERY\"] = \"query\";\n return HttpAuthLocation2;\n})(HttpAuthLocation || {});\n\n// src/auth/HttpApiKeyAuth.ts\nvar HttpApiKeyAuthLocation = /* @__PURE__ */ ((HttpApiKeyAuthLocation2) => {\n HttpApiKeyAuthLocation2[\"HEADER\"] = \"header\";\n HttpApiKeyAuthLocation2[\"QUERY\"] = \"query\";\n return HttpApiKeyAuthLocation2;\n})(HttpApiKeyAuthLocation || {});\n\n// src/endpoint.ts\nvar EndpointURLScheme = /* @__PURE__ */ ((EndpointURLScheme2) => {\n EndpointURLScheme2[\"HTTP\"] = \"http\";\n EndpointURLScheme2[\"HTTPS\"] = \"https\";\n return EndpointURLScheme2;\n})(EndpointURLScheme || {});\n\n// src/extensions/checksum.ts\nvar AlgorithmId = /* @__PURE__ */ ((AlgorithmId2) => {\n AlgorithmId2[\"MD5\"] = \"md5\";\n AlgorithmId2[\"CRC32\"] = \"crc32\";\n AlgorithmId2[\"CRC32C\"] = \"crc32c\";\n AlgorithmId2[\"SHA1\"] = \"sha1\";\n AlgorithmId2[\"SHA256\"] = \"sha256\";\n return AlgorithmId2;\n})(AlgorithmId || {});\nvar getChecksumConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {\n const checksumAlgorithms = [];\n if (runtimeConfig.sha256 !== void 0) {\n checksumAlgorithms.push({\n algorithmId: () => \"sha256\" /* SHA256 */,\n checksumConstructor: () => runtimeConfig.sha256\n });\n }\n if (runtimeConfig.md5 != void 0) {\n checksumAlgorithms.push({\n algorithmId: () => \"md5\" /* MD5 */,\n checksumConstructor: () => runtimeConfig.md5\n });\n }\n return {\n addChecksumAlgorithm(algo) {\n checksumAlgorithms.push(algo);\n },\n checksumAlgorithms() {\n return checksumAlgorithms;\n }\n };\n}, \"getChecksumConfiguration\");\nvar resolveChecksumRuntimeConfig = /* @__PURE__ */ __name((clientConfig) => {\n const runtimeConfig = {};\n clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => {\n runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor();\n });\n return runtimeConfig;\n}, \"resolveChecksumRuntimeConfig\");\n\n// src/extensions/defaultClientConfiguration.ts\nvar getDefaultClientConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {\n return getChecksumConfiguration(runtimeConfig);\n}, \"getDefaultClientConfiguration\");\nvar resolveDefaultRuntimeConfig = /* @__PURE__ */ __name((config) => {\n return resolveChecksumRuntimeConfig(config);\n}, \"resolveDefaultRuntimeConfig\");\n\n// src/http.ts\nvar FieldPosition = /* @__PURE__ */ ((FieldPosition2) => {\n FieldPosition2[FieldPosition2[\"HEADER\"] = 0] = \"HEADER\";\n FieldPosition2[FieldPosition2[\"TRAILER\"] = 1] = \"TRAILER\";\n return FieldPosition2;\n})(FieldPosition || {});\n\n// src/middleware.ts\nvar SMITHY_CONTEXT_KEY = \"__smithy_context\";\n\n// src/profile.ts\nvar IniSectionType = /* @__PURE__ */ ((IniSectionType2) => {\n IniSectionType2[\"PROFILE\"] = \"profile\";\n IniSectionType2[\"SSO_SESSION\"] = \"sso-session\";\n IniSectionType2[\"SERVICES\"] = \"services\";\n return IniSectionType2;\n})(IniSectionType || {});\n\n// src/transfer.ts\nvar RequestHandlerProtocol = /* @__PURE__ */ ((RequestHandlerProtocol2) => {\n RequestHandlerProtocol2[\"HTTP_0_9\"] = \"http/0.9\";\n RequestHandlerProtocol2[\"HTTP_1_0\"] = \"http/1.0\";\n RequestHandlerProtocol2[\"TDS_8_0\"] = \"tds/8.0\";\n return RequestHandlerProtocol2;\n})(RequestHandlerProtocol || {});\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n HttpAuthLocation,\n HttpApiKeyAuthLocation,\n EndpointURLScheme,\n AlgorithmId,\n getDefaultClientConfiguration,\n resolveDefaultRuntimeConfig,\n FieldPosition,\n SMITHY_CONTEXT_KEY,\n IniSectionType,\n RequestHandlerProtocol\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n AdaptiveRetryStrategy: () => AdaptiveRetryStrategy,\n ConfiguredRetryStrategy: () => ConfiguredRetryStrategy,\n DEFAULT_MAX_ATTEMPTS: () => DEFAULT_MAX_ATTEMPTS,\n DEFAULT_RETRY_DELAY_BASE: () => DEFAULT_RETRY_DELAY_BASE,\n DEFAULT_RETRY_MODE: () => DEFAULT_RETRY_MODE,\n DefaultRateLimiter: () => DefaultRateLimiter,\n INITIAL_RETRY_TOKENS: () => INITIAL_RETRY_TOKENS,\n INVOCATION_ID_HEADER: () => INVOCATION_ID_HEADER,\n MAXIMUM_RETRY_DELAY: () => MAXIMUM_RETRY_DELAY,\n NO_RETRY_INCREMENT: () => NO_RETRY_INCREMENT,\n REQUEST_HEADER: () => REQUEST_HEADER,\n RETRY_COST: () => RETRY_COST,\n RETRY_MODES: () => RETRY_MODES,\n StandardRetryStrategy: () => StandardRetryStrategy,\n THROTTLING_RETRY_DELAY_BASE: () => THROTTLING_RETRY_DELAY_BASE,\n TIMEOUT_RETRY_COST: () => TIMEOUT_RETRY_COST\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/config.ts\nvar RETRY_MODES = /* @__PURE__ */ ((RETRY_MODES2) => {\n RETRY_MODES2[\"STANDARD\"] = \"standard\";\n RETRY_MODES2[\"ADAPTIVE\"] = \"adaptive\";\n return RETRY_MODES2;\n})(RETRY_MODES || {});\nvar DEFAULT_MAX_ATTEMPTS = 3;\nvar DEFAULT_RETRY_MODE = \"standard\" /* STANDARD */;\n\n// src/DefaultRateLimiter.ts\nvar import_service_error_classification = require(\"@smithy/service-error-classification\");\nvar DefaultRateLimiter = class _DefaultRateLimiter {\n constructor(options) {\n // Pre-set state variables\n this.currentCapacity = 0;\n this.enabled = false;\n this.lastMaxRate = 0;\n this.measuredTxRate = 0;\n this.requestCount = 0;\n this.lastTimestamp = 0;\n this.timeWindow = 0;\n this.beta = options?.beta ?? 0.7;\n this.minCapacity = options?.minCapacity ?? 1;\n this.minFillRate = options?.minFillRate ?? 0.5;\n this.scaleConstant = options?.scaleConstant ?? 0.4;\n this.smooth = options?.smooth ?? 0.8;\n const currentTimeInSeconds = this.getCurrentTimeInSeconds();\n this.lastThrottleTime = currentTimeInSeconds;\n this.lastTxRateBucket = Math.floor(this.getCurrentTimeInSeconds());\n this.fillRate = this.minFillRate;\n this.maxCapacity = this.minCapacity;\n }\n static {\n __name(this, \"DefaultRateLimiter\");\n }\n static {\n /**\n * Only used in testing.\n */\n this.setTimeoutFn = setTimeout;\n }\n getCurrentTimeInSeconds() {\n return Date.now() / 1e3;\n }\n async getSendToken() {\n return this.acquireTokenBucket(1);\n }\n async acquireTokenBucket(amount) {\n if (!this.enabled) {\n return;\n }\n this.refillTokenBucket();\n if (amount > this.currentCapacity) {\n const delay = (amount - this.currentCapacity) / this.fillRate * 1e3;\n await new Promise((resolve) => _DefaultRateLimiter.setTimeoutFn(resolve, delay));\n }\n this.currentCapacity = this.currentCapacity - amount;\n }\n refillTokenBucket() {\n const timestamp = this.getCurrentTimeInSeconds();\n if (!this.lastTimestamp) {\n this.lastTimestamp = timestamp;\n return;\n }\n const fillAmount = (timestamp - this.lastTimestamp) * this.fillRate;\n this.currentCapacity = Math.min(this.maxCapacity, this.currentCapacity + fillAmount);\n this.lastTimestamp = timestamp;\n }\n updateClientSendingRate(response) {\n let calculatedRate;\n this.updateMeasuredRate();\n if ((0, import_service_error_classification.isThrottlingError)(response)) {\n const rateToUse = !this.enabled ? this.measuredTxRate : Math.min(this.measuredTxRate, this.fillRate);\n this.lastMaxRate = rateToUse;\n this.calculateTimeWindow();\n this.lastThrottleTime = this.getCurrentTimeInSeconds();\n calculatedRate = this.cubicThrottle(rateToUse);\n this.enableTokenBucket();\n } else {\n this.calculateTimeWindow();\n calculatedRate = this.cubicSuccess(this.getCurrentTimeInSeconds());\n }\n const newRate = Math.min(calculatedRate, 2 * this.measuredTxRate);\n this.updateTokenBucketRate(newRate);\n }\n calculateTimeWindow() {\n this.timeWindow = this.getPrecise(Math.pow(this.lastMaxRate * (1 - this.beta) / this.scaleConstant, 1 / 3));\n }\n cubicThrottle(rateToUse) {\n return this.getPrecise(rateToUse * this.beta);\n }\n cubicSuccess(timestamp) {\n return this.getPrecise(\n this.scaleConstant * Math.pow(timestamp - this.lastThrottleTime - this.timeWindow, 3) + this.lastMaxRate\n );\n }\n enableTokenBucket() {\n this.enabled = true;\n }\n updateTokenBucketRate(newRate) {\n this.refillTokenBucket();\n this.fillRate = Math.max(newRate, this.minFillRate);\n this.maxCapacity = Math.max(newRate, this.minCapacity);\n this.currentCapacity = Math.min(this.currentCapacity, this.maxCapacity);\n }\n updateMeasuredRate() {\n const t = this.getCurrentTimeInSeconds();\n const timeBucket = Math.floor(t * 2) / 2;\n this.requestCount++;\n if (timeBucket > this.lastTxRateBucket) {\n const currentRate = this.requestCount / (timeBucket - this.lastTxRateBucket);\n this.measuredTxRate = this.getPrecise(currentRate * this.smooth + this.measuredTxRate * (1 - this.smooth));\n this.requestCount = 0;\n this.lastTxRateBucket = timeBucket;\n }\n }\n getPrecise(num) {\n return parseFloat(num.toFixed(8));\n }\n};\n\n// src/constants.ts\nvar DEFAULT_RETRY_DELAY_BASE = 100;\nvar MAXIMUM_RETRY_DELAY = 20 * 1e3;\nvar THROTTLING_RETRY_DELAY_BASE = 500;\nvar INITIAL_RETRY_TOKENS = 500;\nvar RETRY_COST = 5;\nvar TIMEOUT_RETRY_COST = 10;\nvar NO_RETRY_INCREMENT = 1;\nvar INVOCATION_ID_HEADER = \"amz-sdk-invocation-id\";\nvar REQUEST_HEADER = \"amz-sdk-request\";\n\n// src/defaultRetryBackoffStrategy.ts\nvar getDefaultRetryBackoffStrategy = /* @__PURE__ */ __name(() => {\n let delayBase = DEFAULT_RETRY_DELAY_BASE;\n const computeNextBackoffDelay = /* @__PURE__ */ __name((attempts) => {\n return Math.floor(Math.min(MAXIMUM_RETRY_DELAY, Math.random() * 2 ** attempts * delayBase));\n }, \"computeNextBackoffDelay\");\n const setDelayBase = /* @__PURE__ */ __name((delay) => {\n delayBase = delay;\n }, \"setDelayBase\");\n return {\n computeNextBackoffDelay,\n setDelayBase\n };\n}, \"getDefaultRetryBackoffStrategy\");\n\n// src/defaultRetryToken.ts\nvar createDefaultRetryToken = /* @__PURE__ */ __name(({\n retryDelay,\n retryCount,\n retryCost\n}) => {\n const getRetryCount = /* @__PURE__ */ __name(() => retryCount, \"getRetryCount\");\n const getRetryDelay = /* @__PURE__ */ __name(() => Math.min(MAXIMUM_RETRY_DELAY, retryDelay), \"getRetryDelay\");\n const getRetryCost = /* @__PURE__ */ __name(() => retryCost, \"getRetryCost\");\n return {\n getRetryCount,\n getRetryDelay,\n getRetryCost\n };\n}, \"createDefaultRetryToken\");\n\n// src/StandardRetryStrategy.ts\nvar StandardRetryStrategy = class {\n constructor(maxAttempts) {\n this.maxAttempts = maxAttempts;\n this.mode = \"standard\" /* STANDARD */;\n this.capacity = INITIAL_RETRY_TOKENS;\n this.retryBackoffStrategy = getDefaultRetryBackoffStrategy();\n this.maxAttemptsProvider = typeof maxAttempts === \"function\" ? maxAttempts : async () => maxAttempts;\n }\n static {\n __name(this, \"StandardRetryStrategy\");\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n async acquireInitialRetryToken(retryTokenScope) {\n return createDefaultRetryToken({\n retryDelay: DEFAULT_RETRY_DELAY_BASE,\n retryCount: 0\n });\n }\n async refreshRetryTokenForRetry(token, errorInfo) {\n const maxAttempts = await this.getMaxAttempts();\n if (this.shouldRetry(token, errorInfo, maxAttempts)) {\n const errorType = errorInfo.errorType;\n this.retryBackoffStrategy.setDelayBase(\n errorType === \"THROTTLING\" ? THROTTLING_RETRY_DELAY_BASE : DEFAULT_RETRY_DELAY_BASE\n );\n const delayFromErrorType = this.retryBackoffStrategy.computeNextBackoffDelay(token.getRetryCount());\n const retryDelay = errorInfo.retryAfterHint ? Math.max(errorInfo.retryAfterHint.getTime() - Date.now() || 0, delayFromErrorType) : delayFromErrorType;\n const capacityCost = this.getCapacityCost(errorType);\n this.capacity -= capacityCost;\n return createDefaultRetryToken({\n retryDelay,\n retryCount: token.getRetryCount() + 1,\n retryCost: capacityCost\n });\n }\n throw new Error(\"No retry token available\");\n }\n recordSuccess(token) {\n this.capacity = Math.max(INITIAL_RETRY_TOKENS, this.capacity + (token.getRetryCost() ?? NO_RETRY_INCREMENT));\n }\n /**\n * @returns the current available retry capacity.\n *\n * This number decreases when retries are executed and refills when requests or retries succeed.\n */\n getCapacity() {\n return this.capacity;\n }\n async getMaxAttempts() {\n try {\n return await this.maxAttemptsProvider();\n } catch (error) {\n console.warn(`Max attempts provider could not resolve. Using default of ${DEFAULT_MAX_ATTEMPTS}`);\n return DEFAULT_MAX_ATTEMPTS;\n }\n }\n shouldRetry(tokenToRenew, errorInfo, maxAttempts) {\n const attempts = tokenToRenew.getRetryCount() + 1;\n return attempts < maxAttempts && this.capacity >= this.getCapacityCost(errorInfo.errorType) && this.isRetryableError(errorInfo.errorType);\n }\n getCapacityCost(errorType) {\n return errorType === \"TRANSIENT\" ? TIMEOUT_RETRY_COST : RETRY_COST;\n }\n isRetryableError(errorType) {\n return errorType === \"THROTTLING\" || errorType === \"TRANSIENT\";\n }\n};\n\n// src/AdaptiveRetryStrategy.ts\nvar AdaptiveRetryStrategy = class {\n constructor(maxAttemptsProvider, options) {\n this.maxAttemptsProvider = maxAttemptsProvider;\n this.mode = \"adaptive\" /* ADAPTIVE */;\n const { rateLimiter } = options ?? {};\n this.rateLimiter = rateLimiter ?? new DefaultRateLimiter();\n this.standardRetryStrategy = new StandardRetryStrategy(maxAttemptsProvider);\n }\n static {\n __name(this, \"AdaptiveRetryStrategy\");\n }\n async acquireInitialRetryToken(retryTokenScope) {\n await this.rateLimiter.getSendToken();\n return this.standardRetryStrategy.acquireInitialRetryToken(retryTokenScope);\n }\n async refreshRetryTokenForRetry(tokenToRenew, errorInfo) {\n this.rateLimiter.updateClientSendingRate(errorInfo);\n return this.standardRetryStrategy.refreshRetryTokenForRetry(tokenToRenew, errorInfo);\n }\n recordSuccess(token) {\n this.rateLimiter.updateClientSendingRate({});\n this.standardRetryStrategy.recordSuccess(token);\n }\n};\n\n// src/ConfiguredRetryStrategy.ts\nvar ConfiguredRetryStrategy = class extends StandardRetryStrategy {\n static {\n __name(this, \"ConfiguredRetryStrategy\");\n }\n /**\n * @param maxAttempts - the maximum number of retry attempts allowed.\n * e.g., if set to 3, then 4 total requests are possible.\n * @param computeNextBackoffDelay - a millisecond delay for each retry or a function that takes the retry attempt\n * and returns the delay.\n *\n * @example exponential backoff.\n * ```js\n * new Client({\n * retryStrategy: new ConfiguredRetryStrategy(3, (attempt) => attempt ** 2)\n * });\n * ```\n * @example constant delay.\n * ```js\n * new Client({\n * retryStrategy: new ConfiguredRetryStrategy(3, 2000)\n * });\n * ```\n */\n constructor(maxAttempts, computeNextBackoffDelay = DEFAULT_RETRY_DELAY_BASE) {\n super(typeof maxAttempts === \"function\" ? maxAttempts : async () => maxAttempts);\n if (typeof computeNextBackoffDelay === \"number\") {\n this.computeNextBackoffDelay = () => computeNextBackoffDelay;\n } else {\n this.computeNextBackoffDelay = computeNextBackoffDelay;\n }\n }\n async refreshRetryTokenForRetry(tokenToRenew, errorInfo) {\n const token = await super.refreshRetryTokenForRetry(tokenToRenew, errorInfo);\n token.getRetryDelay = () => this.computeNextBackoffDelay(token.getRetryCount());\n return token;\n }\n};\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n AdaptiveRetryStrategy,\n ConfiguredRetryStrategy,\n DefaultRateLimiter,\n StandardRetryStrategy,\n RETRY_MODES,\n DEFAULT_MAX_ATTEMPTS,\n DEFAULT_RETRY_MODE,\n DEFAULT_RETRY_DELAY_BASE,\n MAXIMUM_RETRY_DELAY,\n THROTTLING_RETRY_DELAY_BASE,\n INITIAL_RETRY_TOKENS,\n RETRY_COST,\n TIMEOUT_RETRY_COST,\n NO_RETRY_INCREMENT,\n INVOCATION_ID_HEADER,\n REQUEST_HEADER\n});\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ByteArrayCollector = void 0;\nclass ByteArrayCollector {\n constructor(allocByteArray) {\n this.allocByteArray = allocByteArray;\n this.byteLength = 0;\n this.byteArrays = [];\n }\n push(byteArray) {\n this.byteArrays.push(byteArray);\n this.byteLength += byteArray.byteLength;\n }\n flush() {\n if (this.byteArrays.length === 1) {\n const bytes = this.byteArrays[0];\n this.reset();\n return bytes;\n }\n const aggregation = this.allocByteArray(this.byteLength);\n let cursor = 0;\n for (let i = 0; i < this.byteArrays.length; ++i) {\n const bytes = this.byteArrays[i];\n aggregation.set(bytes, cursor);\n cursor += bytes.byteLength;\n }\n this.reset();\n return aggregation;\n }\n reset() {\n this.byteArrays = [];\n this.byteLength = 0;\n }\n}\nexports.ByteArrayCollector = ByteArrayCollector;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ChecksumStream = void 0;\nconst ReadableStreamRef = typeof ReadableStream === \"function\" ? ReadableStream : function () { };\nclass ChecksumStream extends ReadableStreamRef {\n}\nexports.ChecksumStream = ChecksumStream;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ChecksumStream = void 0;\nconst util_base64_1 = require(\"@smithy/util-base64\");\nconst stream_1 = require(\"stream\");\nclass ChecksumStream extends stream_1.Duplex {\n constructor({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder, }) {\n var _a, _b;\n super();\n if (typeof source.pipe === \"function\") {\n this.source = source;\n }\n else {\n throw new Error(`@smithy/util-stream: unsupported source type ${(_b = (_a = source === null || source === void 0 ? void 0 : source.constructor) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : source} in ChecksumStream.`);\n }\n this.base64Encoder = base64Encoder !== null && base64Encoder !== void 0 ? base64Encoder : util_base64_1.toBase64;\n this.expectedChecksum = expectedChecksum;\n this.checksum = checksum;\n this.checksumSourceLocation = checksumSourceLocation;\n this.source.pipe(this);\n }\n _read(size) { }\n _write(chunk, encoding, callback) {\n try {\n this.checksum.update(chunk);\n this.push(chunk);\n }\n catch (e) {\n return callback(e);\n }\n return callback();\n }\n async _final(callback) {\n try {\n const digest = await this.checksum.digest();\n const received = this.base64Encoder(digest);\n if (this.expectedChecksum !== received) {\n return callback(new Error(`Checksum mismatch: expected \"${this.expectedChecksum}\" but received \"${received}\"` +\n ` in response header \"${this.checksumSourceLocation}\".`));\n }\n }\n catch (e) {\n return callback(e);\n }\n this.push(null);\n return callback();\n }\n}\nexports.ChecksumStream = ChecksumStream;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createChecksumStream = void 0;\nconst util_base64_1 = require(\"@smithy/util-base64\");\nconst stream_type_check_1 = require(\"../stream-type-check\");\nconst ChecksumStream_browser_1 = require(\"./ChecksumStream.browser\");\nconst createChecksumStream = ({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder, }) => {\n var _a, _b;\n if (!(0, stream_type_check_1.isReadableStream)(source)) {\n throw new Error(`@smithy/util-stream: unsupported source type ${(_b = (_a = source === null || source === void 0 ? void 0 : source.constructor) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : source} in ChecksumStream.`);\n }\n const encoder = base64Encoder !== null && base64Encoder !== void 0 ? base64Encoder : util_base64_1.toBase64;\n if (typeof TransformStream !== \"function\") {\n throw new Error(\"@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream.\");\n }\n const transform = new TransformStream({\n start() { },\n async transform(chunk, controller) {\n checksum.update(chunk);\n controller.enqueue(chunk);\n },\n async flush(controller) {\n const digest = await checksum.digest();\n const received = encoder(digest);\n if (expectedChecksum !== received) {\n const error = new Error(`Checksum mismatch: expected \"${expectedChecksum}\" but received \"${received}\"` +\n ` in response header \"${checksumSourceLocation}\".`);\n controller.error(error);\n }\n else {\n controller.terminate();\n }\n },\n });\n source.pipeThrough(transform);\n const readable = transform.readable;\n Object.setPrototypeOf(readable, ChecksumStream_browser_1.ChecksumStream.prototype);\n return readable;\n};\nexports.createChecksumStream = createChecksumStream;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createChecksumStream = createChecksumStream;\nconst stream_type_check_1 = require(\"../stream-type-check\");\nconst ChecksumStream_1 = require(\"./ChecksumStream\");\nconst createChecksumStream_browser_1 = require(\"./createChecksumStream.browser\");\nfunction createChecksumStream(init) {\n if (typeof ReadableStream === \"function\" && (0, stream_type_check_1.isReadableStream)(init.source)) {\n return (0, createChecksumStream_browser_1.createChecksumStream)(init);\n }\n return new ChecksumStream_1.ChecksumStream(init);\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createBufferedReadable = createBufferedReadable;\nconst node_stream_1 = require(\"node:stream\");\nconst ByteArrayCollector_1 = require(\"./ByteArrayCollector\");\nconst createBufferedReadableStream_1 = require(\"./createBufferedReadableStream\");\nconst stream_type_check_1 = require(\"./stream-type-check\");\nfunction createBufferedReadable(upstream, size, logger) {\n if ((0, stream_type_check_1.isReadableStream)(upstream)) {\n return (0, createBufferedReadableStream_1.createBufferedReadableStream)(upstream, size, logger);\n }\n const downstream = new node_stream_1.Readable({ read() { } });\n let streamBufferingLoggedWarning = false;\n let bytesSeen = 0;\n const buffers = [\n \"\",\n new ByteArrayCollector_1.ByteArrayCollector((size) => new Uint8Array(size)),\n new ByteArrayCollector_1.ByteArrayCollector((size) => Buffer.from(new Uint8Array(size))),\n ];\n let mode = -1;\n upstream.on(\"data\", (chunk) => {\n const chunkMode = (0, createBufferedReadableStream_1.modeOf)(chunk, true);\n if (mode !== chunkMode) {\n if (mode >= 0) {\n downstream.push((0, createBufferedReadableStream_1.flush)(buffers, mode));\n }\n mode = chunkMode;\n }\n if (mode === -1) {\n downstream.push(chunk);\n return;\n }\n const chunkSize = (0, createBufferedReadableStream_1.sizeOf)(chunk);\n bytesSeen += chunkSize;\n const bufferSize = (0, createBufferedReadableStream_1.sizeOf)(buffers[mode]);\n if (chunkSize >= size && bufferSize === 0) {\n downstream.push(chunk);\n }\n else {\n const newSize = (0, createBufferedReadableStream_1.merge)(buffers, mode, chunk);\n if (!streamBufferingLoggedWarning && bytesSeen > size * 2) {\n streamBufferingLoggedWarning = true;\n logger === null || logger === void 0 ? void 0 : logger.warn(`@smithy/util-stream - stream chunk size ${chunkSize} is below threshold of ${size}, automatically buffering.`);\n }\n if (newSize >= size) {\n downstream.push((0, createBufferedReadableStream_1.flush)(buffers, mode));\n }\n }\n });\n upstream.on(\"end\", () => {\n if (mode !== -1) {\n const remainder = (0, createBufferedReadableStream_1.flush)(buffers, mode);\n if ((0, createBufferedReadableStream_1.sizeOf)(remainder) > 0) {\n downstream.push(remainder);\n }\n }\n downstream.push(null);\n });\n return downstream;\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.createBufferedReadable = void 0;\nexports.createBufferedReadableStream = createBufferedReadableStream;\nexports.merge = merge;\nexports.flush = flush;\nexports.sizeOf = sizeOf;\nexports.modeOf = modeOf;\nconst ByteArrayCollector_1 = require(\"./ByteArrayCollector\");\nfunction createBufferedReadableStream(upstream, size, logger) {\n const reader = upstream.getReader();\n let streamBufferingLoggedWarning = false;\n let bytesSeen = 0;\n const buffers = [\"\", new ByteArrayCollector_1.ByteArrayCollector((size) => new Uint8Array(size))];\n let mode = -1;\n const pull = async (controller) => {\n const { value, done } = await reader.read();\n const chunk = value;\n if (done) {\n if (mode !== -1) {\n const remainder = flush(buffers, mode);\n if (sizeOf(remainder) > 0) {\n controller.enqueue(remainder);\n }\n }\n controller.close();\n }\n else {\n const chunkMode = modeOf(chunk, false);\n if (mode !== chunkMode) {\n if (mode >= 0) {\n controller.enqueue(flush(buffers, mode));\n }\n mode = chunkMode;\n }\n if (mode === -1) {\n controller.enqueue(chunk);\n return;\n }\n const chunkSize = sizeOf(chunk);\n bytesSeen += chunkSize;\n const bufferSize = sizeOf(buffers[mode]);\n if (chunkSize >= size && bufferSize === 0) {\n controller.enqueue(chunk);\n }\n else {\n const newSize = merge(buffers, mode, chunk);\n if (!streamBufferingLoggedWarning && bytesSeen > size * 2) {\n streamBufferingLoggedWarning = true;\n logger === null || logger === void 0 ? void 0 : logger.warn(`@smithy/util-stream - stream chunk size ${chunkSize} is below threshold of ${size}, automatically buffering.`);\n }\n if (newSize >= size) {\n controller.enqueue(flush(buffers, mode));\n }\n else {\n await pull(controller);\n }\n }\n }\n };\n return new ReadableStream({\n pull,\n });\n}\nexports.createBufferedReadable = createBufferedReadableStream;\nfunction merge(buffers, mode, chunk) {\n switch (mode) {\n case 0:\n buffers[0] += chunk;\n return sizeOf(buffers[0]);\n case 1:\n case 2:\n buffers[mode].push(chunk);\n return sizeOf(buffers[mode]);\n }\n}\nfunction flush(buffers, mode) {\n switch (mode) {\n case 0:\n const s = buffers[0];\n buffers[0] = \"\";\n return s;\n case 1:\n case 2:\n return buffers[mode].flush();\n }\n throw new Error(`@smithy/util-stream - invalid index ${mode} given to flush()`);\n}\nfunction sizeOf(chunk) {\n var _a, _b;\n return (_b = (_a = chunk === null || chunk === void 0 ? void 0 : chunk.byteLength) !== null && _a !== void 0 ? _a : chunk === null || chunk === void 0 ? void 0 : chunk.length) !== null && _b !== void 0 ? _b : 0;\n}\nfunction modeOf(chunk, allowBuffer = true) {\n if (allowBuffer && typeof Buffer !== \"undefined\" && chunk instanceof Buffer) {\n return 2;\n }\n if (chunk instanceof Uint8Array) {\n return 1;\n }\n if (typeof chunk === \"string\") {\n return 0;\n }\n return -1;\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.getAwsChunkedEncodingStream = void 0;\nconst stream_1 = require(\"stream\");\nconst getAwsChunkedEncodingStream = (readableStream, options) => {\n const { base64Encoder, bodyLengthChecker, checksumAlgorithmFn, checksumLocationName, streamHasher } = options;\n const checksumRequired = base64Encoder !== undefined &&\n checksumAlgorithmFn !== undefined &&\n checksumLocationName !== undefined &&\n streamHasher !== undefined;\n const digest = checksumRequired ? streamHasher(checksumAlgorithmFn, readableStream) : undefined;\n const awsChunkedEncodingStream = new stream_1.Readable({ read: () => { } });\n readableStream.on(\"data\", (data) => {\n const length = bodyLengthChecker(data) || 0;\n awsChunkedEncodingStream.push(`${length.toString(16)}\\r\\n`);\n awsChunkedEncodingStream.push(data);\n awsChunkedEncodingStream.push(\"\\r\\n\");\n });\n readableStream.on(\"end\", async () => {\n awsChunkedEncodingStream.push(`0\\r\\n`);\n if (checksumRequired) {\n const checksum = base64Encoder(await digest);\n awsChunkedEncodingStream.push(`${checksumLocationName}:${checksum}\\r\\n`);\n awsChunkedEncodingStream.push(`\\r\\n`);\n }\n awsChunkedEncodingStream.push(null);\n });\n return awsChunkedEncodingStream;\n};\nexports.getAwsChunkedEncodingStream = getAwsChunkedEncodingStream;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.headStream = headStream;\nasync function headStream(stream, bytes) {\n var _a;\n let byteLengthCounter = 0;\n const chunks = [];\n const reader = stream.getReader();\n let isDone = false;\n while (!isDone) {\n const { done, value } = await reader.read();\n if (value) {\n chunks.push(value);\n byteLengthCounter += (_a = value === null || value === void 0 ? void 0 : value.byteLength) !== null && _a !== void 0 ? _a : 0;\n }\n if (byteLengthCounter >= bytes) {\n break;\n }\n isDone = done;\n }\n reader.releaseLock();\n const collected = new Uint8Array(Math.min(bytes, byteLengthCounter));\n let offset = 0;\n for (const chunk of chunks) {\n if (chunk.byteLength > collected.byteLength - offset) {\n collected.set(chunk.subarray(0, collected.byteLength - offset), offset);\n break;\n }\n else {\n collected.set(chunk, offset);\n }\n offset += chunk.length;\n }\n return collected;\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.headStream = void 0;\nconst stream_1 = require(\"stream\");\nconst headStream_browser_1 = require(\"./headStream.browser\");\nconst stream_type_check_1 = require(\"./stream-type-check\");\nconst headStream = (stream, bytes) => {\n if ((0, stream_type_check_1.isReadableStream)(stream)) {\n return (0, headStream_browser_1.headStream)(stream, bytes);\n }\n return new Promise((resolve, reject) => {\n const collector = new Collector();\n collector.limit = bytes;\n stream.pipe(collector);\n stream.on(\"error\", (err) => {\n collector.end();\n reject(err);\n });\n collector.on(\"error\", reject);\n collector.on(\"finish\", function () {\n const bytes = new Uint8Array(Buffer.concat(this.buffers));\n resolve(bytes);\n });\n });\n};\nexports.headStream = headStream;\nclass Collector extends stream_1.Writable {\n constructor() {\n super(...arguments);\n this.buffers = [];\n this.limit = Infinity;\n this.bytesBuffered = 0;\n }\n _write(chunk, encoding, callback) {\n var _a;\n this.buffers.push(chunk);\n this.bytesBuffered += (_a = chunk.byteLength) !== null && _a !== void 0 ? _a : 0;\n if (this.bytesBuffered >= this.limit) {\n const excess = this.bytesBuffered - this.limit;\n const tailBuffer = this.buffers[this.buffers.length - 1];\n this.buffers[this.buffers.length - 1] = tailBuffer.subarray(0, tailBuffer.byteLength - excess);\n this.emit(\"finish\");\n }\n callback();\n }\n}\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, \"default\"), secondTarget && __copyProps(secondTarget, mod, \"default\"));\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n Uint8ArrayBlobAdapter: () => Uint8ArrayBlobAdapter\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/blob/transforms.ts\nvar import_util_base64 = require(\"@smithy/util-base64\");\nvar import_util_utf8 = require(\"@smithy/util-utf8\");\nfunction transformToString(payload, encoding = \"utf-8\") {\n if (encoding === \"base64\") {\n return (0, import_util_base64.toBase64)(payload);\n }\n return (0, import_util_utf8.toUtf8)(payload);\n}\n__name(transformToString, \"transformToString\");\nfunction transformFromString(str, encoding) {\n if (encoding === \"base64\") {\n return Uint8ArrayBlobAdapter.mutate((0, import_util_base64.fromBase64)(str));\n }\n return Uint8ArrayBlobAdapter.mutate((0, import_util_utf8.fromUtf8)(str));\n}\n__name(transformFromString, \"transformFromString\");\n\n// src/blob/Uint8ArrayBlobAdapter.ts\nvar Uint8ArrayBlobAdapter = class _Uint8ArrayBlobAdapter extends Uint8Array {\n static {\n __name(this, \"Uint8ArrayBlobAdapter\");\n }\n /**\n * @param source - such as a string or Stream.\n * @returns a new Uint8ArrayBlobAdapter extending Uint8Array.\n */\n static fromString(source, encoding = \"utf-8\") {\n switch (typeof source) {\n case \"string\":\n return transformFromString(source, encoding);\n default:\n throw new Error(`Unsupported conversion from ${typeof source} to Uint8ArrayBlobAdapter.`);\n }\n }\n /**\n * @param source - Uint8Array to be mutated.\n * @returns the same Uint8Array but with prototype switched to Uint8ArrayBlobAdapter.\n */\n static mutate(source) {\n Object.setPrototypeOf(source, _Uint8ArrayBlobAdapter.prototype);\n return source;\n }\n /**\n * @param encoding - default 'utf-8'.\n * @returns the blob as string.\n */\n transformToString(encoding = \"utf-8\") {\n return transformToString(this, encoding);\n }\n};\n\n// src/index.ts\n__reExport(src_exports, require(\"./checksum/ChecksumStream\"), module.exports);\n__reExport(src_exports, require(\"./checksum/createChecksumStream\"), module.exports);\n__reExport(src_exports, require(\"././createBufferedReadable\"), module.exports);\n__reExport(src_exports, require(\"././getAwsChunkedEncodingStream\"), module.exports);\n__reExport(src_exports, require(\"././headStream\"), module.exports);\n__reExport(src_exports, require(\"././sdk-stream-mixin\"), module.exports);\n__reExport(src_exports, require(\"././splitStream\"), module.exports);\n__reExport(src_exports, require(\"././stream-type-check\"), module.exports);\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n Uint8ArrayBlobAdapter,\n ChecksumStream,\n createChecksumStream,\n createBufferedReadable,\n getAwsChunkedEncodingStream,\n headStream,\n sdkStreamMixin,\n splitStream,\n isReadableStream,\n isBlob\n});\n\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.sdkStreamMixin = void 0;\nconst fetch_http_handler_1 = require(\"@smithy/fetch-http-handler\");\nconst util_base64_1 = require(\"@smithy/util-base64\");\nconst util_hex_encoding_1 = require(\"@smithy/util-hex-encoding\");\nconst util_utf8_1 = require(\"@smithy/util-utf8\");\nconst stream_type_check_1 = require(\"./stream-type-check\");\nconst ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = \"The stream has already been transformed.\";\nconst sdkStreamMixin = (stream) => {\n var _a, _b;\n if (!isBlobInstance(stream) && !(0, stream_type_check_1.isReadableStream)(stream)) {\n const name = ((_b = (_a = stream === null || stream === void 0 ? void 0 : stream.__proto__) === null || _a === void 0 ? void 0 : _a.constructor) === null || _b === void 0 ? void 0 : _b.name) || stream;\n throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${name}`);\n }\n let transformed = false;\n const transformToByteArray = async () => {\n if (transformed) {\n throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);\n }\n transformed = true;\n return await (0, fetch_http_handler_1.streamCollector)(stream);\n };\n const blobToWebStream = (blob) => {\n if (typeof blob.stream !== \"function\") {\n throw new Error(\"Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\\n\" +\n \"If you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body\");\n }\n return blob.stream();\n };\n return Object.assign(stream, {\n transformToByteArray: transformToByteArray,\n transformToString: async (encoding) => {\n const buf = await transformToByteArray();\n if (encoding === \"base64\") {\n return (0, util_base64_1.toBase64)(buf);\n }\n else if (encoding === \"hex\") {\n return (0, util_hex_encoding_1.toHex)(buf);\n }\n else if (encoding === undefined || encoding === \"utf8\" || encoding === \"utf-8\") {\n return (0, util_utf8_1.toUtf8)(buf);\n }\n else if (typeof TextDecoder === \"function\") {\n return new TextDecoder(encoding).decode(buf);\n }\n else {\n throw new Error(\"TextDecoder is not available, please make sure polyfill is provided.\");\n }\n },\n transformToWebStream: () => {\n if (transformed) {\n throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);\n }\n transformed = true;\n if (isBlobInstance(stream)) {\n return blobToWebStream(stream);\n }\n else if ((0, stream_type_check_1.isReadableStream)(stream)) {\n return stream;\n }\n else {\n throw new Error(`Cannot transform payload to web stream, got ${stream}`);\n }\n },\n });\n};\nexports.sdkStreamMixin = sdkStreamMixin;\nconst isBlobInstance = (stream) => typeof Blob === \"function\" && stream instanceof Blob;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.sdkStreamMixin = void 0;\nconst node_http_handler_1 = require(\"@smithy/node-http-handler\");\nconst util_buffer_from_1 = require(\"@smithy/util-buffer-from\");\nconst stream_1 = require(\"stream\");\nconst sdk_stream_mixin_browser_1 = require(\"./sdk-stream-mixin.browser\");\nconst ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = \"The stream has already been transformed.\";\nconst sdkStreamMixin = (stream) => {\n var _a, _b;\n if (!(stream instanceof stream_1.Readable)) {\n try {\n return (0, sdk_stream_mixin_browser_1.sdkStreamMixin)(stream);\n }\n catch (e) {\n const name = ((_b = (_a = stream === null || stream === void 0 ? void 0 : stream.__proto__) === null || _a === void 0 ? void 0 : _a.constructor) === null || _b === void 0 ? void 0 : _b.name) || stream;\n throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${name}`);\n }\n }\n let transformed = false;\n const transformToByteArray = async () => {\n if (transformed) {\n throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);\n }\n transformed = true;\n return await (0, node_http_handler_1.streamCollector)(stream);\n };\n return Object.assign(stream, {\n transformToByteArray,\n transformToString: async (encoding) => {\n const buf = await transformToByteArray();\n if (encoding === undefined || Buffer.isEncoding(encoding)) {\n return (0, util_buffer_from_1.fromArrayBuffer)(buf.buffer, buf.byteOffset, buf.byteLength).toString(encoding);\n }\n else {\n const decoder = new TextDecoder(encoding);\n return decoder.decode(buf);\n }\n },\n transformToWebStream: () => {\n if (transformed) {\n throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED);\n }\n if (stream.readableFlowing !== null) {\n throw new Error(\"The stream has been consumed by other callbacks.\");\n }\n if (typeof stream_1.Readable.toWeb !== \"function\") {\n throw new Error(\"Readable.toWeb() is not supported. Please ensure a polyfill is available.\");\n }\n transformed = true;\n return stream_1.Readable.toWeb(stream);\n },\n });\n};\nexports.sdkStreamMixin = sdkStreamMixin;\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.splitStream = splitStream;\nasync function splitStream(stream) {\n if (typeof stream.stream === \"function\") {\n stream = stream.stream();\n }\n const readableStream = stream;\n return readableStream.tee();\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.splitStream = splitStream;\nconst stream_1 = require(\"stream\");\nconst splitStream_browser_1 = require(\"./splitStream.browser\");\nconst stream_type_check_1 = require(\"./stream-type-check\");\nasync function splitStream(stream) {\n if ((0, stream_type_check_1.isReadableStream)(stream) || (0, stream_type_check_1.isBlob)(stream)) {\n return (0, splitStream_browser_1.splitStream)(stream);\n }\n const stream1 = new stream_1.PassThrough();\n const stream2 = new stream_1.PassThrough();\n stream.pipe(stream1);\n stream.pipe(stream2);\n return [stream1, stream2];\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.isBlob = exports.isReadableStream = void 0;\nconst isReadableStream = (stream) => {\n var _a;\n return typeof ReadableStream === \"function\" &&\n (((_a = stream === null || stream === void 0 ? void 0 : stream.constructor) === null || _a === void 0 ? void 0 : _a.name) === ReadableStream.name || stream instanceof ReadableStream);\n};\nexports.isReadableStream = isReadableStream;\nconst isBlob = (blob) => {\n var _a;\n return typeof Blob === \"function\" && (((_a = blob === null || blob === void 0 ? void 0 : blob.constructor) === null || _a === void 0 ? void 0 : _a.name) === Blob.name || blob instanceof Blob);\n};\nexports.isBlob = isBlob;\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n escapeUri: () => escapeUri,\n escapeUriPath: () => escapeUriPath\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/escape-uri.ts\nvar escapeUri = /* @__PURE__ */ __name((uri) => (\n // AWS percent-encodes some extra non-standard characters in a URI\n encodeURIComponent(uri).replace(/[!'()*]/g, hexEncode)\n), \"escapeUri\");\nvar hexEncode = /* @__PURE__ */ __name((c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`, \"hexEncode\");\n\n// src/escape-uri-path.ts\nvar escapeUriPath = /* @__PURE__ */ __name((uri) => uri.split(\"/\").map(escapeUri).join(\"/\"), \"escapeUriPath\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n escapeUri,\n escapeUriPath\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n fromUtf8: () => fromUtf8,\n toUint8Array: () => toUint8Array,\n toUtf8: () => toUtf8\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/fromUtf8.ts\nvar import_util_buffer_from = require(\"@smithy/util-buffer-from\");\nvar fromUtf8 = /* @__PURE__ */ __name((input) => {\n const buf = (0, import_util_buffer_from.fromString)(input, \"utf8\");\n return new Uint8Array(buf.buffer, buf.byteOffset, buf.byteLength / Uint8Array.BYTES_PER_ELEMENT);\n}, \"fromUtf8\");\n\n// src/toUint8Array.ts\nvar toUint8Array = /* @__PURE__ */ __name((data) => {\n if (typeof data === \"string\") {\n return fromUtf8(data);\n }\n if (ArrayBuffer.isView(data)) {\n return new Uint8Array(data.buffer, data.byteOffset, data.byteLength / Uint8Array.BYTES_PER_ELEMENT);\n }\n return new Uint8Array(data);\n}, \"toUint8Array\");\n\n// src/toUtf8.ts\n\nvar toUtf8 = /* @__PURE__ */ __name((input) => {\n if (typeof input === \"string\") {\n return input;\n }\n if (typeof input !== \"object\" || typeof input.byteOffset !== \"number\" || typeof input.byteLength !== \"number\") {\n throw new Error(\"@smithy/util-utf8: toUtf8 encoder function only accepts string | Uint8Array.\");\n }\n return (0, import_util_buffer_from.fromArrayBuffer)(input.buffer, input.byteOffset, input.byteLength).toString(\"utf8\");\n}, \"toUtf8\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n fromUtf8,\n toUint8Array,\n toUtf8\n});\n\n","var __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __name = (target, value) => __defProp(target, \"name\", { value, configurable: true });\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\n\n// src/index.ts\nvar src_exports = {};\n__export(src_exports, {\n WaiterState: () => WaiterState,\n checkExceptions: () => checkExceptions,\n createWaiter: () => createWaiter,\n waiterServiceDefaults: () => waiterServiceDefaults\n});\nmodule.exports = __toCommonJS(src_exports);\n\n// src/utils/sleep.ts\nvar sleep = /* @__PURE__ */ __name((seconds) => {\n return new Promise((resolve) => setTimeout(resolve, seconds * 1e3));\n}, \"sleep\");\n\n// src/waiter.ts\nvar waiterServiceDefaults = {\n minDelay: 2,\n maxDelay: 120\n};\nvar WaiterState = /* @__PURE__ */ ((WaiterState2) => {\n WaiterState2[\"ABORTED\"] = \"ABORTED\";\n WaiterState2[\"FAILURE\"] = \"FAILURE\";\n WaiterState2[\"SUCCESS\"] = \"SUCCESS\";\n WaiterState2[\"RETRY\"] = \"RETRY\";\n WaiterState2[\"TIMEOUT\"] = \"TIMEOUT\";\n return WaiterState2;\n})(WaiterState || {});\nvar checkExceptions = /* @__PURE__ */ __name((result) => {\n if (result.state === \"ABORTED\" /* ABORTED */) {\n const abortError = new Error(\n `${JSON.stringify({\n ...result,\n reason: \"Request was aborted\"\n })}`\n );\n abortError.name = \"AbortError\";\n throw abortError;\n } else if (result.state === \"TIMEOUT\" /* TIMEOUT */) {\n const timeoutError = new Error(\n `${JSON.stringify({\n ...result,\n reason: \"Waiter has timed out\"\n })}`\n );\n timeoutError.name = \"TimeoutError\";\n throw timeoutError;\n } else if (result.state !== \"SUCCESS\" /* SUCCESS */) {\n throw new Error(`${JSON.stringify(result)}`);\n }\n return result;\n}, \"checkExceptions\");\n\n// src/poller.ts\nvar exponentialBackoffWithJitter = /* @__PURE__ */ __name((minDelay, maxDelay, attemptCeiling, attempt) => {\n if (attempt > attemptCeiling)\n return maxDelay;\n const delay = minDelay * 2 ** (attempt - 1);\n return randomInRange(minDelay, delay);\n}, \"exponentialBackoffWithJitter\");\nvar randomInRange = /* @__PURE__ */ __name((min, max) => min + Math.random() * (max - min), \"randomInRange\");\nvar runPolling = /* @__PURE__ */ __name(async ({ minDelay, maxDelay, maxWaitTime, abortController, client, abortSignal }, input, acceptorChecks) => {\n const observedResponses = {};\n const { state, reason } = await acceptorChecks(client, input);\n if (reason) {\n const message = createMessageFromResponse(reason);\n observedResponses[message] |= 0;\n observedResponses[message] += 1;\n }\n if (state !== \"RETRY\" /* RETRY */) {\n return { state, reason, observedResponses };\n }\n let currentAttempt = 1;\n const waitUntil = Date.now() + maxWaitTime * 1e3;\n const attemptCeiling = Math.log(maxDelay / minDelay) / Math.log(2) + 1;\n while (true) {\n if (abortController?.signal?.aborted || abortSignal?.aborted) {\n const message = \"AbortController signal aborted.\";\n observedResponses[message] |= 0;\n observedResponses[message] += 1;\n return { state: \"ABORTED\" /* ABORTED */, observedResponses };\n }\n const delay = exponentialBackoffWithJitter(minDelay, maxDelay, attemptCeiling, currentAttempt);\n if (Date.now() + delay * 1e3 > waitUntil) {\n return { state: \"TIMEOUT\" /* TIMEOUT */, observedResponses };\n }\n await sleep(delay);\n const { state: state2, reason: reason2 } = await acceptorChecks(client, input);\n if (reason2) {\n const message = createMessageFromResponse(reason2);\n observedResponses[message] |= 0;\n observedResponses[message] += 1;\n }\n if (state2 !== \"RETRY\" /* RETRY */) {\n return { state: state2, reason: reason2, observedResponses };\n }\n currentAttempt += 1;\n }\n}, \"runPolling\");\nvar createMessageFromResponse = /* @__PURE__ */ __name((reason) => {\n if (reason?.$responseBodyText) {\n return `Deserialization error for body: ${reason.$responseBodyText}`;\n }\n if (reason?.$metadata?.httpStatusCode) {\n if (reason.$response || reason.message) {\n return `${reason.$response.statusCode ?? reason.$metadata.httpStatusCode ?? \"Unknown\"}: ${reason.message}`;\n }\n return `${reason.$metadata.httpStatusCode}: OK`;\n }\n return String(reason?.message ?? JSON.stringify(reason) ?? \"Unknown\");\n}, \"createMessageFromResponse\");\n\n// src/utils/validate.ts\nvar validateWaiterOptions = /* @__PURE__ */ __name((options) => {\n if (options.maxWaitTime <= 0) {\n throw new Error(`WaiterConfiguration.maxWaitTime must be greater than 0`);\n } else if (options.minDelay <= 0) {\n throw new Error(`WaiterConfiguration.minDelay must be greater than 0`);\n } else if (options.maxDelay <= 0) {\n throw new Error(`WaiterConfiguration.maxDelay must be greater than 0`);\n } else if (options.maxWaitTime <= options.minDelay) {\n throw new Error(\n `WaiterConfiguration.maxWaitTime [${options.maxWaitTime}] must be greater than WaiterConfiguration.minDelay [${options.minDelay}] for this waiter`\n );\n } else if (options.maxDelay < options.minDelay) {\n throw new Error(\n `WaiterConfiguration.maxDelay [${options.maxDelay}] must be greater than WaiterConfiguration.minDelay [${options.minDelay}] for this waiter`\n );\n }\n}, \"validateWaiterOptions\");\n\n// src/createWaiter.ts\nvar abortTimeout = /* @__PURE__ */ __name(async (abortSignal) => {\n return new Promise((resolve) => {\n const onAbort = /* @__PURE__ */ __name(() => resolve({ state: \"ABORTED\" /* ABORTED */ }), \"onAbort\");\n if (typeof abortSignal.addEventListener === \"function\") {\n abortSignal.addEventListener(\"abort\", onAbort);\n } else {\n abortSignal.onabort = onAbort;\n }\n });\n}, \"abortTimeout\");\nvar createWaiter = /* @__PURE__ */ __name(async (options, input, acceptorChecks) => {\n const params = {\n ...waiterServiceDefaults,\n ...options\n };\n validateWaiterOptions(params);\n const exitConditions = [runPolling(params, input, acceptorChecks)];\n if (options.abortController) {\n exitConditions.push(abortTimeout(options.abortController.signal));\n }\n if (options.abortSignal) {\n exitConditions.push(abortTimeout(options.abortSignal));\n }\n return Promise.race(exitConditions);\n}, \"createWaiter\");\n// Annotate the CommonJS export names for ESM import in node:\n\n0 && (module.exports = {\n createWaiter,\n waiterServiceDefaults,\n WaiterState,\n checkExceptions\n});\n\n","'use strict';\n\nmodule.exports = ({onlyFirst = false} = {}) => {\n\tconst pattern = [\n\t\t'[\\\\u001B\\\\u009B][[\\\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]+)*|[a-zA-Z\\\\d]+(?:;[-a-zA-Z\\\\d\\\\/#&.:=?%@~_]*)*)?\\\\u0007)',\n\t\t'(?:(?:\\\\d{1,4}(?:;\\\\d{0,4})*)?[\\\\dA-PR-TZcf-ntqry=><~]))'\n\t].join('|');\n\n\treturn new RegExp(pattern, onlyFirst ? undefined : 'g');\n};\n","'use strict';\n\nconst wrapAnsi16 = (fn, offset) => (...args) => {\n\tconst code = fn(...args);\n\treturn `\\u001B[${code + offset}m`;\n};\n\nconst wrapAnsi256 = (fn, offset) => (...args) => {\n\tconst code = fn(...args);\n\treturn `\\u001B[${38 + offset};5;${code}m`;\n};\n\nconst wrapAnsi16m = (fn, offset) => (...args) => {\n\tconst rgb = fn(...args);\n\treturn `\\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`;\n};\n\nconst ansi2ansi = n => n;\nconst rgb2rgb = (r, g, b) => [r, g, b];\n\nconst setLazyProperty = (object, property, get) => {\n\tObject.defineProperty(object, property, {\n\t\tget: () => {\n\t\t\tconst value = get();\n\n\t\t\tObject.defineProperty(object, property, {\n\t\t\t\tvalue,\n\t\t\t\tenumerable: true,\n\t\t\t\tconfigurable: true\n\t\t\t});\n\n\t\t\treturn value;\n\t\t},\n\t\tenumerable: true,\n\t\tconfigurable: true\n\t});\n};\n\n/** @type {typeof import('color-convert')} */\nlet colorConvert;\nconst makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => {\n\tif (colorConvert === undefined) {\n\t\tcolorConvert = require('color-convert');\n\t}\n\n\tconst offset = isBackground ? 10 : 0;\n\tconst styles = {};\n\n\tfor (const [sourceSpace, suite] of Object.entries(colorConvert)) {\n\t\tconst name = sourceSpace === 'ansi16' ? 'ansi' : sourceSpace;\n\t\tif (sourceSpace === targetSpace) {\n\t\t\tstyles[name] = wrap(identity, offset);\n\t\t} else if (typeof suite === 'object') {\n\t\t\tstyles[name] = wrap(suite[targetSpace], offset);\n\t\t}\n\t}\n\n\treturn styles;\n};\n\nfunction assembleStyles() {\n\tconst codes = new Map();\n\tconst styles = {\n\t\tmodifier: {\n\t\t\treset: [0, 0],\n\t\t\t// 21 isn't widely supported and 22 does the same thing\n\t\t\tbold: [1, 22],\n\t\t\tdim: [2, 22],\n\t\t\titalic: [3, 23],\n\t\t\tunderline: [4, 24],\n\t\t\tinverse: [7, 27],\n\t\t\thidden: [8, 28],\n\t\t\tstrikethrough: [9, 29]\n\t\t},\n\t\tcolor: {\n\t\t\tblack: [30, 39],\n\t\t\tred: [31, 39],\n\t\t\tgreen: [32, 39],\n\t\t\tyellow: [33, 39],\n\t\t\tblue: [34, 39],\n\t\t\tmagenta: [35, 39],\n\t\t\tcyan: [36, 39],\n\t\t\twhite: [37, 39],\n\n\t\t\t// Bright color\n\t\t\tblackBright: [90, 39],\n\t\t\tredBright: [91, 39],\n\t\t\tgreenBright: [92, 39],\n\t\t\tyellowBright: [93, 39],\n\t\t\tblueBright: [94, 39],\n\t\t\tmagentaBright: [95, 39],\n\t\t\tcyanBright: [96, 39],\n\t\t\twhiteBright: [97, 39]\n\t\t},\n\t\tbgColor: {\n\t\t\tbgBlack: [40, 49],\n\t\t\tbgRed: [41, 49],\n\t\t\tbgGreen: [42, 49],\n\t\t\tbgYellow: [43, 49],\n\t\t\tbgBlue: [44, 49],\n\t\t\tbgMagenta: [45, 49],\n\t\t\tbgCyan: [46, 49],\n\t\t\tbgWhite: [47, 49],\n\n\t\t\t// Bright color\n\t\t\tbgBlackBright: [100, 49],\n\t\t\tbgRedBright: [101, 49],\n\t\t\tbgGreenBright: [102, 49],\n\t\t\tbgYellowBright: [103, 49],\n\t\t\tbgBlueBright: [104, 49],\n\t\t\tbgMagentaBright: [105, 49],\n\t\t\tbgCyanBright: [106, 49],\n\t\t\tbgWhiteBright: [107, 49]\n\t\t}\n\t};\n\n\t// Alias bright black as gray (and grey)\n\tstyles.color.gray = styles.color.blackBright;\n\tstyles.bgColor.bgGray = styles.bgColor.bgBlackBright;\n\tstyles.color.grey = styles.color.blackBright;\n\tstyles.bgColor.bgGrey = styles.bgColor.bgBlackBright;\n\n\tfor (const [groupName, group] of Object.entries(styles)) {\n\t\tfor (const [styleName, style] of Object.entries(group)) {\n\t\t\tstyles[styleName] = {\n\t\t\t\topen: `\\u001B[${style[0]}m`,\n\t\t\t\tclose: `\\u001B[${style[1]}m`\n\t\t\t};\n\n\t\t\tgroup[styleName] = styles[styleName];\n\n\t\t\tcodes.set(style[0], style[1]);\n\t\t}\n\n\t\tObject.defineProperty(styles, groupName, {\n\t\t\tvalue: group,\n\t\t\tenumerable: false\n\t\t});\n\t}\n\n\tObject.defineProperty(styles, 'codes', {\n\t\tvalue: codes,\n\t\tenumerable: false\n\t});\n\n\tstyles.color.close = '\\u001B[39m';\n\tstyles.bgColor.close = '\\u001B[49m';\n\n\tsetLazyProperty(styles.color, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, false));\n\tsetLazyProperty(styles.color, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, false));\n\tsetLazyProperty(styles.color, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, false));\n\tsetLazyProperty(styles.bgColor, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, true));\n\tsetLazyProperty(styles.bgColor, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, true));\n\tsetLazyProperty(styles.bgColor, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, true));\n\n\treturn styles;\n}\n\n// Make the export immutable\nObject.defineProperty(module, 'exports', {\n\tenumerable: true,\n\tget: assembleStyles\n});\n","'use strict';\nconst regex = '[\\uD800-\\uDBFF][\\uDC00-\\uDFFF]';\n\nconst astralRegex = options => options && options.exact ? new RegExp(`^${regex}$`) : new RegExp(regex, 'g');\n\nmodule.exports = astralRegex;\n","var register = require(\"./lib/register\");\nvar addHook = require(\"./lib/add\");\nvar removeHook = require(\"./lib/remove\");\n\n// bind with array of arguments: https://stackoverflow.com/a/21792913\nvar bind = Function.bind;\nvar bindable = bind.bind(bind);\n\nfunction bindApi(hook, state, name) {\n var removeHookRef = bindable(removeHook, null).apply(\n null,\n name ? [state, name] : [state]\n );\n hook.api = { remove: removeHookRef };\n hook.remove = removeHookRef;\n [\"before\", \"error\", \"after\", \"wrap\"].forEach(function (kind) {\n var args = name ? [state, kind, name] : [state, kind];\n hook[kind] = hook.api[kind] = bindable(addHook, null).apply(null, args);\n });\n}\n\nfunction HookSingular() {\n var singularHookName = \"h\";\n var singularHookState = {\n registry: {},\n };\n var singularHook = register.bind(null, singularHookState, singularHookName);\n bindApi(singularHook, singularHookState, singularHookName);\n return singularHook;\n}\n\nfunction HookCollection() {\n var state = {\n registry: {},\n };\n\n var hook = register.bind(null, state);\n bindApi(hook, state);\n\n return hook;\n}\n\nvar collectionHookDeprecationMessageDisplayed = false;\nfunction Hook() {\n if (!collectionHookDeprecationMessageDisplayed) {\n console.warn(\n '[before-after-hook]: \"Hook()\" repurposing warning, use \"Hook.Collection()\". Read more: https://git.io/upgrade-before-after-hook-to-1.4'\n );\n collectionHookDeprecationMessageDisplayed = true;\n }\n return HookCollection();\n}\n\nHook.Singular = HookSingular.bind();\nHook.Collection = HookCollection.bind();\n\nmodule.exports = Hook;\n// expose constructors as a named property for TypeScript\nmodule.exports.Hook = Hook;\nmodule.exports.Singular = Hook.Singular;\nmodule.exports.Collection = Hook.Collection;\n","module.exports = addHook;\n\nfunction addHook(state, kind, name, hook) {\n var orig = hook;\n if (!state.registry[name]) {\n state.registry[name] = [];\n }\n\n if (kind === \"before\") {\n hook = function (method, options) {\n return Promise.resolve()\n .then(orig.bind(null, options))\n .then(method.bind(null, options));\n };\n }\n\n if (kind === \"after\") {\n hook = function (method, options) {\n var result;\n return Promise.resolve()\n .then(method.bind(null, options))\n .then(function (result_) {\n result = result_;\n return orig(result, options);\n })\n .then(function () {\n return result;\n });\n };\n }\n\n if (kind === \"error\") {\n hook = function (method, options) {\n return Promise.resolve()\n .then(method.bind(null, options))\n .catch(function (error) {\n return orig(error, options);\n });\n };\n }\n\n state.registry[name].push({\n hook: hook,\n orig: orig,\n });\n}\n","module.exports = register;\n\nfunction register(state, name, method, options) {\n if (typeof method !== \"function\") {\n throw new Error(\"method for before hook must be a function\");\n }\n\n if (!options) {\n options = {};\n }\n\n if (Array.isArray(name)) {\n return name.reverse().reduce(function (callback, name) {\n return register.bind(null, state, name, callback, options);\n }, method)();\n }\n\n return Promise.resolve().then(function () {\n if (!state.registry[name]) {\n return method(options);\n }\n\n return state.registry[name].reduce(function (method, registered) {\n return registered.hook.bind(null, method, options);\n }, method)();\n });\n}\n","module.exports = removeHook;\n\nfunction removeHook(state, name, method) {\n if (!state.registry[name]) {\n return;\n }\n\n var index = state.registry[name]\n .map(function (registered) {\n return registered.orig;\n })\n .indexOf(method);\n\n if (index === -1) {\n return;\n }\n\n state.registry[name].splice(index, 1);\n}\n","'use strict';\nconst ansiStyles = require('ansi-styles');\nconst {stdout: stdoutColor, stderr: stderrColor} = require('supports-color');\nconst {\n\tstringReplaceAll,\n\tstringEncaseCRLFWithFirstIndex\n} = require('./util');\n\nconst {isArray} = Array;\n\n// `supportsColor.level` → `ansiStyles.color[name]` mapping\nconst levelMapping = [\n\t'ansi',\n\t'ansi',\n\t'ansi256',\n\t'ansi16m'\n];\n\nconst styles = Object.create(null);\n\nconst applyOptions = (object, options = {}) => {\n\tif (options.level && !(Number.isInteger(options.level) && options.level >= 0 && options.level <= 3)) {\n\t\tthrow new Error('The `level` option should be an integer from 0 to 3');\n\t}\n\n\t// Detect level if not set manually\n\tconst colorLevel = stdoutColor ? stdoutColor.level : 0;\n\tobject.level = options.level === undefined ? colorLevel : options.level;\n};\n\nclass ChalkClass {\n\tconstructor(options) {\n\t\t// eslint-disable-next-line no-constructor-return\n\t\treturn chalkFactory(options);\n\t}\n}\n\nconst chalkFactory = options => {\n\tconst chalk = {};\n\tapplyOptions(chalk, options);\n\n\tchalk.template = (...arguments_) => chalkTag(chalk.template, ...arguments_);\n\n\tObject.setPrototypeOf(chalk, Chalk.prototype);\n\tObject.setPrototypeOf(chalk.template, chalk);\n\n\tchalk.template.constructor = () => {\n\t\tthrow new Error('`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.');\n\t};\n\n\tchalk.template.Instance = ChalkClass;\n\n\treturn chalk.template;\n};\n\nfunction Chalk(options) {\n\treturn chalkFactory(options);\n}\n\nfor (const [styleName, style] of Object.entries(ansiStyles)) {\n\tstyles[styleName] = {\n\t\tget() {\n\t\t\tconst builder = createBuilder(this, createStyler(style.open, style.close, this._styler), this._isEmpty);\n\t\t\tObject.defineProperty(this, styleName, {value: builder});\n\t\t\treturn builder;\n\t\t}\n\t};\n}\n\nstyles.visible = {\n\tget() {\n\t\tconst builder = createBuilder(this, this._styler, true);\n\t\tObject.defineProperty(this, 'visible', {value: builder});\n\t\treturn builder;\n\t}\n};\n\nconst usedModels = ['rgb', 'hex', 'keyword', 'hsl', 'hsv', 'hwb', 'ansi', 'ansi256'];\n\nfor (const model of usedModels) {\n\tstyles[model] = {\n\t\tget() {\n\t\t\tconst {level} = this;\n\t\t\treturn function (...arguments_) {\n\t\t\t\tconst styler = createStyler(ansiStyles.color[levelMapping[level]][model](...arguments_), ansiStyles.color.close, this._styler);\n\t\t\t\treturn createBuilder(this, styler, this._isEmpty);\n\t\t\t};\n\t\t}\n\t};\n}\n\nfor (const model of usedModels) {\n\tconst bgModel = 'bg' + model[0].toUpperCase() + model.slice(1);\n\tstyles[bgModel] = {\n\t\tget() {\n\t\t\tconst {level} = this;\n\t\t\treturn function (...arguments_) {\n\t\t\t\tconst styler = createStyler(ansiStyles.bgColor[levelMapping[level]][model](...arguments_), ansiStyles.bgColor.close, this._styler);\n\t\t\t\treturn createBuilder(this, styler, this._isEmpty);\n\t\t\t};\n\t\t}\n\t};\n}\n\nconst proto = Object.defineProperties(() => {}, {\n\t...styles,\n\tlevel: {\n\t\tenumerable: true,\n\t\tget() {\n\t\t\treturn this._generator.level;\n\t\t},\n\t\tset(level) {\n\t\t\tthis._generator.level = level;\n\t\t}\n\t}\n});\n\nconst createStyler = (open, close, parent) => {\n\tlet openAll;\n\tlet closeAll;\n\tif (parent === undefined) {\n\t\topenAll = open;\n\t\tcloseAll = close;\n\t} else {\n\t\topenAll = parent.openAll + open;\n\t\tcloseAll = close + parent.closeAll;\n\t}\n\n\treturn {\n\t\topen,\n\t\tclose,\n\t\topenAll,\n\t\tcloseAll,\n\t\tparent\n\t};\n};\n\nconst createBuilder = (self, _styler, _isEmpty) => {\n\tconst builder = (...arguments_) => {\n\t\tif (isArray(arguments_[0]) && isArray(arguments_[0].raw)) {\n\t\t\t// Called as a template literal, for example: chalk.red`2 + 3 = {bold ${2+3}}`\n\t\t\treturn applyStyle(builder, chalkTag(builder, ...arguments_));\n\t\t}\n\n\t\t// Single argument is hot path, implicit coercion is faster than anything\n\t\t// eslint-disable-next-line no-implicit-coercion\n\t\treturn applyStyle(builder, (arguments_.length === 1) ? ('' + arguments_[0]) : arguments_.join(' '));\n\t};\n\n\t// We alter the prototype because we must return a function, but there is\n\t// no way to create a function with a different prototype\n\tObject.setPrototypeOf(builder, proto);\n\n\tbuilder._generator = self;\n\tbuilder._styler = _styler;\n\tbuilder._isEmpty = _isEmpty;\n\n\treturn builder;\n};\n\nconst applyStyle = (self, string) => {\n\tif (self.level <= 0 || !string) {\n\t\treturn self._isEmpty ? '' : string;\n\t}\n\n\tlet styler = self._styler;\n\n\tif (styler === undefined) {\n\t\treturn string;\n\t}\n\n\tconst {openAll, closeAll} = styler;\n\tif (string.indexOf('\\u001B') !== -1) {\n\t\twhile (styler !== undefined) {\n\t\t\t// Replace any instances already present with a re-opening code\n\t\t\t// otherwise only the part of the string until said closing code\n\t\t\t// will be colored, and the rest will simply be 'plain'.\n\t\t\tstring = stringReplaceAll(string, styler.close, styler.open);\n\n\t\t\tstyler = styler.parent;\n\t\t}\n\t}\n\n\t// We can move both next actions out of loop, because remaining actions in loop won't have\n\t// any/visible effect on parts we add here. Close the styling before a linebreak and reopen\n\t// after next line to fix a bleed issue on macOS: https://github.com/chalk/chalk/pull/92\n\tconst lfIndex = string.indexOf('\\n');\n\tif (lfIndex !== -1) {\n\t\tstring = stringEncaseCRLFWithFirstIndex(string, closeAll, openAll, lfIndex);\n\t}\n\n\treturn openAll + string + closeAll;\n};\n\nlet template;\nconst chalkTag = (chalk, ...strings) => {\n\tconst [firstString] = strings;\n\n\tif (!isArray(firstString) || !isArray(firstString.raw)) {\n\t\t// If chalk() was called by itself or with a string,\n\t\t// return the string itself as a string.\n\t\treturn strings.join(' ');\n\t}\n\n\tconst arguments_ = strings.slice(1);\n\tconst parts = [firstString.raw[0]];\n\n\tfor (let i = 1; i < firstString.length; i++) {\n\t\tparts.push(\n\t\t\tString(arguments_[i - 1]).replace(/[{}\\\\]/g, '\\\\$&'),\n\t\t\tString(firstString.raw[i])\n\t\t);\n\t}\n\n\tif (template === undefined) {\n\t\ttemplate = require('./templates');\n\t}\n\n\treturn template(chalk, parts.join(''));\n};\n\nObject.defineProperties(Chalk.prototype, styles);\n\nconst chalk = Chalk(); // eslint-disable-line new-cap\nchalk.supportsColor = stdoutColor;\nchalk.stderr = Chalk({level: stderrColor ? stderrColor.level : 0}); // eslint-disable-line new-cap\nchalk.stderr.supportsColor = stderrColor;\n\nmodule.exports = chalk;\n","'use strict';\nconst TEMPLATE_REGEX = /(?:\\\\(u(?:[a-f\\d]{4}|\\{[a-f\\d]{1,6}\\})|x[a-f\\d]{2}|.))|(?:\\{(~)?(\\w+(?:\\([^)]*\\))?(?:\\.\\w+(?:\\([^)]*\\))?)*)(?:[ \\t]|(?=\\r?\\n)))|(\\})|((?:.|[\\r\\n\\f])+?)/gi;\nconst STYLE_REGEX = /(?:^|\\.)(\\w+)(?:\\(([^)]*)\\))?/g;\nconst STRING_REGEX = /^(['\"])((?:\\\\.|(?!\\1)[^\\\\])*)\\1$/;\nconst ESCAPE_REGEX = /\\\\(u(?:[a-f\\d]{4}|{[a-f\\d]{1,6}})|x[a-f\\d]{2}|.)|([^\\\\])/gi;\n\nconst ESCAPES = new Map([\n\t['n', '\\n'],\n\t['r', '\\r'],\n\t['t', '\\t'],\n\t['b', '\\b'],\n\t['f', '\\f'],\n\t['v', '\\v'],\n\t['0', '\\0'],\n\t['\\\\', '\\\\'],\n\t['e', '\\u001B'],\n\t['a', '\\u0007']\n]);\n\nfunction unescape(c) {\n\tconst u = c[0] === 'u';\n\tconst bracket = c[1] === '{';\n\n\tif ((u && !bracket && c.length === 5) || (c[0] === 'x' && c.length === 3)) {\n\t\treturn String.fromCharCode(parseInt(c.slice(1), 16));\n\t}\n\n\tif (u && bracket) {\n\t\treturn String.fromCodePoint(parseInt(c.slice(2, -1), 16));\n\t}\n\n\treturn ESCAPES.get(c) || c;\n}\n\nfunction parseArguments(name, arguments_) {\n\tconst results = [];\n\tconst chunks = arguments_.trim().split(/\\s*,\\s*/g);\n\tlet matches;\n\n\tfor (const chunk of chunks) {\n\t\tconst number = Number(chunk);\n\t\tif (!Number.isNaN(number)) {\n\t\t\tresults.push(number);\n\t\t} else if ((matches = chunk.match(STRING_REGEX))) {\n\t\t\tresults.push(matches[2].replace(ESCAPE_REGEX, (m, escape, character) => escape ? unescape(escape) : character));\n\t\t} else {\n\t\t\tthrow new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`);\n\t\t}\n\t}\n\n\treturn results;\n}\n\nfunction parseStyle(style) {\n\tSTYLE_REGEX.lastIndex = 0;\n\n\tconst results = [];\n\tlet matches;\n\n\twhile ((matches = STYLE_REGEX.exec(style)) !== null) {\n\t\tconst name = matches[1];\n\n\t\tif (matches[2]) {\n\t\t\tconst args = parseArguments(name, matches[2]);\n\t\t\tresults.push([name].concat(args));\n\t\t} else {\n\t\t\tresults.push([name]);\n\t\t}\n\t}\n\n\treturn results;\n}\n\nfunction buildStyle(chalk, styles) {\n\tconst enabled = {};\n\n\tfor (const layer of styles) {\n\t\tfor (const style of layer.styles) {\n\t\t\tenabled[style[0]] = layer.inverse ? null : style.slice(1);\n\t\t}\n\t}\n\n\tlet current = chalk;\n\tfor (const [styleName, styles] of Object.entries(enabled)) {\n\t\tif (!Array.isArray(styles)) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tif (!(styleName in current)) {\n\t\t\tthrow new Error(`Unknown Chalk style: ${styleName}`);\n\t\t}\n\n\t\tcurrent = styles.length > 0 ? current[styleName](...styles) : current[styleName];\n\t}\n\n\treturn current;\n}\n\nmodule.exports = (chalk, temporary) => {\n\tconst styles = [];\n\tconst chunks = [];\n\tlet chunk = [];\n\n\t// eslint-disable-next-line max-params\n\ttemporary.replace(TEMPLATE_REGEX, (m, escapeCharacter, inverse, style, close, character) => {\n\t\tif (escapeCharacter) {\n\t\t\tchunk.push(unescape(escapeCharacter));\n\t\t} else if (style) {\n\t\t\tconst string = chunk.join('');\n\t\t\tchunk = [];\n\t\t\tchunks.push(styles.length === 0 ? string : buildStyle(chalk, styles)(string));\n\t\t\tstyles.push({inverse, styles: parseStyle(style)});\n\t\t} else if (close) {\n\t\t\tif (styles.length === 0) {\n\t\t\t\tthrow new Error('Found extraneous } in Chalk template literal');\n\t\t\t}\n\n\t\t\tchunks.push(buildStyle(chalk, styles)(chunk.join('')));\n\t\t\tchunk = [];\n\t\t\tstyles.pop();\n\t\t} else {\n\t\t\tchunk.push(character);\n\t\t}\n\t});\n\n\tchunks.push(chunk.join(''));\n\n\tif (styles.length > 0) {\n\t\tconst errMessage = `Chalk template literal is missing ${styles.length} closing bracket${styles.length === 1 ? '' : 's'} (\\`}\\`)`;\n\t\tthrow new Error(errMessage);\n\t}\n\n\treturn chunks.join('');\n};\n","'use strict';\n\nconst stringReplaceAll = (string, substring, replacer) => {\n\tlet index = string.indexOf(substring);\n\tif (index === -1) {\n\t\treturn string;\n\t}\n\n\tconst substringLength = substring.length;\n\tlet endIndex = 0;\n\tlet returnValue = '';\n\tdo {\n\t\treturnValue += string.substr(endIndex, index - endIndex) + substring + replacer;\n\t\tendIndex = index + substringLength;\n\t\tindex = string.indexOf(substring, endIndex);\n\t} while (index !== -1);\n\n\treturnValue += string.substr(endIndex);\n\treturn returnValue;\n};\n\nconst stringEncaseCRLFWithFirstIndex = (string, prefix, postfix, index) => {\n\tlet endIndex = 0;\n\tlet returnValue = '';\n\tdo {\n\t\tconst gotCR = string[index - 1] === '\\r';\n\t\treturnValue += string.substr(endIndex, (gotCR ? index - 1 : index) - endIndex) + prefix + (gotCR ? '\\r\\n' : '\\n') + postfix;\n\t\tendIndex = index + 1;\n\t\tindex = string.indexOf('\\n', endIndex);\n\t} while (index !== -1);\n\n\treturnValue += string.substr(endIndex);\n\treturn returnValue;\n};\n\nmodule.exports = {\n\tstringReplaceAll,\n\tstringEncaseCRLFWithFirstIndex\n};\n","/* MIT license */\n/* eslint-disable no-mixed-operators */\nconst cssKeywords = require('color-name');\n\n// NOTE: conversions should only return primitive values (i.e. arrays, or\n// values that give correct `typeof` results).\n// do not use box values types (i.e. Number(), String(), etc.)\n\nconst reverseKeywords = {};\nfor (const key of Object.keys(cssKeywords)) {\n\treverseKeywords[cssKeywords[key]] = key;\n}\n\nconst convert = {\n\trgb: {channels: 3, labels: 'rgb'},\n\thsl: {channels: 3, labels: 'hsl'},\n\thsv: {channels: 3, labels: 'hsv'},\n\thwb: {channels: 3, labels: 'hwb'},\n\tcmyk: {channels: 4, labels: 'cmyk'},\n\txyz: {channels: 3, labels: 'xyz'},\n\tlab: {channels: 3, labels: 'lab'},\n\tlch: {channels: 3, labels: 'lch'},\n\thex: {channels: 1, labels: ['hex']},\n\tkeyword: {channels: 1, labels: ['keyword']},\n\tansi16: {channels: 1, labels: ['ansi16']},\n\tansi256: {channels: 1, labels: ['ansi256']},\n\thcg: {channels: 3, labels: ['h', 'c', 'g']},\n\tapple: {channels: 3, labels: ['r16', 'g16', 'b16']},\n\tgray: {channels: 1, labels: ['gray']}\n};\n\nmodule.exports = convert;\n\n// Hide .channels and .labels properties\nfor (const model of Object.keys(convert)) {\n\tif (!('channels' in convert[model])) {\n\t\tthrow new Error('missing channels property: ' + model);\n\t}\n\n\tif (!('labels' in convert[model])) {\n\t\tthrow new Error('missing channel labels property: ' + model);\n\t}\n\n\tif (convert[model].labels.length !== convert[model].channels) {\n\t\tthrow new Error('channel and label counts mismatch: ' + model);\n\t}\n\n\tconst {channels, labels} = convert[model];\n\tdelete convert[model].channels;\n\tdelete convert[model].labels;\n\tObject.defineProperty(convert[model], 'channels', {value: channels});\n\tObject.defineProperty(convert[model], 'labels', {value: labels});\n}\n\nconvert.rgb.hsl = function (rgb) {\n\tconst r = rgb[0] / 255;\n\tconst g = rgb[1] / 255;\n\tconst b = rgb[2] / 255;\n\tconst min = Math.min(r, g, b);\n\tconst max = Math.max(r, g, b);\n\tconst delta = max - min;\n\tlet h;\n\tlet s;\n\n\tif (max === min) {\n\t\th = 0;\n\t} else if (r === max) {\n\t\th = (g - b) / delta;\n\t} else if (g === max) {\n\t\th = 2 + (b - r) / delta;\n\t} else if (b === max) {\n\t\th = 4 + (r - g) / delta;\n\t}\n\n\th = Math.min(h * 60, 360);\n\n\tif (h < 0) {\n\t\th += 360;\n\t}\n\n\tconst l = (min + max) / 2;\n\n\tif (max === min) {\n\t\ts = 0;\n\t} else if (l <= 0.5) {\n\t\ts = delta / (max + min);\n\t} else {\n\t\ts = delta / (2 - max - min);\n\t}\n\n\treturn [h, s * 100, l * 100];\n};\n\nconvert.rgb.hsv = function (rgb) {\n\tlet rdif;\n\tlet gdif;\n\tlet bdif;\n\tlet h;\n\tlet s;\n\n\tconst r = rgb[0] / 255;\n\tconst g = rgb[1] / 255;\n\tconst b = rgb[2] / 255;\n\tconst v = Math.max(r, g, b);\n\tconst diff = v - Math.min(r, g, b);\n\tconst diffc = function (c) {\n\t\treturn (v - c) / 6 / diff + 1 / 2;\n\t};\n\n\tif (diff === 0) {\n\t\th = 0;\n\t\ts = 0;\n\t} else {\n\t\ts = diff / v;\n\t\trdif = diffc(r);\n\t\tgdif = diffc(g);\n\t\tbdif = diffc(b);\n\n\t\tif (r === v) {\n\t\t\th = bdif - gdif;\n\t\t} else if (g === v) {\n\t\t\th = (1 / 3) + rdif - bdif;\n\t\t} else if (b === v) {\n\t\t\th = (2 / 3) + gdif - rdif;\n\t\t}\n\n\t\tif (h < 0) {\n\t\t\th += 1;\n\t\t} else if (h > 1) {\n\t\t\th -= 1;\n\t\t}\n\t}\n\n\treturn [\n\t\th * 360,\n\t\ts * 100,\n\t\tv * 100\n\t];\n};\n\nconvert.rgb.hwb = function (rgb) {\n\tconst r = rgb[0];\n\tconst g = rgb[1];\n\tlet b = rgb[2];\n\tconst h = convert.rgb.hsl(rgb)[0];\n\tconst w = 1 / 255 * Math.min(r, Math.min(g, b));\n\n\tb = 1 - 1 / 255 * Math.max(r, Math.max(g, b));\n\n\treturn [h, w * 100, b * 100];\n};\n\nconvert.rgb.cmyk = function (rgb) {\n\tconst r = rgb[0] / 255;\n\tconst g = rgb[1] / 255;\n\tconst b = rgb[2] / 255;\n\n\tconst k = Math.min(1 - r, 1 - g, 1 - b);\n\tconst c = (1 - r - k) / (1 - k) || 0;\n\tconst m = (1 - g - k) / (1 - k) || 0;\n\tconst y = (1 - b - k) / (1 - k) || 0;\n\n\treturn [c * 100, m * 100, y * 100, k * 100];\n};\n\nfunction comparativeDistance(x, y) {\n\t/*\n\t\tSee https://en.m.wikipedia.org/wiki/Euclidean_distance#Squared_Euclidean_distance\n\t*/\n\treturn (\n\t\t((x[0] - y[0]) ** 2) +\n\t\t((x[1] - y[1]) ** 2) +\n\t\t((x[2] - y[2]) ** 2)\n\t);\n}\n\nconvert.rgb.keyword = function (rgb) {\n\tconst reversed = reverseKeywords[rgb];\n\tif (reversed) {\n\t\treturn reversed;\n\t}\n\n\tlet currentClosestDistance = Infinity;\n\tlet currentClosestKeyword;\n\n\tfor (const keyword of Object.keys(cssKeywords)) {\n\t\tconst value = cssKeywords[keyword];\n\n\t\t// Compute comparative distance\n\t\tconst distance = comparativeDistance(rgb, value);\n\n\t\t// Check if its less, if so set as closest\n\t\tif (distance < currentClosestDistance) {\n\t\t\tcurrentClosestDistance = distance;\n\t\t\tcurrentClosestKeyword = keyword;\n\t\t}\n\t}\n\n\treturn currentClosestKeyword;\n};\n\nconvert.keyword.rgb = function (keyword) {\n\treturn cssKeywords[keyword];\n};\n\nconvert.rgb.xyz = function (rgb) {\n\tlet r = rgb[0] / 255;\n\tlet g = rgb[1] / 255;\n\tlet b = rgb[2] / 255;\n\n\t// Assume sRGB\n\tr = r > 0.04045 ? (((r + 0.055) / 1.055) ** 2.4) : (r / 12.92);\n\tg = g > 0.04045 ? (((g + 0.055) / 1.055) ** 2.4) : (g / 12.92);\n\tb = b > 0.04045 ? (((b + 0.055) / 1.055) ** 2.4) : (b / 12.92);\n\n\tconst x = (r * 0.4124) + (g * 0.3576) + (b * 0.1805);\n\tconst y = (r * 0.2126) + (g * 0.7152) + (b * 0.0722);\n\tconst z = (r * 0.0193) + (g * 0.1192) + (b * 0.9505);\n\n\treturn [x * 100, y * 100, z * 100];\n};\n\nconvert.rgb.lab = function (rgb) {\n\tconst xyz = convert.rgb.xyz(rgb);\n\tlet x = xyz[0];\n\tlet y = xyz[1];\n\tlet z = xyz[2];\n\n\tx /= 95.047;\n\ty /= 100;\n\tz /= 108.883;\n\n\tx = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116);\n\ty = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116);\n\tz = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116);\n\n\tconst l = (116 * y) - 16;\n\tconst a = 500 * (x - y);\n\tconst b = 200 * (y - z);\n\n\treturn [l, a, b];\n};\n\nconvert.hsl.rgb = function (hsl) {\n\tconst h = hsl[0] / 360;\n\tconst s = hsl[1] / 100;\n\tconst l = hsl[2] / 100;\n\tlet t2;\n\tlet t3;\n\tlet val;\n\n\tif (s === 0) {\n\t\tval = l * 255;\n\t\treturn [val, val, val];\n\t}\n\n\tif (l < 0.5) {\n\t\tt2 = l * (1 + s);\n\t} else {\n\t\tt2 = l + s - l * s;\n\t}\n\n\tconst t1 = 2 * l - t2;\n\n\tconst rgb = [0, 0, 0];\n\tfor (let i = 0; i < 3; i++) {\n\t\tt3 = h + 1 / 3 * -(i - 1);\n\t\tif (t3 < 0) {\n\t\t\tt3++;\n\t\t}\n\n\t\tif (t3 > 1) {\n\t\t\tt3--;\n\t\t}\n\n\t\tif (6 * t3 < 1) {\n\t\t\tval = t1 + (t2 - t1) * 6 * t3;\n\t\t} else if (2 * t3 < 1) {\n\t\t\tval = t2;\n\t\t} else if (3 * t3 < 2) {\n\t\t\tval = t1 + (t2 - t1) * (2 / 3 - t3) * 6;\n\t\t} else {\n\t\t\tval = t1;\n\t\t}\n\n\t\trgb[i] = val * 255;\n\t}\n\n\treturn rgb;\n};\n\nconvert.hsl.hsv = function (hsl) {\n\tconst h = hsl[0];\n\tlet s = hsl[1] / 100;\n\tlet l = hsl[2] / 100;\n\tlet smin = s;\n\tconst lmin = Math.max(l, 0.01);\n\n\tl *= 2;\n\ts *= (l <= 1) ? l : 2 - l;\n\tsmin *= lmin <= 1 ? lmin : 2 - lmin;\n\tconst v = (l + s) / 2;\n\tconst sv = l === 0 ? (2 * smin) / (lmin + smin) : (2 * s) / (l + s);\n\n\treturn [h, sv * 100, v * 100];\n};\n\nconvert.hsv.rgb = function (hsv) {\n\tconst h = hsv[0] / 60;\n\tconst s = hsv[1] / 100;\n\tlet v = hsv[2] / 100;\n\tconst hi = Math.floor(h) % 6;\n\n\tconst f = h - Math.floor(h);\n\tconst p = 255 * v * (1 - s);\n\tconst q = 255 * v * (1 - (s * f));\n\tconst t = 255 * v * (1 - (s * (1 - f)));\n\tv *= 255;\n\n\tswitch (hi) {\n\t\tcase 0:\n\t\t\treturn [v, t, p];\n\t\tcase 1:\n\t\t\treturn [q, v, p];\n\t\tcase 2:\n\t\t\treturn [p, v, t];\n\t\tcase 3:\n\t\t\treturn [p, q, v];\n\t\tcase 4:\n\t\t\treturn [t, p, v];\n\t\tcase 5:\n\t\t\treturn [v, p, q];\n\t}\n};\n\nconvert.hsv.hsl = function (hsv) {\n\tconst h = hsv[0];\n\tconst s = hsv[1] / 100;\n\tconst v = hsv[2] / 100;\n\tconst vmin = Math.max(v, 0.01);\n\tlet sl;\n\tlet l;\n\n\tl = (2 - s) * v;\n\tconst lmin = (2 - s) * vmin;\n\tsl = s * vmin;\n\tsl /= (lmin <= 1) ? lmin : 2 - lmin;\n\tsl = sl || 0;\n\tl /= 2;\n\n\treturn [h, sl * 100, l * 100];\n};\n\n// http://dev.w3.org/csswg/css-color/#hwb-to-rgb\nconvert.hwb.rgb = function (hwb) {\n\tconst h = hwb[0] / 360;\n\tlet wh = hwb[1] / 100;\n\tlet bl = hwb[2] / 100;\n\tconst ratio = wh + bl;\n\tlet f;\n\n\t// Wh + bl cant be > 1\n\tif (ratio > 1) {\n\t\twh /= ratio;\n\t\tbl /= ratio;\n\t}\n\n\tconst i = Math.floor(6 * h);\n\tconst v = 1 - bl;\n\tf = 6 * h - i;\n\n\tif ((i & 0x01) !== 0) {\n\t\tf = 1 - f;\n\t}\n\n\tconst n = wh + f * (v - wh); // Linear interpolation\n\n\tlet r;\n\tlet g;\n\tlet b;\n\t/* eslint-disable max-statements-per-line,no-multi-spaces */\n\tswitch (i) {\n\t\tdefault:\n\t\tcase 6:\n\t\tcase 0: r = v; g = n; b = wh; break;\n\t\tcase 1: r = n; g = v; b = wh; break;\n\t\tcase 2: r = wh; g = v; b = n; break;\n\t\tcase 3: r = wh; g = n; b = v; break;\n\t\tcase 4: r = n; g = wh; b = v; break;\n\t\tcase 5: r = v; g = wh; b = n; break;\n\t}\n\t/* eslint-enable max-statements-per-line,no-multi-spaces */\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.cmyk.rgb = function (cmyk) {\n\tconst c = cmyk[0] / 100;\n\tconst m = cmyk[1] / 100;\n\tconst y = cmyk[2] / 100;\n\tconst k = cmyk[3] / 100;\n\n\tconst r = 1 - Math.min(1, c * (1 - k) + k);\n\tconst g = 1 - Math.min(1, m * (1 - k) + k);\n\tconst b = 1 - Math.min(1, y * (1 - k) + k);\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.xyz.rgb = function (xyz) {\n\tconst x = xyz[0] / 100;\n\tconst y = xyz[1] / 100;\n\tconst z = xyz[2] / 100;\n\tlet r;\n\tlet g;\n\tlet b;\n\n\tr = (x * 3.2406) + (y * -1.5372) + (z * -0.4986);\n\tg = (x * -0.9689) + (y * 1.8758) + (z * 0.0415);\n\tb = (x * 0.0557) + (y * -0.2040) + (z * 1.0570);\n\n\t// Assume sRGB\n\tr = r > 0.0031308\n\t\t? ((1.055 * (r ** (1.0 / 2.4))) - 0.055)\n\t\t: r * 12.92;\n\n\tg = g > 0.0031308\n\t\t? ((1.055 * (g ** (1.0 / 2.4))) - 0.055)\n\t\t: g * 12.92;\n\n\tb = b > 0.0031308\n\t\t? ((1.055 * (b ** (1.0 / 2.4))) - 0.055)\n\t\t: b * 12.92;\n\n\tr = Math.min(Math.max(0, r), 1);\n\tg = Math.min(Math.max(0, g), 1);\n\tb = Math.min(Math.max(0, b), 1);\n\n\treturn [r * 255, g * 255, b * 255];\n};\n\nconvert.xyz.lab = function (xyz) {\n\tlet x = xyz[0];\n\tlet y = xyz[1];\n\tlet z = xyz[2];\n\n\tx /= 95.047;\n\ty /= 100;\n\tz /= 108.883;\n\n\tx = x > 0.008856 ? (x ** (1 / 3)) : (7.787 * x) + (16 / 116);\n\ty = y > 0.008856 ? (y ** (1 / 3)) : (7.787 * y) + (16 / 116);\n\tz = z > 0.008856 ? (z ** (1 / 3)) : (7.787 * z) + (16 / 116);\n\n\tconst l = (116 * y) - 16;\n\tconst a = 500 * (x - y);\n\tconst b = 200 * (y - z);\n\n\treturn [l, a, b];\n};\n\nconvert.lab.xyz = function (lab) {\n\tconst l = lab[0];\n\tconst a = lab[1];\n\tconst b = lab[2];\n\tlet x;\n\tlet y;\n\tlet z;\n\n\ty = (l + 16) / 116;\n\tx = a / 500 + y;\n\tz = y - b / 200;\n\n\tconst y2 = y ** 3;\n\tconst x2 = x ** 3;\n\tconst z2 = z ** 3;\n\ty = y2 > 0.008856 ? y2 : (y - 16 / 116) / 7.787;\n\tx = x2 > 0.008856 ? x2 : (x - 16 / 116) / 7.787;\n\tz = z2 > 0.008856 ? z2 : (z - 16 / 116) / 7.787;\n\n\tx *= 95.047;\n\ty *= 100;\n\tz *= 108.883;\n\n\treturn [x, y, z];\n};\n\nconvert.lab.lch = function (lab) {\n\tconst l = lab[0];\n\tconst a = lab[1];\n\tconst b = lab[2];\n\tlet h;\n\n\tconst hr = Math.atan2(b, a);\n\th = hr * 360 / 2 / Math.PI;\n\n\tif (h < 0) {\n\t\th += 360;\n\t}\n\n\tconst c = Math.sqrt(a * a + b * b);\n\n\treturn [l, c, h];\n};\n\nconvert.lch.lab = function (lch) {\n\tconst l = lch[0];\n\tconst c = lch[1];\n\tconst h = lch[2];\n\n\tconst hr = h / 360 * 2 * Math.PI;\n\tconst a = c * Math.cos(hr);\n\tconst b = c * Math.sin(hr);\n\n\treturn [l, a, b];\n};\n\nconvert.rgb.ansi16 = function (args, saturation = null) {\n\tconst [r, g, b] = args;\n\tlet value = saturation === null ? convert.rgb.hsv(args)[2] : saturation; // Hsv -> ansi16 optimization\n\n\tvalue = Math.round(value / 50);\n\n\tif (value === 0) {\n\t\treturn 30;\n\t}\n\n\tlet ansi = 30\n\t\t+ ((Math.round(b / 255) << 2)\n\t\t| (Math.round(g / 255) << 1)\n\t\t| Math.round(r / 255));\n\n\tif (value === 2) {\n\t\tansi += 60;\n\t}\n\n\treturn ansi;\n};\n\nconvert.hsv.ansi16 = function (args) {\n\t// Optimization here; we already know the value and don't need to get\n\t// it converted for us.\n\treturn convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);\n};\n\nconvert.rgb.ansi256 = function (args) {\n\tconst r = args[0];\n\tconst g = args[1];\n\tconst b = args[2];\n\n\t// We use the extended greyscale palette here, with the exception of\n\t// black and white. normal palette only has 4 greyscale shades.\n\tif (r === g && g === b) {\n\t\tif (r < 8) {\n\t\t\treturn 16;\n\t\t}\n\n\t\tif (r > 248) {\n\t\t\treturn 231;\n\t\t}\n\n\t\treturn Math.round(((r - 8) / 247) * 24) + 232;\n\t}\n\n\tconst ansi = 16\n\t\t+ (36 * Math.round(r / 255 * 5))\n\t\t+ (6 * Math.round(g / 255 * 5))\n\t\t+ Math.round(b / 255 * 5);\n\n\treturn ansi;\n};\n\nconvert.ansi16.rgb = function (args) {\n\tlet color = args % 10;\n\n\t// Handle greyscale\n\tif (color === 0 || color === 7) {\n\t\tif (args > 50) {\n\t\t\tcolor += 3.5;\n\t\t}\n\n\t\tcolor = color / 10.5 * 255;\n\n\t\treturn [color, color, color];\n\t}\n\n\tconst mult = (~~(args > 50) + 1) * 0.5;\n\tconst r = ((color & 1) * mult) * 255;\n\tconst g = (((color >> 1) & 1) * mult) * 255;\n\tconst b = (((color >> 2) & 1) * mult) * 255;\n\n\treturn [r, g, b];\n};\n\nconvert.ansi256.rgb = function (args) {\n\t// Handle greyscale\n\tif (args >= 232) {\n\t\tconst c = (args - 232) * 10 + 8;\n\t\treturn [c, c, c];\n\t}\n\n\targs -= 16;\n\n\tlet rem;\n\tconst r = Math.floor(args / 36) / 5 * 255;\n\tconst g = Math.floor((rem = args % 36) / 6) / 5 * 255;\n\tconst b = (rem % 6) / 5 * 255;\n\n\treturn [r, g, b];\n};\n\nconvert.rgb.hex = function (args) {\n\tconst integer = ((Math.round(args[0]) & 0xFF) << 16)\n\t\t+ ((Math.round(args[1]) & 0xFF) << 8)\n\t\t+ (Math.round(args[2]) & 0xFF);\n\n\tconst string = integer.toString(16).toUpperCase();\n\treturn '000000'.substring(string.length) + string;\n};\n\nconvert.hex.rgb = function (args) {\n\tconst match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);\n\tif (!match) {\n\t\treturn [0, 0, 0];\n\t}\n\n\tlet colorString = match[0];\n\n\tif (match[0].length === 3) {\n\t\tcolorString = colorString.split('').map(char => {\n\t\t\treturn char + char;\n\t\t}).join('');\n\t}\n\n\tconst integer = parseInt(colorString, 16);\n\tconst r = (integer >> 16) & 0xFF;\n\tconst g = (integer >> 8) & 0xFF;\n\tconst b = integer & 0xFF;\n\n\treturn [r, g, b];\n};\n\nconvert.rgb.hcg = function (rgb) {\n\tconst r = rgb[0] / 255;\n\tconst g = rgb[1] / 255;\n\tconst b = rgb[2] / 255;\n\tconst max = Math.max(Math.max(r, g), b);\n\tconst min = Math.min(Math.min(r, g), b);\n\tconst chroma = (max - min);\n\tlet grayscale;\n\tlet hue;\n\n\tif (chroma < 1) {\n\t\tgrayscale = min / (1 - chroma);\n\t} else {\n\t\tgrayscale = 0;\n\t}\n\n\tif (chroma <= 0) {\n\t\thue = 0;\n\t} else\n\tif (max === r) {\n\t\thue = ((g - b) / chroma) % 6;\n\t} else\n\tif (max === g) {\n\t\thue = 2 + (b - r) / chroma;\n\t} else {\n\t\thue = 4 + (r - g) / chroma;\n\t}\n\n\thue /= 6;\n\thue %= 1;\n\n\treturn [hue * 360, chroma * 100, grayscale * 100];\n};\n\nconvert.hsl.hcg = function (hsl) {\n\tconst s = hsl[1] / 100;\n\tconst l = hsl[2] / 100;\n\n\tconst c = l < 0.5 ? (2.0 * s * l) : (2.0 * s * (1.0 - l));\n\n\tlet f = 0;\n\tif (c < 1.0) {\n\t\tf = (l - 0.5 * c) / (1.0 - c);\n\t}\n\n\treturn [hsl[0], c * 100, f * 100];\n};\n\nconvert.hsv.hcg = function (hsv) {\n\tconst s = hsv[1] / 100;\n\tconst v = hsv[2] / 100;\n\n\tconst c = s * v;\n\tlet f = 0;\n\n\tif (c < 1.0) {\n\t\tf = (v - c) / (1 - c);\n\t}\n\n\treturn [hsv[0], c * 100, f * 100];\n};\n\nconvert.hcg.rgb = function (hcg) {\n\tconst h = hcg[0] / 360;\n\tconst c = hcg[1] / 100;\n\tconst g = hcg[2] / 100;\n\n\tif (c === 0.0) {\n\t\treturn [g * 255, g * 255, g * 255];\n\t}\n\n\tconst pure = [0, 0, 0];\n\tconst hi = (h % 1) * 6;\n\tconst v = hi % 1;\n\tconst w = 1 - v;\n\tlet mg = 0;\n\n\t/* eslint-disable max-statements-per-line */\n\tswitch (Math.floor(hi)) {\n\t\tcase 0:\n\t\t\tpure[0] = 1; pure[1] = v; pure[2] = 0; break;\n\t\tcase 1:\n\t\t\tpure[0] = w; pure[1] = 1; pure[2] = 0; break;\n\t\tcase 2:\n\t\t\tpure[0] = 0; pure[1] = 1; pure[2] = v; break;\n\t\tcase 3:\n\t\t\tpure[0] = 0; pure[1] = w; pure[2] = 1; break;\n\t\tcase 4:\n\t\t\tpure[0] = v; pure[1] = 0; pure[2] = 1; break;\n\t\tdefault:\n\t\t\tpure[0] = 1; pure[1] = 0; pure[2] = w;\n\t}\n\t/* eslint-enable max-statements-per-line */\n\n\tmg = (1.0 - c) * g;\n\n\treturn [\n\t\t(c * pure[0] + mg) * 255,\n\t\t(c * pure[1] + mg) * 255,\n\t\t(c * pure[2] + mg) * 255\n\t];\n};\n\nconvert.hcg.hsv = function (hcg) {\n\tconst c = hcg[1] / 100;\n\tconst g = hcg[2] / 100;\n\n\tconst v = c + g * (1.0 - c);\n\tlet f = 0;\n\n\tif (v > 0.0) {\n\t\tf = c / v;\n\t}\n\n\treturn [hcg[0], f * 100, v * 100];\n};\n\nconvert.hcg.hsl = function (hcg) {\n\tconst c = hcg[1] / 100;\n\tconst g = hcg[2] / 100;\n\n\tconst l = g * (1.0 - c) + 0.5 * c;\n\tlet s = 0;\n\n\tif (l > 0.0 && l < 0.5) {\n\t\ts = c / (2 * l);\n\t} else\n\tif (l >= 0.5 && l < 1.0) {\n\t\ts = c / (2 * (1 - l));\n\t}\n\n\treturn [hcg[0], s * 100, l * 100];\n};\n\nconvert.hcg.hwb = function (hcg) {\n\tconst c = hcg[1] / 100;\n\tconst g = hcg[2] / 100;\n\tconst v = c + g * (1.0 - c);\n\treturn [hcg[0], (v - c) * 100, (1 - v) * 100];\n};\n\nconvert.hwb.hcg = function (hwb) {\n\tconst w = hwb[1] / 100;\n\tconst b = hwb[2] / 100;\n\tconst v = 1 - b;\n\tconst c = v - w;\n\tlet g = 0;\n\n\tif (c < 1) {\n\t\tg = (v - c) / (1 - c);\n\t}\n\n\treturn [hwb[0], c * 100, g * 100];\n};\n\nconvert.apple.rgb = function (apple) {\n\treturn [(apple[0] / 65535) * 255, (apple[1] / 65535) * 255, (apple[2] / 65535) * 255];\n};\n\nconvert.rgb.apple = function (rgb) {\n\treturn [(rgb[0] / 255) * 65535, (rgb[1] / 255) * 65535, (rgb[2] / 255) * 65535];\n};\n\nconvert.gray.rgb = function (args) {\n\treturn [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];\n};\n\nconvert.gray.hsl = function (args) {\n\treturn [0, 0, args[0]];\n};\n\nconvert.gray.hsv = convert.gray.hsl;\n\nconvert.gray.hwb = function (gray) {\n\treturn [0, 100, gray[0]];\n};\n\nconvert.gray.cmyk = function (gray) {\n\treturn [0, 0, 0, gray[0]];\n};\n\nconvert.gray.lab = function (gray) {\n\treturn [gray[0], 0, 0];\n};\n\nconvert.gray.hex = function (gray) {\n\tconst val = Math.round(gray[0] / 100 * 255) & 0xFF;\n\tconst integer = (val << 16) + (val << 8) + val;\n\n\tconst string = integer.toString(16).toUpperCase();\n\treturn '000000'.substring(string.length) + string;\n};\n\nconvert.rgb.gray = function (rgb) {\n\tconst val = (rgb[0] + rgb[1] + rgb[2]) / 3;\n\treturn [val / 255 * 100];\n};\n","const conversions = require('./conversions');\nconst route = require('./route');\n\nconst convert = {};\n\nconst models = Object.keys(conversions);\n\nfunction wrapRaw(fn) {\n\tconst wrappedFn = function (...args) {\n\t\tconst arg0 = args[0];\n\t\tif (arg0 === undefined || arg0 === null) {\n\t\t\treturn arg0;\n\t\t}\n\n\t\tif (arg0.length > 1) {\n\t\t\targs = arg0;\n\t\t}\n\n\t\treturn fn(args);\n\t};\n\n\t// Preserve .conversion property if there is one\n\tif ('conversion' in fn) {\n\t\twrappedFn.conversion = fn.conversion;\n\t}\n\n\treturn wrappedFn;\n}\n\nfunction wrapRounded(fn) {\n\tconst wrappedFn = function (...args) {\n\t\tconst arg0 = args[0];\n\n\t\tif (arg0 === undefined || arg0 === null) {\n\t\t\treturn arg0;\n\t\t}\n\n\t\tif (arg0.length > 1) {\n\t\t\targs = arg0;\n\t\t}\n\n\t\tconst result = fn(args);\n\n\t\t// We're assuming the result is an array here.\n\t\t// see notice in conversions.js; don't use box types\n\t\t// in conversion functions.\n\t\tif (typeof result === 'object') {\n\t\t\tfor (let len = result.length, i = 0; i < len; i++) {\n\t\t\t\tresult[i] = Math.round(result[i]);\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t};\n\n\t// Preserve .conversion property if there is one\n\tif ('conversion' in fn) {\n\t\twrappedFn.conversion = fn.conversion;\n\t}\n\n\treturn wrappedFn;\n}\n\nmodels.forEach(fromModel => {\n\tconvert[fromModel] = {};\n\n\tObject.defineProperty(convert[fromModel], 'channels', {value: conversions[fromModel].channels});\n\tObject.defineProperty(convert[fromModel], 'labels', {value: conversions[fromModel].labels});\n\n\tconst routes = route(fromModel);\n\tconst routeModels = Object.keys(routes);\n\n\trouteModels.forEach(toModel => {\n\t\tconst fn = routes[toModel];\n\n\t\tconvert[fromModel][toModel] = wrapRounded(fn);\n\t\tconvert[fromModel][toModel].raw = wrapRaw(fn);\n\t});\n});\n\nmodule.exports = convert;\n","const conversions = require('./conversions');\n\n/*\n\tThis function routes a model to all other models.\n\n\tall functions that are routed have a property `.conversion` attached\n\tto the returned synthetic function. This property is an array\n\tof strings, each with the steps in between the 'from' and 'to'\n\tcolor models (inclusive).\n\n\tconversions that are not possible simply are not included.\n*/\n\nfunction buildGraph() {\n\tconst graph = {};\n\t// https://jsperf.com/object-keys-vs-for-in-with-closure/3\n\tconst models = Object.keys(conversions);\n\n\tfor (let len = models.length, i = 0; i < len; i++) {\n\t\tgraph[models[i]] = {\n\t\t\t// http://jsperf.com/1-vs-infinity\n\t\t\t// micro-opt, but this is simple.\n\t\t\tdistance: -1,\n\t\t\tparent: null\n\t\t};\n\t}\n\n\treturn graph;\n}\n\n// https://en.wikipedia.org/wiki/Breadth-first_search\nfunction deriveBFS(fromModel) {\n\tconst graph = buildGraph();\n\tconst queue = [fromModel]; // Unshift -> queue -> pop\n\n\tgraph[fromModel].distance = 0;\n\n\twhile (queue.length) {\n\t\tconst current = queue.pop();\n\t\tconst adjacents = Object.keys(conversions[current]);\n\n\t\tfor (let len = adjacents.length, i = 0; i < len; i++) {\n\t\t\tconst adjacent = adjacents[i];\n\t\t\tconst node = graph[adjacent];\n\n\t\t\tif (node.distance === -1) {\n\t\t\t\tnode.distance = graph[current].distance + 1;\n\t\t\t\tnode.parent = current;\n\t\t\t\tqueue.unshift(adjacent);\n\t\t\t}\n\t\t}\n\t}\n\n\treturn graph;\n}\n\nfunction link(from, to) {\n\treturn function (args) {\n\t\treturn to(from(args));\n\t};\n}\n\nfunction wrapConversion(toModel, graph) {\n\tconst path = [graph[toModel].parent, toModel];\n\tlet fn = conversions[graph[toModel].parent][toModel];\n\n\tlet cur = graph[toModel].parent;\n\twhile (graph[cur].parent) {\n\t\tpath.unshift(graph[cur].parent);\n\t\tfn = link(conversions[graph[cur].parent][cur], fn);\n\t\tcur = graph[cur].parent;\n\t}\n\n\tfn.conversion = path;\n\treturn fn;\n}\n\nmodule.exports = function (fromModel) {\n\tconst graph = deriveBFS(fromModel);\n\tconst conversion = {};\n\n\tconst models = Object.keys(graph);\n\tfor (let len = models.length, i = 0; i < len; i++) {\n\t\tconst toModel = models[i];\n\t\tconst node = graph[toModel];\n\n\t\tif (node.parent === null) {\n\t\t\t// No possible conversion, or this node is the source model.\n\t\t\tcontinue;\n\t\t}\n\n\t\tconversion[toModel] = wrapConversion(toModel, graph);\n\t}\n\n\treturn conversion;\n};\n\n","'use strict'\r\n\r\nmodule.exports = {\r\n\t\"aliceblue\": [240, 248, 255],\r\n\t\"antiquewhite\": [250, 235, 215],\r\n\t\"aqua\": [0, 255, 255],\r\n\t\"aquamarine\": [127, 255, 212],\r\n\t\"azure\": [240, 255, 255],\r\n\t\"beige\": [245, 245, 220],\r\n\t\"bisque\": [255, 228, 196],\r\n\t\"black\": [0, 0, 0],\r\n\t\"blanchedalmond\": [255, 235, 205],\r\n\t\"blue\": [0, 0, 255],\r\n\t\"blueviolet\": [138, 43, 226],\r\n\t\"brown\": [165, 42, 42],\r\n\t\"burlywood\": [222, 184, 135],\r\n\t\"cadetblue\": [95, 158, 160],\r\n\t\"chartreuse\": [127, 255, 0],\r\n\t\"chocolate\": [210, 105, 30],\r\n\t\"coral\": [255, 127, 80],\r\n\t\"cornflowerblue\": [100, 149, 237],\r\n\t\"cornsilk\": [255, 248, 220],\r\n\t\"crimson\": [220, 20, 60],\r\n\t\"cyan\": [0, 255, 255],\r\n\t\"darkblue\": [0, 0, 139],\r\n\t\"darkcyan\": [0, 139, 139],\r\n\t\"darkgoldenrod\": [184, 134, 11],\r\n\t\"darkgray\": [169, 169, 169],\r\n\t\"darkgreen\": [0, 100, 0],\r\n\t\"darkgrey\": [169, 169, 169],\r\n\t\"darkkhaki\": [189, 183, 107],\r\n\t\"darkmagenta\": [139, 0, 139],\r\n\t\"darkolivegreen\": [85, 107, 47],\r\n\t\"darkorange\": [255, 140, 0],\r\n\t\"darkorchid\": [153, 50, 204],\r\n\t\"darkred\": [139, 0, 0],\r\n\t\"darksalmon\": [233, 150, 122],\r\n\t\"darkseagreen\": [143, 188, 143],\r\n\t\"darkslateblue\": [72, 61, 139],\r\n\t\"darkslategray\": [47, 79, 79],\r\n\t\"darkslategrey\": [47, 79, 79],\r\n\t\"darkturquoise\": [0, 206, 209],\r\n\t\"darkviolet\": [148, 0, 211],\r\n\t\"deeppink\": [255, 20, 147],\r\n\t\"deepskyblue\": [0, 191, 255],\r\n\t\"dimgray\": [105, 105, 105],\r\n\t\"dimgrey\": [105, 105, 105],\r\n\t\"dodgerblue\": [30, 144, 255],\r\n\t\"firebrick\": [178, 34, 34],\r\n\t\"floralwhite\": [255, 250, 240],\r\n\t\"forestgreen\": [34, 139, 34],\r\n\t\"fuchsia\": [255, 0, 255],\r\n\t\"gainsboro\": [220, 220, 220],\r\n\t\"ghostwhite\": [248, 248, 255],\r\n\t\"gold\": [255, 215, 0],\r\n\t\"goldenrod\": [218, 165, 32],\r\n\t\"gray\": [128, 128, 128],\r\n\t\"green\": [0, 128, 0],\r\n\t\"greenyellow\": [173, 255, 47],\r\n\t\"grey\": [128, 128, 128],\r\n\t\"honeydew\": [240, 255, 240],\r\n\t\"hotpink\": [255, 105, 180],\r\n\t\"indianred\": [205, 92, 92],\r\n\t\"indigo\": [75, 0, 130],\r\n\t\"ivory\": [255, 255, 240],\r\n\t\"khaki\": [240, 230, 140],\r\n\t\"lavender\": [230, 230, 250],\r\n\t\"lavenderblush\": [255, 240, 245],\r\n\t\"lawngreen\": [124, 252, 0],\r\n\t\"lemonchiffon\": [255, 250, 205],\r\n\t\"lightblue\": [173, 216, 230],\r\n\t\"lightcoral\": [240, 128, 128],\r\n\t\"lightcyan\": [224, 255, 255],\r\n\t\"lightgoldenrodyellow\": [250, 250, 210],\r\n\t\"lightgray\": [211, 211, 211],\r\n\t\"lightgreen\": [144, 238, 144],\r\n\t\"lightgrey\": [211, 211, 211],\r\n\t\"lightpink\": [255, 182, 193],\r\n\t\"lightsalmon\": [255, 160, 122],\r\n\t\"lightseagreen\": [32, 178, 170],\r\n\t\"lightskyblue\": [135, 206, 250],\r\n\t\"lightslategray\": [119, 136, 153],\r\n\t\"lightslategrey\": [119, 136, 153],\r\n\t\"lightsteelblue\": [176, 196, 222],\r\n\t\"lightyellow\": [255, 255, 224],\r\n\t\"lime\": [0, 255, 0],\r\n\t\"limegreen\": [50, 205, 50],\r\n\t\"linen\": [250, 240, 230],\r\n\t\"magenta\": [255, 0, 255],\r\n\t\"maroon\": [128, 0, 0],\r\n\t\"mediumaquamarine\": [102, 205, 170],\r\n\t\"mediumblue\": [0, 0, 205],\r\n\t\"mediumorchid\": [186, 85, 211],\r\n\t\"mediumpurple\": [147, 112, 219],\r\n\t\"mediumseagreen\": [60, 179, 113],\r\n\t\"mediumslateblue\": [123, 104, 238],\r\n\t\"mediumspringgreen\": [0, 250, 154],\r\n\t\"mediumturquoise\": [72, 209, 204],\r\n\t\"mediumvioletred\": [199, 21, 133],\r\n\t\"midnightblue\": [25, 25, 112],\r\n\t\"mintcream\": [245, 255, 250],\r\n\t\"mistyrose\": [255, 228, 225],\r\n\t\"moccasin\": [255, 228, 181],\r\n\t\"navajowhite\": [255, 222, 173],\r\n\t\"navy\": [0, 0, 128],\r\n\t\"oldlace\": [253, 245, 230],\r\n\t\"olive\": [128, 128, 0],\r\n\t\"olivedrab\": [107, 142, 35],\r\n\t\"orange\": [255, 165, 0],\r\n\t\"orangered\": [255, 69, 0],\r\n\t\"orchid\": [218, 112, 214],\r\n\t\"palegoldenrod\": [238, 232, 170],\r\n\t\"palegreen\": [152, 251, 152],\r\n\t\"paleturquoise\": [175, 238, 238],\r\n\t\"palevioletred\": [219, 112, 147],\r\n\t\"papayawhip\": [255, 239, 213],\r\n\t\"peachpuff\": [255, 218, 185],\r\n\t\"peru\": [205, 133, 63],\r\n\t\"pink\": [255, 192, 203],\r\n\t\"plum\": [221, 160, 221],\r\n\t\"powderblue\": [176, 224, 230],\r\n\t\"purple\": [128, 0, 128],\r\n\t\"rebeccapurple\": [102, 51, 153],\r\n\t\"red\": [255, 0, 0],\r\n\t\"rosybrown\": [188, 143, 143],\r\n\t\"royalblue\": [65, 105, 225],\r\n\t\"saddlebrown\": [139, 69, 19],\r\n\t\"salmon\": [250, 128, 114],\r\n\t\"sandybrown\": [244, 164, 96],\r\n\t\"seagreen\": [46, 139, 87],\r\n\t\"seashell\": [255, 245, 238],\r\n\t\"sienna\": [160, 82, 45],\r\n\t\"silver\": [192, 192, 192],\r\n\t\"skyblue\": [135, 206, 235],\r\n\t\"slateblue\": [106, 90, 205],\r\n\t\"slategray\": [112, 128, 144],\r\n\t\"slategrey\": [112, 128, 144],\r\n\t\"snow\": [255, 250, 250],\r\n\t\"springgreen\": [0, 255, 127],\r\n\t\"steelblue\": [70, 130, 180],\r\n\t\"tan\": [210, 180, 140],\r\n\t\"teal\": [0, 128, 128],\r\n\t\"thistle\": [216, 191, 216],\r\n\t\"tomato\": [255, 99, 71],\r\n\t\"turquoise\": [64, 224, 208],\r\n\t\"violet\": [238, 130, 238],\r\n\t\"wheat\": [245, 222, 179],\r\n\t\"white\": [255, 255, 255],\r\n\t\"whitesmoke\": [245, 245, 245],\r\n\t\"yellow\": [255, 255, 0],\r\n\t\"yellowgreen\": [154, 205, 50]\r\n};\r\n","'use strict';\n\nObject.defineProperty(exports, '__esModule', { value: true });\n\nclass Deprecation extends Error {\n constructor(message) {\n super(message); // Maintains proper stack trace (only available on V8)\n\n /* istanbul ignore next */\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n }\n\n this.name = 'Deprecation';\n }\n\n}\n\nexports.Deprecation = Deprecation;\n","\"use strict\";\n\nmodule.exports = function () {\n // https://mths.be/emoji\n return /\\uD83C\\uDFF4\\uDB40\\uDC67\\uDB40\\uDC62(?:\\uDB40\\uDC65\\uDB40\\uDC6E\\uDB40\\uDC67|\\uDB40\\uDC73\\uDB40\\uDC63\\uDB40\\uDC74|\\uDB40\\uDC77\\uDB40\\uDC6C\\uDB40\\uDC73)\\uDB40\\uDC7F|\\uD83D\\uDC68(?:\\uD83C\\uDFFC\\u200D(?:\\uD83E\\uDD1D\\u200D\\uD83D\\uDC68\\uD83C\\uDFFB|\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C\\uDFFF\\u200D(?:\\uD83E\\uDD1D\\u200D\\uD83D\\uDC68(?:\\uD83C[\\uDFFB-\\uDFFE])|\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C\\uDFFE\\u200D(?:\\uD83E\\uDD1D\\u200D\\uD83D\\uDC68(?:\\uD83C[\\uDFFB-\\uDFFD])|\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C\\uDFFD\\u200D(?:\\uD83E\\uDD1D\\u200D\\uD83D\\uDC68(?:\\uD83C[\\uDFFB\\uDFFC])|\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\u200D(?:\\u2764\\uFE0F\\u200D(?:\\uD83D\\uDC8B\\u200D)?\\uD83D\\uDC68|(?:\\uD83D[\\uDC68\\uDC69])\\u200D(?:\\uD83D\\uDC66\\u200D\\uD83D\\uDC66|\\uD83D\\uDC67\\u200D(?:\\uD83D[\\uDC66\\uDC67]))|\\uD83D\\uDC66\\u200D\\uD83D\\uDC66|\\uD83D\\uDC67\\u200D(?:\\uD83D[\\uDC66\\uDC67])|(?:\\uD83D[\\uDC68\\uDC69])\\u200D(?:\\uD83D[\\uDC66\\uDC67])|[\\u2695\\u2696\\u2708]\\uFE0F|\\uD83D[\\uDC66\\uDC67]|\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|(?:\\uD83C\\uDFFB\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFF\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFE\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFD\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFC\\u200D[\\u2695\\u2696\\u2708])\\uFE0F|\\uD83C\\uDFFB\\u200D(?:\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C[\\uDFFB-\\uDFFF])|(?:\\uD83E\\uDDD1\\uD83C\\uDFFB\\u200D\\uD83E\\uDD1D\\u200D\\uD83E\\uDDD1|\\uD83D\\uDC69\\uD83C\\uDFFC\\u200D\\uD83E\\uDD1D\\u200D\\uD83D\\uDC69)\\uD83C\\uDFFB|\\uD83E\\uDDD1(?:\\uD83C\\uDFFF\\u200D\\uD83E\\uDD1D\\u200D\\uD83E\\uDDD1(?:\\uD83C[\\uDFFB-\\uDFFF])|\\u200D\\uD83E\\uDD1D\\u200D\\uD83E\\uDDD1)|(?:\\uD83E\\uDDD1\\uD83C\\uDFFE\\u200D\\uD83E\\uDD1D\\u200D\\uD83E\\uDDD1|\\uD83D\\uDC69\\uD83C\\uDFFF\\u200D\\uD83E\\uDD1D\\u200D(?:\\uD83D[\\uDC68\\uDC69]))(?:\\uD83C[\\uDFFB-\\uDFFE])|(?:\\uD83E\\uDDD1\\uD83C\\uDFFC\\u200D\\uD83E\\uDD1D\\u200D\\uD83E\\uDDD1|\\uD83D\\uDC69\\uD83C\\uDFFD\\u200D\\uD83E\\uDD1D\\u200D\\uD83D\\uDC69)(?:\\uD83C[\\uDFFB\\uDFFC])|\\uD83D\\uDC69(?:\\uD83C\\uDFFE\\u200D(?:\\uD83E\\uDD1D\\u200D\\uD83D\\uDC68(?:\\uD83C[\\uDFFB-\\uDFFD\\uDFFF])|\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C\\uDFFC\\u200D(?:\\uD83E\\uDD1D\\u200D\\uD83D\\uDC68(?:\\uD83C[\\uDFFB\\uDFFD-\\uDFFF])|\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C\\uDFFB\\u200D(?:\\uD83E\\uDD1D\\u200D\\uD83D\\uDC68(?:\\uD83C[\\uDFFC-\\uDFFF])|\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C\\uDFFD\\u200D(?:\\uD83E\\uDD1D\\u200D\\uD83D\\uDC68(?:\\uD83C[\\uDFFB\\uDFFC\\uDFFE\\uDFFF])|\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\u200D(?:\\u2764\\uFE0F\\u200D(?:\\uD83D\\uDC8B\\u200D(?:\\uD83D[\\uDC68\\uDC69])|\\uD83D[\\uDC68\\uDC69])|\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD])|\\uD83C\\uDFFF\\u200D(?:\\uD83C[\\uDF3E\\uDF73\\uDF93\\uDFA4\\uDFA8\\uDFEB\\uDFED]|\\uD83D[\\uDCBB\\uDCBC\\uDD27\\uDD2C\\uDE80\\uDE92]|\\uD83E[\\uDDAF-\\uDDB3\\uDDBC\\uDDBD]))|\\uD83D\\uDC69\\u200D\\uD83D\\uDC69\\u200D(?:\\uD83D\\uDC66\\u200D\\uD83D\\uDC66|\\uD83D\\uDC67\\u200D(?:\\uD83D[\\uDC66\\uDC67]))|(?:\\uD83E\\uDDD1\\uD83C\\uDFFD\\u200D\\uD83E\\uDD1D\\u200D\\uD83E\\uDDD1|\\uD83D\\uDC69\\uD83C\\uDFFE\\u200D\\uD83E\\uDD1D\\u200D\\uD83D\\uDC69)(?:\\uD83C[\\uDFFB-\\uDFFD])|\\uD83D\\uDC69\\u200D\\uD83D\\uDC66\\u200D\\uD83D\\uDC66|\\uD83D\\uDC69\\u200D\\uD83D\\uDC69\\u200D(?:\\uD83D[\\uDC66\\uDC67])|(?:\\uD83D\\uDC41\\uFE0F\\u200D\\uD83D\\uDDE8|\\uD83D\\uDC69(?:\\uD83C\\uDFFF\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFE\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFC\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFB\\u200D[\\u2695\\u2696\\u2708]|\\uD83C\\uDFFD\\u200D[\\u2695\\u2696\\u2708]|\\u200D[\\u2695\\u2696\\u2708])|(?:(?:\\u26F9|\\uD83C[\\uDFCB\\uDFCC]|\\uD83D\\uDD75)\\uFE0F|\\uD83D\\uDC6F|\\uD83E[\\uDD3C\\uDDDE\\uDDDF])\\u200D[\\u2640\\u2642]|(?:\\u26F9|\\uD83C[\\uDFCB\\uDFCC]|\\uD83D\\uDD75)(?:\\uD83C[\\uDFFB-\\uDFFF])\\u200D[\\u2640\\u2642]|(?:\\uD83C[\\uDFC3\\uDFC4\\uDFCA]|\\uD83D[\\uDC6E\\uDC71\\uDC73\\uDC77\\uDC81\\uDC82\\uDC86\\uDC87\\uDE45-\\uDE47\\uDE4B\\uDE4D\\uDE4E\\uDEA3\\uDEB4-\\uDEB6]|\\uD83E[\\uDD26\\uDD37-\\uDD39\\uDD3D\\uDD3E\\uDDB8\\uDDB9\\uDDCD-\\uDDCF\\uDDD6-\\uDDDD])(?:(?:\\uD83C[\\uDFFB-\\uDFFF])\\u200D[\\u2640\\u2642]|\\u200D[\\u2640\\u2642])|\\uD83C\\uDFF4\\u200D\\u2620)\\uFE0F|\\uD83D\\uDC69\\u200D\\uD83D\\uDC67\\u200D(?:\\uD83D[\\uDC66\\uDC67])|\\uD83C\\uDFF3\\uFE0F\\u200D\\uD83C\\uDF08|\\uD83D\\uDC15\\u200D\\uD83E\\uDDBA|\\uD83D\\uDC69\\u200D\\uD83D\\uDC66|\\uD83D\\uDC69\\u200D\\uD83D\\uDC67|\\uD83C\\uDDFD\\uD83C\\uDDF0|\\uD83C\\uDDF4\\uD83C\\uDDF2|\\uD83C\\uDDF6\\uD83C\\uDDE6|[#\\*0-9]\\uFE0F\\u20E3|\\uD83C\\uDDE7(?:\\uD83C[\\uDDE6\\uDDE7\\uDDE9-\\uDDEF\\uDDF1-\\uDDF4\\uDDF6-\\uDDF9\\uDDFB\\uDDFC\\uDDFE\\uDDFF])|\\uD83C\\uDDF9(?:\\uD83C[\\uDDE6\\uDDE8\\uDDE9\\uDDEB-\\uDDED\\uDDEF-\\uDDF4\\uDDF7\\uDDF9\\uDDFB\\uDDFC\\uDDFF])|\\uD83C\\uDDEA(?:\\uD83C[\\uDDE6\\uDDE8\\uDDEA\\uDDEC\\uDDED\\uDDF7-\\uDDFA])|\\uD83E\\uDDD1(?:\\uD83C[\\uDFFB-\\uDFFF])|\\uD83C\\uDDF7(?:\\uD83C[\\uDDEA\\uDDF4\\uDDF8\\uDDFA\\uDDFC])|\\uD83D\\uDC69(?:\\uD83C[\\uDFFB-\\uDFFF])|\\uD83C\\uDDF2(?:\\uD83C[\\uDDE6\\uDDE8-\\uDDED\\uDDF0-\\uDDFF])|\\uD83C\\uDDE6(?:\\uD83C[\\uDDE8-\\uDDEC\\uDDEE\\uDDF1\\uDDF2\\uDDF4\\uDDF6-\\uDDFA\\uDDFC\\uDDFD\\uDDFF])|\\uD83C\\uDDF0(?:\\uD83C[\\uDDEA\\uDDEC-\\uDDEE\\uDDF2\\uDDF3\\uDDF5\\uDDF7\\uDDFC\\uDDFE\\uDDFF])|\\uD83C\\uDDED(?:\\uD83C[\\uDDF0\\uDDF2\\uDDF3\\uDDF7\\uDDF9\\uDDFA])|\\uD83C\\uDDE9(?:\\uD83C[\\uDDEA\\uDDEC\\uDDEF\\uDDF0\\uDDF2\\uDDF4\\uDDFF])|\\uD83C\\uDDFE(?:\\uD83C[\\uDDEA\\uDDF9])|\\uD83C\\uDDEC(?:\\uD83C[\\uDDE6\\uDDE7\\uDDE9-\\uDDEE\\uDDF1-\\uDDF3\\uDDF5-\\uDDFA\\uDDFC\\uDDFE])|\\uD83C\\uDDF8(?:\\uD83C[\\uDDE6-\\uDDEA\\uDDEC-\\uDDF4\\uDDF7-\\uDDF9\\uDDFB\\uDDFD-\\uDDFF])|\\uD83C\\uDDEB(?:\\uD83C[\\uDDEE-\\uDDF0\\uDDF2\\uDDF4\\uDDF7])|\\uD83C\\uDDF5(?:\\uD83C[\\uDDE6\\uDDEA-\\uDDED\\uDDF0-\\uDDF3\\uDDF7-\\uDDF9\\uDDFC\\uDDFE])|\\uD83C\\uDDFB(?:\\uD83C[\\uDDE6\\uDDE8\\uDDEA\\uDDEC\\uDDEE\\uDDF3\\uDDFA])|\\uD83C\\uDDF3(?:\\uD83C[\\uDDE6\\uDDE8\\uDDEA-\\uDDEC\\uDDEE\\uDDF1\\uDDF4\\uDDF5\\uDDF7\\uDDFA\\uDDFF])|\\uD83C\\uDDE8(?:\\uD83C[\\uDDE6\\uDDE8\\uDDE9\\uDDEB-\\uDDEE\\uDDF0-\\uDDF5\\uDDF7\\uDDFA-\\uDDFF])|\\uD83C\\uDDF1(?:\\uD83C[\\uDDE6-\\uDDE8\\uDDEE\\uDDF0\\uDDF7-\\uDDFB\\uDDFE])|\\uD83C\\uDDFF(?:\\uD83C[\\uDDE6\\uDDF2\\uDDFC])|\\uD83C\\uDDFC(?:\\uD83C[\\uDDEB\\uDDF8])|\\uD83C\\uDDFA(?:\\uD83C[\\uDDE6\\uDDEC\\uDDF2\\uDDF3\\uDDF8\\uDDFE\\uDDFF])|\\uD83C\\uDDEE(?:\\uD83C[\\uDDE8-\\uDDEA\\uDDF1-\\uDDF4\\uDDF6-\\uDDF9])|\\uD83C\\uDDEF(?:\\uD83C[\\uDDEA\\uDDF2\\uDDF4\\uDDF5])|(?:\\uD83C[\\uDFC3\\uDFC4\\uDFCA]|\\uD83D[\\uDC6E\\uDC71\\uDC73\\uDC77\\uDC81\\uDC82\\uDC86\\uDC87\\uDE45-\\uDE47\\uDE4B\\uDE4D\\uDE4E\\uDEA3\\uDEB4-\\uDEB6]|\\uD83E[\\uDD26\\uDD37-\\uDD39\\uDD3D\\uDD3E\\uDDB8\\uDDB9\\uDDCD-\\uDDCF\\uDDD6-\\uDDDD])(?:\\uD83C[\\uDFFB-\\uDFFF])|(?:\\u26F9|\\uD83C[\\uDFCB\\uDFCC]|\\uD83D\\uDD75)(?:\\uD83C[\\uDFFB-\\uDFFF])|(?:[\\u261D\\u270A-\\u270D]|\\uD83C[\\uDF85\\uDFC2\\uDFC7]|\\uD83D[\\uDC42\\uDC43\\uDC46-\\uDC50\\uDC66\\uDC67\\uDC6B-\\uDC6D\\uDC70\\uDC72\\uDC74-\\uDC76\\uDC78\\uDC7C\\uDC83\\uDC85\\uDCAA\\uDD74\\uDD7A\\uDD90\\uDD95\\uDD96\\uDE4C\\uDE4F\\uDEC0\\uDECC]|\\uD83E[\\uDD0F\\uDD18-\\uDD1C\\uDD1E\\uDD1F\\uDD30-\\uDD36\\uDDB5\\uDDB6\\uDDBB\\uDDD2-\\uDDD5])(?:\\uD83C[\\uDFFB-\\uDFFF])|(?:[\\u231A\\u231B\\u23E9-\\u23EC\\u23F0\\u23F3\\u25FD\\u25FE\\u2614\\u2615\\u2648-\\u2653\\u267F\\u2693\\u26A1\\u26AA\\u26AB\\u26BD\\u26BE\\u26C4\\u26C5\\u26CE\\u26D4\\u26EA\\u26F2\\u26F3\\u26F5\\u26FA\\u26FD\\u2705\\u270A\\u270B\\u2728\\u274C\\u274E\\u2753-\\u2755\\u2757\\u2795-\\u2797\\u27B0\\u27BF\\u2B1B\\u2B1C\\u2B50\\u2B55]|\\uD83C[\\uDC04\\uDCCF\\uDD8E\\uDD91-\\uDD9A\\uDDE6-\\uDDFF\\uDE01\\uDE1A\\uDE2F\\uDE32-\\uDE36\\uDE38-\\uDE3A\\uDE50\\uDE51\\uDF00-\\uDF20\\uDF2D-\\uDF35\\uDF37-\\uDF7C\\uDF7E-\\uDF93\\uDFA0-\\uDFCA\\uDFCF-\\uDFD3\\uDFE0-\\uDFF0\\uDFF4\\uDFF8-\\uDFFF]|\\uD83D[\\uDC00-\\uDC3E\\uDC40\\uDC42-\\uDCFC\\uDCFF-\\uDD3D\\uDD4B-\\uDD4E\\uDD50-\\uDD67\\uDD7A\\uDD95\\uDD96\\uDDA4\\uDDFB-\\uDE4F\\uDE80-\\uDEC5\\uDECC\\uDED0-\\uDED2\\uDED5\\uDEEB\\uDEEC\\uDEF4-\\uDEFA\\uDFE0-\\uDFEB]|\\uD83E[\\uDD0D-\\uDD3A\\uDD3C-\\uDD45\\uDD47-\\uDD71\\uDD73-\\uDD76\\uDD7A-\\uDDA2\\uDDA5-\\uDDAA\\uDDAE-\\uDDCA\\uDDCD-\\uDDFF\\uDE70-\\uDE73\\uDE78-\\uDE7A\\uDE80-\\uDE82\\uDE90-\\uDE95])|(?:[#\\*0-9\\xA9\\xAE\\u203C\\u2049\\u2122\\u2139\\u2194-\\u2199\\u21A9\\u21AA\\u231A\\u231B\\u2328\\u23CF\\u23E9-\\u23F3\\u23F8-\\u23FA\\u24C2\\u25AA\\u25AB\\u25B6\\u25C0\\u25FB-\\u25FE\\u2600-\\u2604\\u260E\\u2611\\u2614\\u2615\\u2618\\u261D\\u2620\\u2622\\u2623\\u2626\\u262A\\u262E\\u262F\\u2638-\\u263A\\u2640\\u2642\\u2648-\\u2653\\u265F\\u2660\\u2663\\u2665\\u2666\\u2668\\u267B\\u267E\\u267F\\u2692-\\u2697\\u2699\\u269B\\u269C\\u26A0\\u26A1\\u26AA\\u26AB\\u26B0\\u26B1\\u26BD\\u26BE\\u26C4\\u26C5\\u26C8\\u26CE\\u26CF\\u26D1\\u26D3\\u26D4\\u26E9\\u26EA\\u26F0-\\u26F5\\u26F7-\\u26FA\\u26FD\\u2702\\u2705\\u2708-\\u270D\\u270F\\u2712\\u2714\\u2716\\u271D\\u2721\\u2728\\u2733\\u2734\\u2744\\u2747\\u274C\\u274E\\u2753-\\u2755\\u2757\\u2763\\u2764\\u2795-\\u2797\\u27A1\\u27B0\\u27BF\\u2934\\u2935\\u2B05-\\u2B07\\u2B1B\\u2B1C\\u2B50\\u2B55\\u3030\\u303D\\u3297\\u3299]|\\uD83C[\\uDC04\\uDCCF\\uDD70\\uDD71\\uDD7E\\uDD7F\\uDD8E\\uDD91-\\uDD9A\\uDDE6-\\uDDFF\\uDE01\\uDE02\\uDE1A\\uDE2F\\uDE32-\\uDE3A\\uDE50\\uDE51\\uDF00-\\uDF21\\uDF24-\\uDF93\\uDF96\\uDF97\\uDF99-\\uDF9B\\uDF9E-\\uDFF0\\uDFF3-\\uDFF5\\uDFF7-\\uDFFF]|\\uD83D[\\uDC00-\\uDCFD\\uDCFF-\\uDD3D\\uDD49-\\uDD4E\\uDD50-\\uDD67\\uDD6F\\uDD70\\uDD73-\\uDD7A\\uDD87\\uDD8A-\\uDD8D\\uDD90\\uDD95\\uDD96\\uDDA4\\uDDA5\\uDDA8\\uDDB1\\uDDB2\\uDDBC\\uDDC2-\\uDDC4\\uDDD1-\\uDDD3\\uDDDC-\\uDDDE\\uDDE1\\uDDE3\\uDDE8\\uDDEF\\uDDF3\\uDDFA-\\uDE4F\\uDE80-\\uDEC5\\uDECB-\\uDED2\\uDED5\\uDEE0-\\uDEE5\\uDEE9\\uDEEB\\uDEEC\\uDEF0\\uDEF3-\\uDEFA\\uDFE0-\\uDFEB]|\\uD83E[\\uDD0D-\\uDD3A\\uDD3C-\\uDD45\\uDD47-\\uDD71\\uDD73-\\uDD76\\uDD7A-\\uDDA2\\uDDA5-\\uDDAA\\uDDAE-\\uDDCA\\uDDCD-\\uDDFF\\uDE70-\\uDE73\\uDE78-\\uDE7A\\uDE80-\\uDE82\\uDE90-\\uDE95])\\uFE0F|(?:[\\u261D\\u26F9\\u270A-\\u270D]|\\uD83C[\\uDF85\\uDFC2-\\uDFC4\\uDFC7\\uDFCA-\\uDFCC]|\\uD83D[\\uDC42\\uDC43\\uDC46-\\uDC50\\uDC66-\\uDC78\\uDC7C\\uDC81-\\uDC83\\uDC85-\\uDC87\\uDC8F\\uDC91\\uDCAA\\uDD74\\uDD75\\uDD7A\\uDD90\\uDD95\\uDD96\\uDE45-\\uDE47\\uDE4B-\\uDE4F\\uDEA3\\uDEB4-\\uDEB6\\uDEC0\\uDECC]|\\uD83E[\\uDD0F\\uDD18-\\uDD1F\\uDD26\\uDD30-\\uDD39\\uDD3C-\\uDD3E\\uDDB5\\uDDB6\\uDDB8\\uDDB9\\uDDBB\\uDDCD-\\uDDCF\\uDDD1-\\uDDDD])/g;\n};\n","'use strict';\n\n// do not edit .js files directly - edit src/index.jst\n\n\n\nmodule.exports = function equal(a, b) {\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n\n for (i = length; i-- !== 0;) {\n var key = keys[i];\n\n if (!equal(a[key], b[key])) return false;\n }\n\n return true;\n }\n\n // true if both NaN, false otherwise\n return a!==a && b!==b;\n};\n","'use strict';\n\nconst validator = require('./validator');\nconst XMLParser = require('./xmlparser/XMLParser');\nconst XMLBuilder = require('./xmlbuilder/json2xml');\n\nmodule.exports = {\n XMLParser: XMLParser,\n XMLValidator: validator,\n XMLBuilder: XMLBuilder\n}","'use strict';\n\nconst nameStartChar = ':A-Za-z_\\\\u00C0-\\\\u00D6\\\\u00D8-\\\\u00F6\\\\u00F8-\\\\u02FF\\\\u0370-\\\\u037D\\\\u037F-\\\\u1FFF\\\\u200C-\\\\u200D\\\\u2070-\\\\u218F\\\\u2C00-\\\\u2FEF\\\\u3001-\\\\uD7FF\\\\uF900-\\\\uFDCF\\\\uFDF0-\\\\uFFFD';\nconst nameChar = nameStartChar + '\\\\-.\\\\d\\\\u00B7\\\\u0300-\\\\u036F\\\\u203F-\\\\u2040';\nconst nameRegexp = '[' + nameStartChar + '][' + nameChar + ']*'\nconst regexName = new RegExp('^' + nameRegexp + '$');\n\nconst getAllMatches = function(string, regex) {\n const matches = [];\n let match = regex.exec(string);\n while (match) {\n const allmatches = [];\n allmatches.startIndex = regex.lastIndex - match[0].length;\n const len = match.length;\n for (let index = 0; index < len; index++) {\n allmatches.push(match[index]);\n }\n matches.push(allmatches);\n match = regex.exec(string);\n }\n return matches;\n};\n\nconst isName = function(string) {\n const match = regexName.exec(string);\n return !(match === null || typeof match === 'undefined');\n};\n\nexports.isExist = function(v) {\n return typeof v !== 'undefined';\n};\n\nexports.isEmptyObject = function(obj) {\n return Object.keys(obj).length === 0;\n};\n\n/**\n * Copy all the properties of a into b.\n * @param {*} target\n * @param {*} a\n */\nexports.merge = function(target, a, arrayMode) {\n if (a) {\n const keys = Object.keys(a); // will return an array of own properties\n const len = keys.length; //don't make it inline\n for (let i = 0; i < len; i++) {\n if (arrayMode === 'strict') {\n target[keys[i]] = [ a[keys[i]] ];\n } else {\n target[keys[i]] = a[keys[i]];\n }\n }\n }\n};\n/* exports.merge =function (b,a){\n return Object.assign(b,a);\n} */\n\nexports.getValue = function(v) {\n if (exports.isExist(v)) {\n return v;\n } else {\n return '';\n }\n};\n\n// const fakeCall = function(a) {return a;};\n// const fakeCallNoReturn = function() {};\n\nexports.isName = isName;\nexports.getAllMatches = getAllMatches;\nexports.nameRegexp = nameRegexp;\n","'use strict';\n\nconst util = require('./util');\n\nconst defaultOptions = {\n allowBooleanAttributes: false, //A tag can have attributes without any value\n unpairedTags: []\n};\n\n//const tagsPattern = new RegExp(\"<\\\\/?([\\\\w:\\\\-_\\.]+)\\\\s*\\/?>\",\"g\");\nexports.validate = function (xmlData, options) {\n options = Object.assign({}, defaultOptions, options);\n\n //xmlData = xmlData.replace(/(\\r\\n|\\n|\\r)/gm,\"\");//make it single line\n //xmlData = xmlData.replace(/(^\\s*<\\?xml.*?\\?>)/g,\"\");//Remove XML starting tag\n //xmlData = xmlData.replace(/()/g,\"\");//Remove DOCTYPE\n const tags = [];\n let tagFound = false;\n\n //indicates that the root tag has been closed (aka. depth 0 has been reached)\n let reachedRoot = false;\n\n if (xmlData[0] === '\\ufeff') {\n // check for byte order mark (BOM)\n xmlData = xmlData.substr(1);\n }\n \n for (let i = 0; i < xmlData.length; i++) {\n\n if (xmlData[i] === '<' && xmlData[i+1] === '?') {\n i+=2;\n i = readPI(xmlData,i);\n if (i.err) return i;\n }else if (xmlData[i] === '<') {\n //starting of tag\n //read until you reach to '>' avoiding any '>' in attribute value\n let tagStartPos = i;\n i++;\n \n if (xmlData[i] === '!') {\n i = readCommentAndCDATA(xmlData, i);\n continue;\n } else {\n let closingTag = false;\n if (xmlData[i] === '/') {\n //closing tag\n closingTag = true;\n i++;\n }\n //read tagname\n let tagName = '';\n for (; i < xmlData.length &&\n xmlData[i] !== '>' &&\n xmlData[i] !== ' ' &&\n xmlData[i] !== '\\t' &&\n xmlData[i] !== '\\n' &&\n xmlData[i] !== '\\r'; i++\n ) {\n tagName += xmlData[i];\n }\n tagName = tagName.trim();\n //console.log(tagName);\n\n if (tagName[tagName.length - 1] === '/') {\n //self closing tag without attributes\n tagName = tagName.substring(0, tagName.length - 1);\n //continue;\n i--;\n }\n if (!validateTagName(tagName)) {\n let msg;\n if (tagName.trim().length === 0) {\n msg = \"Invalid space after '<'.\";\n } else {\n msg = \"Tag '\"+tagName+\"' is an invalid name.\";\n }\n return getErrorObject('InvalidTag', msg, getLineNumberForPosition(xmlData, i));\n }\n\n const result = readAttributeStr(xmlData, i);\n if (result === false) {\n return getErrorObject('InvalidAttr', \"Attributes for '\"+tagName+\"' have open quote.\", getLineNumberForPosition(xmlData, i));\n }\n let attrStr = result.value;\n i = result.index;\n\n if (attrStr[attrStr.length - 1] === '/') {\n //self closing tag\n const attrStrStart = i - attrStr.length;\n attrStr = attrStr.substring(0, attrStr.length - 1);\n const isValid = validateAttributeString(attrStr, options);\n if (isValid === true) {\n tagFound = true;\n //continue; //text may presents after self closing tag\n } else {\n //the result from the nested function returns the position of the error within the attribute\n //in order to get the 'true' error line, we need to calculate the position where the attribute begins (i - attrStr.length) and then add the position within the attribute\n //this gives us the absolute index in the entire xml, which we can use to find the line at last\n return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, attrStrStart + isValid.err.line));\n }\n } else if (closingTag) {\n if (!result.tagClosed) {\n return getErrorObject('InvalidTag', \"Closing tag '\"+tagName+\"' doesn't have proper closing.\", getLineNumberForPosition(xmlData, i));\n } else if (attrStr.trim().length > 0) {\n return getErrorObject('InvalidTag', \"Closing tag '\"+tagName+\"' can't have attributes or invalid starting.\", getLineNumberForPosition(xmlData, tagStartPos));\n } else if (tags.length === 0) {\n return getErrorObject('InvalidTag', \"Closing tag '\"+tagName+\"' has not been opened.\", getLineNumberForPosition(xmlData, tagStartPos));\n } else {\n const otg = tags.pop();\n if (tagName !== otg.tagName) {\n let openPos = getLineNumberForPosition(xmlData, otg.tagStartPos);\n return getErrorObject('InvalidTag',\n \"Expected closing tag '\"+otg.tagName+\"' (opened in line \"+openPos.line+\", col \"+openPos.col+\") instead of closing tag '\"+tagName+\"'.\",\n getLineNumberForPosition(xmlData, tagStartPos));\n }\n\n //when there are no more tags, we reached the root level.\n if (tags.length == 0) {\n reachedRoot = true;\n }\n }\n } else {\n const isValid = validateAttributeString(attrStr, options);\n if (isValid !== true) {\n //the result from the nested function returns the position of the error within the attribute\n //in order to get the 'true' error line, we need to calculate the position where the attribute begins (i - attrStr.length) and then add the position within the attribute\n //this gives us the absolute index in the entire xml, which we can use to find the line at last\n return getErrorObject(isValid.err.code, isValid.err.msg, getLineNumberForPosition(xmlData, i - attrStr.length + isValid.err.line));\n }\n\n //if the root level has been reached before ...\n if (reachedRoot === true) {\n return getErrorObject('InvalidXml', 'Multiple possible root nodes found.', getLineNumberForPosition(xmlData, i));\n } else if(options.unpairedTags.indexOf(tagName) !== -1){\n //don't push into stack\n } else {\n tags.push({tagName, tagStartPos});\n }\n tagFound = true;\n }\n\n //skip tag text value\n //It may include comments and CDATA value\n for (i++; i < xmlData.length; i++) {\n if (xmlData[i] === '<') {\n if (xmlData[i + 1] === '!') {\n //comment or CADATA\n i++;\n i = readCommentAndCDATA(xmlData, i);\n continue;\n } else if (xmlData[i+1] === '?') {\n i = readPI(xmlData, ++i);\n if (i.err) return i;\n } else{\n break;\n }\n } else if (xmlData[i] === '&') {\n const afterAmp = validateAmpersand(xmlData, i);\n if (afterAmp == -1)\n return getErrorObject('InvalidChar', \"char '&' is not expected.\", getLineNumberForPosition(xmlData, i));\n i = afterAmp;\n }else{\n if (reachedRoot === true && !isWhiteSpace(xmlData[i])) {\n return getErrorObject('InvalidXml', \"Extra text at the end\", getLineNumberForPosition(xmlData, i));\n }\n }\n } //end of reading tag text value\n if (xmlData[i] === '<') {\n i--;\n }\n }\n } else {\n if ( isWhiteSpace(xmlData[i])) {\n continue;\n }\n return getErrorObject('InvalidChar', \"char '\"+xmlData[i]+\"' is not expected.\", getLineNumberForPosition(xmlData, i));\n }\n }\n\n if (!tagFound) {\n return getErrorObject('InvalidXml', 'Start tag expected.', 1);\n }else if (tags.length == 1) {\n return getErrorObject('InvalidTag', \"Unclosed tag '\"+tags[0].tagName+\"'.\", getLineNumberForPosition(xmlData, tags[0].tagStartPos));\n }else if (tags.length > 0) {\n return getErrorObject('InvalidXml', \"Invalid '\"+\n JSON.stringify(tags.map(t => t.tagName), null, 4).replace(/\\r?\\n/g, '')+\n \"' found.\", {line: 1, col: 1});\n }\n\n return true;\n};\n\nfunction isWhiteSpace(char){\n return char === ' ' || char === '\\t' || char === '\\n' || char === '\\r';\n}\n/**\n * Read Processing insstructions and skip\n * @param {*} xmlData\n * @param {*} i\n */\nfunction readPI(xmlData, i) {\n const start = i;\n for (; i < xmlData.length; i++) {\n if (xmlData[i] == '?' || xmlData[i] == ' ') {\n //tagname\n const tagname = xmlData.substr(start, i - start);\n if (i > 5 && tagname === 'xml') {\n return getErrorObject('InvalidXml', 'XML declaration allowed only at the start of the document.', getLineNumberForPosition(xmlData, i));\n } else if (xmlData[i] == '?' && xmlData[i + 1] == '>') {\n //check if valid attribut string\n i++;\n break;\n } else {\n continue;\n }\n }\n }\n return i;\n}\n\nfunction readCommentAndCDATA(xmlData, i) {\n if (xmlData.length > i + 5 && xmlData[i + 1] === '-' && xmlData[i + 2] === '-') {\n //comment\n for (i += 3; i < xmlData.length; i++) {\n if (xmlData[i] === '-' && xmlData[i + 1] === '-' && xmlData[i + 2] === '>') {\n i += 2;\n break;\n }\n }\n } else if (\n xmlData.length > i + 8 &&\n xmlData[i + 1] === 'D' &&\n xmlData[i + 2] === 'O' &&\n xmlData[i + 3] === 'C' &&\n xmlData[i + 4] === 'T' &&\n xmlData[i + 5] === 'Y' &&\n xmlData[i + 6] === 'P' &&\n xmlData[i + 7] === 'E'\n ) {\n let angleBracketsCount = 1;\n for (i += 8; i < xmlData.length; i++) {\n if (xmlData[i] === '<') {\n angleBracketsCount++;\n } else if (xmlData[i] === '>') {\n angleBracketsCount--;\n if (angleBracketsCount === 0) {\n break;\n }\n }\n }\n } else if (\n xmlData.length > i + 9 &&\n xmlData[i + 1] === '[' &&\n xmlData[i + 2] === 'C' &&\n xmlData[i + 3] === 'D' &&\n xmlData[i + 4] === 'A' &&\n xmlData[i + 5] === 'T' &&\n xmlData[i + 6] === 'A' &&\n xmlData[i + 7] === '['\n ) {\n for (i += 8; i < xmlData.length; i++) {\n if (xmlData[i] === ']' && xmlData[i + 1] === ']' && xmlData[i + 2] === '>') {\n i += 2;\n break;\n }\n }\n }\n\n return i;\n}\n\nconst doubleQuote = '\"';\nconst singleQuote = \"'\";\n\n/**\n * Keep reading xmlData until '<' is found outside the attribute value.\n * @param {string} xmlData\n * @param {number} i\n */\nfunction readAttributeStr(xmlData, i) {\n let attrStr = '';\n let startChar = '';\n let tagClosed = false;\n for (; i < xmlData.length; i++) {\n if (xmlData[i] === doubleQuote || xmlData[i] === singleQuote) {\n if (startChar === '') {\n startChar = xmlData[i];\n } else if (startChar !== xmlData[i]) {\n //if vaue is enclosed with double quote then single quotes are allowed inside the value and vice versa\n } else {\n startChar = '';\n }\n } else if (xmlData[i] === '>') {\n if (startChar === '') {\n tagClosed = true;\n break;\n }\n }\n attrStr += xmlData[i];\n }\n if (startChar !== '') {\n return false;\n }\n\n return {\n value: attrStr,\n index: i,\n tagClosed: tagClosed\n };\n}\n\n/**\n * Select all the attributes whether valid or invalid.\n */\nconst validAttrStrRegxp = new RegExp('(\\\\s*)([^\\\\s=]+)(\\\\s*=)?(\\\\s*([\\'\"])(([\\\\s\\\\S])*?)\\\\5)?', 'g');\n\n//attr, =\"sd\", a=\"amit's\", a=\"sd\"b=\"saf\", ab cd=\"\"\n\nfunction validateAttributeString(attrStr, options) {\n //console.log(\"start:\"+attrStr+\":end\");\n\n //if(attrStr.trim().length === 0) return true; //empty string\n\n const matches = util.getAllMatches(attrStr, validAttrStrRegxp);\n const attrNames = {};\n\n for (let i = 0; i < matches.length; i++) {\n if (matches[i][1].length === 0) {\n //nospace before attribute name: a=\"sd\"b=\"saf\"\n return getErrorObject('InvalidAttr', \"Attribute '\"+matches[i][2]+\"' has no space in starting.\", getPositionFromMatch(matches[i]))\n } else if (matches[i][3] !== undefined && matches[i][4] === undefined) {\n return getErrorObject('InvalidAttr', \"Attribute '\"+matches[i][2]+\"' is without value.\", getPositionFromMatch(matches[i]));\n } else if (matches[i][3] === undefined && !options.allowBooleanAttributes) {\n //independent attribute: ab\n return getErrorObject('InvalidAttr', \"boolean attribute '\"+matches[i][2]+\"' is not allowed.\", getPositionFromMatch(matches[i]));\n }\n /* else if(matches[i][6] === undefined){//attribute without value: ab=\n return { err: { code:\"InvalidAttr\",msg:\"attribute \" + matches[i][2] + \" has no value assigned.\"}};\n } */\n const attrName = matches[i][2];\n if (!validateAttrName(attrName)) {\n return getErrorObject('InvalidAttr', \"Attribute '\"+attrName+\"' is an invalid name.\", getPositionFromMatch(matches[i]));\n }\n if (!attrNames.hasOwnProperty(attrName)) {\n //check for duplicate attribute.\n attrNames[attrName] = 1;\n } else {\n return getErrorObject('InvalidAttr', \"Attribute '\"+attrName+\"' is repeated.\", getPositionFromMatch(matches[i]));\n }\n }\n\n return true;\n}\n\nfunction validateNumberAmpersand(xmlData, i) {\n let re = /\\d/;\n if (xmlData[i] === 'x') {\n i++;\n re = /[\\da-fA-F]/;\n }\n for (; i < xmlData.length; i++) {\n if (xmlData[i] === ';')\n return i;\n if (!xmlData[i].match(re))\n break;\n }\n return -1;\n}\n\nfunction validateAmpersand(xmlData, i) {\n // https://www.w3.org/TR/xml/#dt-charref\n i++;\n if (xmlData[i] === ';')\n return -1;\n if (xmlData[i] === '#') {\n i++;\n return validateNumberAmpersand(xmlData, i);\n }\n let count = 0;\n for (; i < xmlData.length; i++, count++) {\n if (xmlData[i].match(/\\w/) && count < 20)\n continue;\n if (xmlData[i] === ';')\n break;\n return -1;\n }\n return i;\n}\n\nfunction getErrorObject(code, message, lineNumber) {\n return {\n err: {\n code: code,\n msg: message,\n line: lineNumber.line || lineNumber,\n col: lineNumber.col,\n },\n };\n}\n\nfunction validateAttrName(attrName) {\n return util.isName(attrName);\n}\n\n// const startsWithXML = /^xml/i;\n\nfunction validateTagName(tagname) {\n return util.isName(tagname) /* && !tagname.match(startsWithXML) */;\n}\n\n//this function returns the line number for the character at the given index\nfunction getLineNumberForPosition(xmlData, index) {\n const lines = xmlData.substring(0, index).split(/\\r?\\n/);\n return {\n line: lines.length,\n\n // column number is last line's length + 1, because column numbering starts at 1:\n col: lines[lines.length - 1].length + 1\n };\n}\n\n//this function returns the position of the first character of match within attrStr\nfunction getPositionFromMatch(match) {\n return match.startIndex + match[1].length;\n}\n","'use strict';\n//parse Empty Node as self closing node\nconst buildFromOrderedJs = require('./orderedJs2Xml');\n\nconst defaultOptions = {\n attributeNamePrefix: '@_',\n attributesGroupName: false,\n textNodeName: '#text',\n ignoreAttributes: true,\n cdataPropName: false,\n format: false,\n indentBy: ' ',\n suppressEmptyNode: false,\n suppressUnpairedNode: true,\n suppressBooleanAttributes: true,\n tagValueProcessor: function(key, a) {\n return a;\n },\n attributeValueProcessor: function(attrName, a) {\n return a;\n },\n preserveOrder: false,\n commentPropName: false,\n unpairedTags: [],\n entities: [\n { regex: new RegExp(\"&\", \"g\"), val: \"&\" },//it must be on top\n { regex: new RegExp(\">\", \"g\"), val: \">\" },\n { regex: new RegExp(\"<\", \"g\"), val: \"<\" },\n { regex: new RegExp(\"\\'\", \"g\"), val: \"'\" },\n { regex: new RegExp(\"\\\"\", \"g\"), val: \""\" }\n ],\n processEntities: true,\n stopNodes: [],\n // transformTagName: false,\n // transformAttributeName: false,\n oneListGroup: false\n};\n\nfunction Builder(options) {\n this.options = Object.assign({}, defaultOptions, options);\n if (this.options.ignoreAttributes || this.options.attributesGroupName) {\n this.isAttribute = function(/*a*/) {\n return false;\n };\n } else {\n this.attrPrefixLen = this.options.attributeNamePrefix.length;\n this.isAttribute = isAttribute;\n }\n\n this.processTextOrObjNode = processTextOrObjNode\n\n if (this.options.format) {\n this.indentate = indentate;\n this.tagEndChar = '>\\n';\n this.newLine = '\\n';\n } else {\n this.indentate = function() {\n return '';\n };\n this.tagEndChar = '>';\n this.newLine = '';\n }\n}\n\nBuilder.prototype.build = function(jObj) {\n if(this.options.preserveOrder){\n return buildFromOrderedJs(jObj, this.options);\n }else {\n if(Array.isArray(jObj) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1){\n jObj = {\n [this.options.arrayNodeName] : jObj\n }\n }\n return this.j2x(jObj, 0).val;\n }\n};\n\nBuilder.prototype.j2x = function(jObj, level) {\n let attrStr = '';\n let val = '';\n for (let key in jObj) {\n if(!Object.prototype.hasOwnProperty.call(jObj, key)) continue;\n if (typeof jObj[key] === 'undefined') {\n // supress undefined node only if it is not an attribute\n if (this.isAttribute(key)) {\n val += '';\n }\n } else if (jObj[key] === null) {\n // null attribute should be ignored by the attribute list, but should not cause the tag closing\n if (this.isAttribute(key)) {\n val += '';\n } else if (key[0] === '?') {\n val += this.indentate(level) + '<' + key + '?' + this.tagEndChar;\n } else {\n val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;\n }\n // val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;\n } else if (jObj[key] instanceof Date) {\n val += this.buildTextValNode(jObj[key], key, '', level);\n } else if (typeof jObj[key] !== 'object') {\n //premitive type\n const attr = this.isAttribute(key);\n if (attr) {\n attrStr += this.buildAttrPairStr(attr, '' + jObj[key]);\n }else {\n //tag value\n if (key === this.options.textNodeName) {\n let newval = this.options.tagValueProcessor(key, '' + jObj[key]);\n val += this.replaceEntitiesValue(newval);\n } else {\n val += this.buildTextValNode(jObj[key], key, '', level);\n }\n }\n } else if (Array.isArray(jObj[key])) {\n //repeated nodes\n const arrLen = jObj[key].length;\n let listTagVal = \"\";\n let listTagAttr = \"\";\n for (let j = 0; j < arrLen; j++) {\n const item = jObj[key][j];\n if (typeof item === 'undefined') {\n // supress undefined node\n } else if (item === null) {\n if(key[0] === \"?\") val += this.indentate(level) + '<' + key + '?' + this.tagEndChar;\n else val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;\n // val += this.indentate(level) + '<' + key + '/' + this.tagEndChar;\n } else if (typeof item === 'object') {\n if(this.options.oneListGroup){\n const result = this.j2x(item, level + 1);\n listTagVal += result.val;\n if (this.options.attributesGroupName && item.hasOwnProperty(this.options.attributesGroupName)) {\n listTagAttr += result.attrStr\n }\n }else{\n listTagVal += this.processTextOrObjNode(item, key, level)\n }\n } else {\n if (this.options.oneListGroup) {\n let textValue = this.options.tagValueProcessor(key, item);\n textValue = this.replaceEntitiesValue(textValue);\n listTagVal += textValue;\n } else {\n listTagVal += this.buildTextValNode(item, key, '', level);\n }\n }\n }\n if(this.options.oneListGroup){\n listTagVal = this.buildObjectNode(listTagVal, key, listTagAttr, level);\n }\n val += listTagVal;\n } else {\n //nested node\n if (this.options.attributesGroupName && key === this.options.attributesGroupName) {\n const Ks = Object.keys(jObj[key]);\n const L = Ks.length;\n for (let j = 0; j < L; j++) {\n attrStr += this.buildAttrPairStr(Ks[j], '' + jObj[key][Ks[j]]);\n }\n } else {\n val += this.processTextOrObjNode(jObj[key], key, level)\n }\n }\n }\n return {attrStr: attrStr, val: val};\n};\n\nBuilder.prototype.buildAttrPairStr = function(attrName, val){\n val = this.options.attributeValueProcessor(attrName, '' + val);\n val = this.replaceEntitiesValue(val);\n if (this.options.suppressBooleanAttributes && val === \"true\") {\n return ' ' + attrName;\n } else return ' ' + attrName + '=\"' + val + '\"';\n}\n\nfunction processTextOrObjNode (object, key, level) {\n const result = this.j2x(object, level + 1);\n if (object[this.options.textNodeName] !== undefined && Object.keys(object).length === 1) {\n return this.buildTextValNode(object[this.options.textNodeName], key, result.attrStr, level);\n } else {\n return this.buildObjectNode(result.val, key, result.attrStr, level);\n }\n}\n\nBuilder.prototype.buildObjectNode = function(val, key, attrStr, level) {\n if(val === \"\"){\n if(key[0] === \"?\") return this.indentate(level) + '<' + key + attrStr+ '?' + this.tagEndChar;\n else {\n return this.indentate(level) + '<' + key + attrStr + this.closeTag(key) + this.tagEndChar;\n }\n }else{\n\n let tagEndExp = '' + key + this.tagEndChar;\n let piClosingChar = \"\";\n \n if(key[0] === \"?\") {\n piClosingChar = \"?\";\n tagEndExp = \"\";\n }\n \n // attrStr is an empty string in case the attribute came as undefined or null\n if ((attrStr || attrStr === '') && val.indexOf('<') === -1) {\n return ( this.indentate(level) + '<' + key + attrStr + piClosingChar + '>' + val + tagEndExp );\n } else if (this.options.commentPropName !== false && key === this.options.commentPropName && piClosingChar.length === 0) {\n return this.indentate(level) + `` + this.newLine;\n }else {\n return (\n this.indentate(level) + '<' + key + attrStr + piClosingChar + this.tagEndChar +\n val +\n this.indentate(level) + tagEndExp );\n }\n }\n}\n\nBuilder.prototype.closeTag = function(key){\n let closeTag = \"\";\n if(this.options.unpairedTags.indexOf(key) !== -1){ //unpaired\n if(!this.options.suppressUnpairedNode) closeTag = \"/\"\n }else if(this.options.suppressEmptyNode){ //empty\n closeTag = \"/\";\n }else{\n closeTag = `>${key}`\n }\n return closeTag;\n}\n\nfunction buildEmptyObjNode(val, key, attrStr, level) {\n if (val !== '') {\n return this.buildObjectNode(val, key, attrStr, level);\n } else {\n if(key[0] === \"?\") return this.indentate(level) + '<' + key + attrStr+ '?' + this.tagEndChar;\n else {\n return this.indentate(level) + '<' + key + attrStr + '/' + this.tagEndChar;\n // return this.buildTagStr(level,key, attrStr);\n }\n }\n}\n\nBuilder.prototype.buildTextValNode = function(val, key, attrStr, level) {\n if (this.options.cdataPropName !== false && key === this.options.cdataPropName) {\n return this.indentate(level) + `` + this.newLine;\n }else if (this.options.commentPropName !== false && key === this.options.commentPropName) {\n return this.indentate(level) + `` + this.newLine;\n }else if(key[0] === \"?\") {//PI tag\n return this.indentate(level) + '<' + key + attrStr+ '?' + this.tagEndChar; \n }else{\n let textValue = this.options.tagValueProcessor(key, val);\n textValue = this.replaceEntitiesValue(textValue);\n \n if( textValue === ''){\n return this.indentate(level) + '<' + key + attrStr + this.closeTag(key) + this.tagEndChar;\n }else{\n return this.indentate(level) + '<' + key + attrStr + '>' +\n textValue +\n '' + key + this.tagEndChar;\n }\n }\n}\n\nBuilder.prototype.replaceEntitiesValue = function(textValue){\n if(textValue && textValue.length > 0 && this.options.processEntities){\n for (let i=0; i