(rawValue)
| 5606 | } |
| 5607 | |
| 5608 | function normalizeInbucketOrigin(rawValue) { |
| 5609 | const value = (rawValue || '').trim(); |
| 5610 | if (!value) return ''; |
| 5611 | |
| 5612 | const candidate = /^[a-zA-Z][a-zA-Z\d+\-.]*:\/\//.test(value) ? value : `https://${value}`; |
| 5613 | |
| 5614 | try { |
| 5615 | const parsed = new URL(candidate); |
| 5616 | return parsed.origin; |
| 5617 | } catch { |
| 5618 | return ''; |
| 5619 | } |
| 5620 | } |
| 5621 | |
| 5622 | function getVerificationCodeStateKey(step) { |
| 5623 | return verificationFlowHelpers.getVerificationCodeStateKey(step); |