{
    "version": "149.0.7827.3",
    "description": "Fast, secure, and free web browser, built for the modern web.",
    "homepage": "https://www.google.com/chrome/beta",
    "license": {
        "identifier": "Freeware",
        "url": "https://www.google.com/chrome/privacy/eula_text.html"
    },
    "architecture": {
        "64bit": {
            "url": "https://dl.google.com/release2/chrome/adh2a4z44vwwdkqxm7zoag2oy55q_149.0.7827.3/149.0.7827.3_chrome_installer_uncompressed.exe#/dl.7z",
            "hash": "6d430332c470dffdde8df64a66249d94019ed6279dd603398c7c637471aec4c6"
        },
        "32bit": {
            "url": "https://dl.google.com/release2/chrome/mmu37i2dc2mclqlr3pxlwximcq_149.0.7827.3/149.0.7827.3_chrome_installer_uncompressed.exe#/dl.7z",
            "hash": "2155de62532178801d801eec97fc8aa396b441040e55408167da90c5075cdc5b"
        },
        "arm64": {
            "url": "https://dl.google.com/release2/chrome/kbdszl2w4ygemqvodnkoehrfjm_149.0.7827.3/149.0.7827.3_chrome_installer_uncompressed.exe#/dl.7z",
            "hash": "73653703483f8cc84d2468c803d3553f4b8fe8d0a260d4f0488543b3339ddcf6"
        }
    },
    "extract_dir": "Chrome-bin",
    "bin": [
        [
            "chrome.exe",
            "chrome-beta"
        ]
    ],
    "shortcuts": [
        [
            "chrome.exe",
            "Google Chrome (Beta)"
        ]
    ],
    "checkver": {
        "script": [
            "$AppID = '{8A69D345-D564-463C-AFF1-A69D9E530F96}'",
            "$ArchParams  = @{",
            "    'x64'   ='1.1-beta-arch_x64'",
            "    'x86'   ='1.1-beta-arch_x86'",
            "    'arm64' ='1.1-beta-arch_arm64'",
            "}",
            "$BodyTemplate = @(",
            "    '<?xml version=\"1.0\" encoding=\"UTF-8\"?>',",
            "    '<request protocol=\"3.0\">',",
            "    '  <os platform=\"win\" version=\"10.0.22000.0\" arch=\"{0}\"/>',",
            "    '  <app appid=\"{1}\" ap=\"{2}\" version=\"\">',",
            "    '    <updatecheck/>',",
            "    '  </app>',",
            "    '</request>'",
            ") -join \"`n\"",
            "$ArchURLs = @{}",
            "$Version = $null",
            "forEach ($Arch in $ArchParams.Keys) {",
            "    $Body = $BodyTemplate -f $Arch, $AppID, $ArchParams[$Arch]",
            "    $Response = Invoke-RestMethod -Uri 'https://update.googleapis.com/service/update2' -Method Post -Body $Body",
            "    if ($Arch -eq 'x64') {",
            "        $Version = $Response.response.app.updatecheck.manifest.version",
            "    }",
            "    $BaseURL = $Response.SelectSingleNode(\"//url[starts-with(@codebase, 'https://dl.google.com/release2/chrome/')]\")",
            "    $BaseURL.GetAttribute('codebase') -match '^https://dl\\.google\\.com/release2/chrome/(?<URL>[^/]+)/'",
            "    $FileName = $Response.SelectSingleNode('//package').GetAttribute('name')",
            "    $ArchURLs[$Arch] = \"$($Matches['URL'])/$FileName\"",
            "}",
            "Write-Output \"$Version,$($ArchURLs['x64']),$($ArchURLs['x86']),$($ArchURLs['arm64'])\""
        ],
        "regex": "(?<version>[\\d.]+),(?<archx64>[^,]+),(?<archx86>[^,]+),(?<archarm64>[^,]+)"
    },
    "autoupdate": {
        "architecture": {
            "64bit": {
                "url": "https://dl.google.com/release2/chrome/$matchArchx64#/dl.7z"
            },
            "32bit": {
                "url": "https://dl.google.com/release2/chrome/$matchArchx86#/dl.7z"
            },
            "arm64": {
                "url": "https://dl.google.com/release2/chrome/$matchArcharm64#/dl.7z"
            }
        }
    }
}
